0

本节不适用于 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'

4

1 回答 1

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)
}

}

于 2015-09-30T07:10:09.813 回答