summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sqlite.zig9
1 files changed, 5 insertions, 4 deletions
diff --git a/sqlite.zig b/sqlite.zig
index 57d1be2..ba87c12 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -882,12 +882,13 @@ pub const Db = struct {
882 /// 882 ///
883 /// Exmaple: 'create table a(); create table b();' 883 /// Exmaple: 'create table a(); create table b();'
884 pub fn runMulti(self: *Self, comptime query: []const u8, options: QueryOptions) !void { 884 pub fn runMulti(self: *Self, comptime query: []const u8, options: QueryOptions) !void {
885 while (true) { 885 var new_options = options;
886 var sql_tail_ptr: ?[*:0]const u8 = null; 886 var sql_tail_ptr: ?[*:0]const u8 = null;
887 options.sql_tail_ptr = &sql_tail_ptr; 887 new_options.sql_tail_ptr = &sql_tail_ptr;
888 888
889 while (true) {
889 // continuously prepare and execute 890 // continuously prepare and execute
890 var stmt = try self.prepareWithDiags(query, options); 891 var stmt = try self.prepareWithDiags(query, new_options);
891 defer stmt.deinit(); 892 defer stmt.deinit();
892 if (sql_tail_ptr == null) break; 893 if (sql_tail_ptr == null) break;
893 894