mirror of https://github.com/mattn/go-sqlite3.git
column_type SQLITE_TEXT returned as string by default
This commit is contained in:
parent
abc8991d4d
commit
ae5cbb218c
|
@ -223,7 +223,6 @@ var SQLiteTimestampFormats = []string{
|
||||||
const (
|
const (
|
||||||
columnDate string = "date"
|
columnDate string = "date"
|
||||||
columnDatetime string = "datetime"
|
columnDatetime string = "datetime"
|
||||||
columnText string = "text"
|
|
||||||
columnTimestamp string = "timestamp"
|
columnTimestamp string = "timestamp"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2062,14 +2061,8 @@ func (rc *SQLiteRows) Next(dest []driver.Value) error {
|
||||||
t = t.In(rc.s.c.loc)
|
t = t.In(rc.s.c.loc)
|
||||||
}
|
}
|
||||||
dest[i] = t
|
dest[i] = t
|
||||||
case columnText:
|
|
||||||
dest[i] = s
|
|
||||||
default:
|
default:
|
||||||
if strings.Contains(strings.ToLower(rc.decltype[i]), "char") {
|
|
||||||
dest[i] = s
|
dest[i] = s
|
||||||
} else {
|
|
||||||
dest[i] = []byte(s)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue