summaryrefslogtreecommitdiff
path: root/sqlite.zig
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sqlite.zig6
1 files changed, 5 insertions, 1 deletions
diff --git a/sqlite.zig b/sqlite.zig
index 6d22d1f..b1f9f81 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -1568,6 +1568,10 @@ pub const DynamicStatement = struct {
1568 pub const PrepareError = error{EmptyQuery} || Error; 1568 pub const PrepareError = error{EmptyQuery} || Error;
1569 1569
1570 fn prepare(db: *Db, query: []const u8, options: QueryOptions, flags: c_uint) PrepareError!Self { 1570 fn prepare(db: *Db, query: []const u8, options: QueryOptions, flags: c_uint) PrepareError!Self {
1571 return prepareWithTail(db, query, options, flags, null);
1572 }
1573
1574 fn prepareWithTail(db: *Db, query: []const u8, options: QueryOptions, flags: c_uint, tail: ?*[*c]const u8) PrepareError!Self {
1571 var dummy_diags = Diagnostics{}; 1575 var dummy_diags = Diagnostics{};
1572 var diags = options.diags orelse &dummy_diags; 1576 var diags = options.diags orelse &dummy_diags;
1573 const stmt = blk: { 1577 const stmt = blk: {
@@ -1578,7 +1582,7 @@ pub const DynamicStatement = struct {
1578 @intCast(query.len), 1582 @intCast(query.len),
1579 flags, 1583 flags,
1580 &tmp, 1584 &tmp,
1581 options.sql_tail_ptr, 1585 tail,
1582 ); 1586 );
1583 if (result != c.SQLITE_OK) { 1587 if (result != c.SQLITE_OK) {
1584 diags.err = getLastDetailedErrorFromDb(db.db); 1588 diags.err = getLastDetailedErrorFromDb(db.db);