summaryrefslogtreecommitdiff
path: root/sqlite.zig
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sqlite.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlite.zig b/sqlite.zig
index 3e9d33c..337ea90 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -1209,7 +1209,7 @@ pub const DynamicStatement = struct {
1209 1209
1210 fn sqlite3BindParameterIndex(stmt: *c.sqlite3_stmt, comptime name: []const u8) c_int { 1210 fn sqlite3BindParameterIndex(stmt: *c.sqlite3_stmt, comptime name: []const u8) c_int {
1211 inline for (.{ ":", "@", "$" }) |prefix| { 1211 inline for (.{ ":", "@", "$" }) |prefix| {
1212 const id = std.fmt.comptimePrint(prefix ++ "{s}", .{name}); 1212 const id = prefix ++ name;
1213 const i = c.sqlite3_bind_parameter_index(stmt, id); 1213 const i = c.sqlite3_bind_parameter_index(stmt, id);
1214 if (i > 0) return i - 1; // .bindField uses 0-based while sqlite3 uses 1-based index. 1214 if (i > 0) return i - 1; // .bindField uses 0-based while sqlite3 uses 1-based index.
1215 } 1215 }