summaryrefslogtreecommitdiff
path: root/sqlite.zig
diff options
context:
space:
mode:
authorGravatar Vincent Rischmann2021-01-02 00:35:59 +0100
committerGravatar Vincent Rischmann2021-01-02 00:43:05 +0100
commita3aac9fb383e6d3d1f2ad81122443fa444123e26 (patch)
tree3034fa8d5d332be062f3d89568ea27f76d20ef5b /sqlite.zig
parentadd a test that binds a string literal (diff)
downloadzig-sqlite-a3aac9fb383e6d3d1f2ad81122443fa444123e26.tar.gz
zig-sqlite-a3aac9fb383e6d3d1f2ad81122443fa444123e26.tar.xz
zig-sqlite-a3aac9fb383e6d3d1f2ad81122443fa444123e26.zip
allow binding a pointer
Diffstat (limited to 'sqlite.zig')
-rw-r--r--sqlite.zig1
1 files changed, 1 insertions, 0 deletions
diff --git a/sqlite.zig b/sqlite.zig
index 1489a0f..f40dd09 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -732,6 +732,7 @@ pub fn Statement(comptime opts: StatementOptions, comptime query: ParsedQuery) t
732 .Float, .ComptimeFloat => _ = c.sqlite3_bind_double(self.stmt, column, field), 732 .Float, .ComptimeFloat => _ = c.sqlite3_bind_double(self.stmt, column, field),
733 .Bool => _ = c.sqlite3_bind_int64(self.stmt, column, @boolToInt(field)), 733 .Bool => _ = c.sqlite3_bind_int64(self.stmt, column, @boolToInt(field)),
734 .Pointer => |ptr| switch (ptr.size) { 734 .Pointer => |ptr| switch (ptr.size) {
735 .One => self.bindField(ptr.child, field_name, i, field.*),
735 else => @compileError("cannot bind field " ++ field_name ++ " of type " ++ @typeName(FieldType)), 736 else => @compileError("cannot bind field " ++ field_name ++ " of type " ++ @typeName(FieldType)),
736 }, 737 },
737 .Array => |arr| { 738 .Array => |arr| {