mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-11 01:53:09 +00:00
improve bindParam handling of empty blobs
Per SQLite's docs, `sqlite3_bind_blob(s, n.cint, nil, 0.cint, nil)` is equivalent to `sqlite3_bind_null(s, n.cint)` but the intent of the latter is clearer.
This commit is contained in:
parent
b9eef2a5b4
commit
3237e87130
@ -38,7 +38,7 @@ proc bindParam(
|
||||
sqlite3_bind_blob(s, n.cint, unsafeAddr val[0], val.len.cint,
|
||||
SQLITE_TRANSIENT)
|
||||
else:
|
||||
sqlite3_bind_blob(s, n.cint, nil, 0.cint, nil)
|
||||
sqlite3_bind_null(s, n.cint)
|
||||
elif val is int32:
|
||||
sqlite3_bind_int(s, n.cint, val)
|
||||
elif val is uint32 | int64:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user