forked from mirror/go-sqlite3
Add "date" to decltypes parsed as a unix time
This commit is contained in:
parent
ff0960b999
commit
764e046d89
|
@ -474,7 +474,7 @@ func (rc *SQLiteRows) Next(dest []driver.Value) error {
|
|||
case C.SQLITE_INTEGER:
|
||||
val := int64(C.sqlite3_column_int64(rc.s.s, C.int(i)))
|
||||
switch rc.decltype[i] {
|
||||
case "timestamp", "datetime":
|
||||
case "timestamp", "datetime", "date":
|
||||
dest[i] = time.Unix(val, 0)
|
||||
case "boolean":
|
||||
dest[i] = val > 0
|
||||
|
|
Loading…
Reference in New Issue