summaryrefslogtreecommitdiff
path: root/sqlite.zig
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite.zig')
-rw-r--r--sqlite.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/sqlite.zig b/sqlite.zig
index 1192f0e..75ff4ec 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -881,7 +881,7 @@ pub const Db = struct {
881 /// bindings to values, but have multiple commands inside. 881 /// bindings to values, but have multiple commands inside.
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 execMulti(self: *Self, comptime query: []const u8, options: QueryOptions) !void {
885 var new_options = options; 885 var new_options = options;
886 var sql_tail_ptr: ?[*:0]const u8 = null; 886 var sql_tail_ptr: ?[*:0]const u8 = null;
887 new_options.sql_tail_ptr = &sql_tail_ptr; 887 new_options.sql_tail_ptr = &sql_tail_ptr;
@@ -2325,7 +2325,7 @@ test "sqlite: db init" {
2325test "sqlite: run multi" { 2325test "sqlite: run multi" {
2326 var db = try getTestDb(); 2326 var db = try getTestDb();
2327 defer db.deinit(); 2327 defer db.deinit();
2328 try db.runMulti("create table a(b int);\n\n--test comment\ncreate table b(c int);", .{}); 2328 try db.execMulti("create table a(b int);\n\n--test comment\ncreate table b(c int);", .{});
2329 const val = try db.one(i32, "select max(c) from b", .{}, .{}); 2329 const val = try db.one(i32, "select max(c) from b", .{}, .{});
2330 try testing.expectEqual(@as(?i32, 0), val); 2330 try testing.expectEqual(@as(?i32, 0), val);
2331} 2331}