Add 'date' to rc.decltypes interpreted as a time

This commit is contained in:
Peter Waller 2014-08-11 11:03:27 +01:00
parent 1704ea522d
commit ff0960b999
1 changed files with 1 additions and 1 deletions

View File

@ -505,7 +505,7 @@ func (rc *SQLiteRows) Next(dest []driver.Value) error {
s := C.GoString((*C.char)(unsafe.Pointer(C.sqlite3_column_text(rc.s.s, C.int(i))))) s := C.GoString((*C.char)(unsafe.Pointer(C.sqlite3_column_text(rc.s.s, C.int(i)))))
switch rc.decltype[i] { switch rc.decltype[i] {
case "timestamp", "datetime": case "timestamp", "datetime", "date":
for _, format := range SQLiteTimestampFormats { for _, format := range SQLiteTimestampFormats {
if dest[i], err = time.Parse(format, s); err == nil { if dest[i], err = time.Parse(format, s); err == nil {
break break