diff options
Diffstat (limited to 'sqlite.zig')
| -rw-r--r-- | sqlite.zig | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -401,7 +401,7 @@ pub const Db = struct { | |||
| 401 | /// const journal_mode = try db.pragma([]const u8, allocator, .{}, "journal_mode", null); | 401 | /// const journal_mode = try db.pragma([]const u8, allocator, .{}, "journal_mode", null); |
| 402 | /// | 402 | /// |
| 403 | pub fn pragmaAlloc(self: *Self, comptime Type: type, allocator: mem.Allocator, options: QueryOptions, comptime name: []const u8, comptime arg: ?[]const u8) !?Type { | 403 | pub fn pragmaAlloc(self: *Self, comptime Type: type, allocator: mem.Allocator, options: QueryOptions, comptime name: []const u8, comptime arg: ?[]const u8) !?Type { |
| 404 | const query = getPragmaQuery(name, arg); | 404 | const query = comptime getPragmaQuery(name, arg); |
| 405 | 405 | ||
| 406 | var stmt = try self.prepare(query); | 406 | var stmt = try self.prepare(query); |
| 407 | defer stmt.deinit(); | 407 | defer stmt.deinit(); |
| @@ -423,7 +423,7 @@ pub const Db = struct { | |||
| 423 | /// | 423 | /// |
| 424 | /// This cannot allocate memory. If your pragma command returns text you must use an array or call `pragmaAlloc`. | 424 | /// This cannot allocate memory. If your pragma command returns text you must use an array or call `pragmaAlloc`. |
| 425 | pub fn pragma(self: *Self, comptime Type: type, options: QueryOptions, comptime name: []const u8, comptime arg: ?[]const u8) !?Type { | 425 | pub fn pragma(self: *Self, comptime Type: type, options: QueryOptions, comptime name: []const u8, comptime arg: ?[]const u8) !?Type { |
| 426 | const query = getPragmaQuery(name, arg); | 426 | const query = comptime getPragmaQuery(name, arg); |
| 427 | 427 | ||
| 428 | var stmt = try self.prepareWithDiags(query, options); | 428 | var stmt = try self.prepareWithDiags(query, options); |
| 429 | defer stmt.deinit(); | 429 | defer stmt.deinit(); |