aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Waller <p@pwaller.net>2014-09-02 16:36:34 +0100
committerPeter Waller <p@pwaller.net>2014-09-02 16:36:34 +0100
commit764e046d89b47e49b58465b7fa57056f56ae5e17 (patch)
treeda471fd11625c84f6dab56809b77a0287d7693ae
parentAdd 'date' to rc.decltypes interpreted as a time (diff)
downloadgolite-764e046d89b47e49b58465b7fa57056f56ae5e17.tar.gz
golite-764e046d89b47e49b58465b7fa57056f56ae5e17.tar.xz
Add "date" to decltypes parsed as a unix time
-rw-r--r--sqlite3.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlite3.go b/sqlite3.go
index 7280eb8..f133897 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -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