aboutsummaryrefslogtreecommitdiff
path: root/sqlite3.go
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite3.go')
-rw-r--r--sqlite3.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/sqlite3.go b/sqlite3.go
index f731d20..ac713d6 100644
--- a/sqlite3.go
+++ b/sqlite3.go
@@ -223,6 +223,7 @@ var SQLiteTimestampFormats = []string{
const (
columnDate string = "date"
columnDatetime string = "datetime"
+ columnText string = "text"
columnTimestamp string = "timestamp"
)
@@ -2061,10 +2062,15 @@ func (rc *SQLiteRows) Next(dest []driver.Value) error {
t = t.In(rc.s.c.loc)
}
dest[i] = t
+ case columnText:
+ dest[i] = s
default:
- dest[i] = []byte(s)
+ if strings.Contains(strings.ToLower(rc.decltype[i]), "char") {
+ dest[i] = s
+ } else {
+ dest[i] = []byte(s)
+ }
}
-
}
}
return nil