Skip to content

Commit 27e8f68

Browse files
committed
add clarifying comment for skipping C.SQLITE_NULL
1 parent 0a6a5dc commit 27e8f68

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sqlite3_type.go

+3
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@ func (rc *SQLiteRows) ColumnTypeScanType(i int) reflect.Type {
7373
return TYPE_NULLSTRING
7474
case C.SQLITE_BLOB:
7575
return TYPE_RAWBYTES
76+
// This case can signal that the value is NULL or that Next() has not been called yet.
77+
// Skip it and return the fallback behaviour as a best effort. This is safe as all types
78+
// returned are Nullable or any, which is the expected value for SQLite3.
7679
//case C.SQLITE_NULL:
7780
// return TYPE_ANY
7881
}

0 commit comments

Comments
 (0)