Merge pull request #643 from akalin/zero-length-blob

Distinguish between NULL and zero-length blobs on query
This commit is contained in:
mattn
2018-11-22 01:48:38 +09:00
committed by GitHub
2 changed files with 32 additions and 1 deletions

View File

@@ -2024,7 +2024,7 @@ func (rc *SQLiteRows) Next(dest []driver.Value) error {
case C.SQLITE_BLOB:
p := C.sqlite3_column_blob(rc.s.s, C.int(i))
if p == nil {
dest[i] = nil
dest[i] = []byte{}
continue
}
n := C.sqlite3_column_bytes(rc.s.s, C.int(i))