stephencelis/SQLite.swift

Numeric Type Column

开放

#331 创建于 2016年1月19日

 (12 条评论) (0 个反应) (0 位负责人)Swift (1,618 个派生)batch import
bughelp wanted

仓库指标

星标
 (10,145 个星标)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 4 个 PR)

描述

update my table.

let x = Expression<Double>("x")

let db = try! Connection(dbFilePath)
let tbl = Table("test")

let dX: Double = 2000
try! db.run(tel.update(x <- dX))

update is success.

but select updated table is failure

for row in try! db.prepare(tbl.select(x)) {
    print(row[x])
}

error occurred.

fatal error: unexpectedly found nil while unwrapping an Optional value

Query.swift  line: 1025
        guard let value = values[idx] as? V.Datatype else { return nil }

please help!

贡献者指南