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:
Michael Bradley, Jr 2022-06-22 14:00:11 -05:00 committed by Michael Bradley
parent b9eef2a5b4
commit 3237e87130
1 changed files with 1 additions and 1 deletions

View File

@ -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: