本节不适用于swift2分支:
https://github.com/stephencelis/SQLite.swift/blob/swift-2/Documentation/Index.md#binary-data
我明白了:
Redundant conformance of 'NSData' to protocol 'Value'
和
Type 'UIImage' does not conform to protocol 'Value'
答案 0 :(得分:0)
我使用了文档示例中的代码
extension NSData: Value {
class var declaredDatatype: String {
return Blob.declaredDatatype
}
class func fromDatatypeValue(blobValue: Blob) -> Self {
return self(bytes: blobValue.bytes, length: blobValue.length)
}
var datatypeValue: Blob {
return Blob(bytes: bytes, length: length)
}
}