mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-08 00:23:10 +00:00
key batch
This commit is contained in:
parent
9243b6b976
commit
8fe5e3df05
@ -69,13 +69,9 @@ proc bindParam(
|
||||
# to the return from sqlite3_bind_*(). The object and pointer to it must
|
||||
# remain valid until then. SQLite will then manage the lifetime of its
|
||||
# private copy."
|
||||
sqlite3_bind_text(s, n.cint, val.cstring, -1.cint, SQLITE_TRANSIENT)
|
||||
sqlite3_bind_text(s, n.cint, val.cstring, val.len().cint, SQLITE_TRANSIENT)
|
||||
elif val is KeyId:
|
||||
# `-1` implies string length is num bytes up to first null-terminator;
|
||||
# `SQLITE_TRANSIENT` "indicate[s] that the object is to be copied prior
|
||||
# to the return from sqlite3_bind_*(). The object and pointer to it must
|
||||
# remain valid until then. SQLite will then manage the lifetime of its
|
||||
# private copy."
|
||||
# same as previous
|
||||
sqlite3_bind_text(s, n.cint, val.toCString(), val.data.len().cint, SQLITE_TRANSIENT)
|
||||
else:
|
||||
{.fatal: "Please add support for the '" & $typeof(val) & "' type".}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user