From 9243b6b9769f0bcb37abca95f4baf474384b5829 Mon Sep 17 00:00:00 2001 From: Jaremy Creechley Date: Wed, 20 Sep 2023 23:35:02 -0700 Subject: [PATCH] key batch --- datastore/sql/sqliteutils.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datastore/sql/sqliteutils.nim b/datastore/sql/sqliteutils.nim index 213438f..dab5b81 100644 --- a/datastore/sql/sqliteutils.nim +++ b/datastore/sql/sqliteutils.nim @@ -76,7 +76,7 @@ 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.toCString(), -1.cint, SQLITE_TRANSIENT) + sqlite3_bind_text(s, n.cint, val.toCString(), val.data.len().cint, SQLITE_TRANSIENT) else: {.fatal: "Please add support for the '" & $typeof(val) & "' type".}