stephencelis/SQLite.swift

Numeric Type Column

Open

#331 opened on Jan 19, 2016

View on GitHub
 (12 comments) (0 reactions) (0 assignees)Swift (10,145 stars) (1,618 forks)batch import
bughelp wanted

Description

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!

Contributor guide