Tencent / wcdb

WCDB is a cross-platform database framework developed by WeChat.
Other
10.61k stars 1.39k forks source link

文档错误 #1087

Closed ijunfly closed 2 months ago

ijunfly commented 2 months ago

中文文档 Swift 自定义字段映射类型 https://github.com/Tencent/wcdb/wiki/Swift-%e8%87%aa%e5%ae%9a%e4%b9%89%e5%ad%97%e6%ae%b5%e6%98%a0%e5%b0%84%e7%b1%bb%e5%9e%8b

guard 使用错误

    func archivedValue() -> FundamentalValue {
        guard let data = try? JSONEncoder().encode([
            "variable1": variable1,
            "variable2": variable2]) else {
            return FundamentalValue(data) 
        }
        return FundamentalValue(nil)
    }
    func archivedValue() -> FundamentalValue {
        guard let data = try? JSONEncoder().encode([
            "variable1": variable1,
            "variable2": variable2]) else {
            return FundamentalValue(nil) 
        }
        return FundamentalValue(data)
    }
Qiuwen-chen commented 2 months ago

Fixed