summaryrefslogtreecommitdiff
path: root/sqlite.zig
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite.zig')
-rw-r--r--sqlite.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/sqlite.zig b/sqlite.zig
index f64e4bc..55526d6 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -9,8 +9,8 @@ pub const c = @cImport({
9 @cInclude("sqlite3.h"); 9 @cInclude("sqlite3.h");
10}); 10});
11 11
12const Text = @import("query.zig").Text; 12pub const Text = @import("query.zig").Text;
13const ParsedQuery = @import("query.zig").ParsedQuery; 13pub const ParsedQuery = @import("query.zig").ParsedQuery;
14 14
15const errors = @import("errors.zig"); 15const errors = @import("errors.zig");
16const Error = errors.Error; 16const Error = errors.Error;
@@ -1452,8 +1452,8 @@ pub const DynamicStatement = struct {
1452 /// 1452 ///
1453 /// Possible errors: 1453 /// Possible errors:
1454 /// - SQLiteError.SQLiteNotFound if some fields not found 1454 /// - SQLiteError.SQLiteNotFound if some fields not found
1455 pub fn iterator(self: *Self, comptime Type: type, values: anytype) !Iterator(Type) { 1455 pub fn iterator(self: *Self, comptime Type: type, options: anytype, values: anytype) !Iterator(Type) {
1456 try self.smartBind(values); 1456 try self.smartBind(options, values);
1457 1457
1458 var res: Iterator(Type) = undefined; 1458 var res: Iterator(Type) = undefined;
1459 res.db = self.db; 1459 res.db = self.db;
@@ -1488,7 +1488,7 @@ pub const DynamicStatement = struct {
1488 /// 1488 ///
1489 /// This cannot allocate memory. If you need to read TEXT or BLOB columns you need to use arrays or alternatively call `oneAlloc`. 1489 /// This cannot allocate memory. If you need to read TEXT or BLOB columns you need to use arrays or alternatively call `oneAlloc`.
1490 pub fn one(self: *Self, comptime Type: type, options: QueryOptions, values: anytype) !?Type { 1490 pub fn one(self: *Self, comptime Type: type, options: QueryOptions, values: anytype) !?Type {
1491 var iter = try self.iterator(Type, values); 1491 var iter = try self.iterator(Type, .{}, values);
1492 1492
1493 const row = (try iter.next(options)) orelse return null; 1493 const row = (try iter.next(options)) orelse return null;
1494 return row; 1494 return row;
@@ -1496,7 +1496,7 @@ pub const DynamicStatement = struct {
1496 1496
1497 /// oneAlloc is like `one` but can allocate memory. 1497 /// oneAlloc is like `one` but can allocate memory.
1498 pub fn oneAlloc(self: *Self, comptime Type: type, allocator: *mem.Allocator, options: QueryOptions, values: anytype) !?Type { 1498 pub fn oneAlloc(self: *Self, comptime Type: type, allocator: *mem.Allocator, options: QueryOptions, values: anytype) !?Type {
1499 var iter = try self.iterator(Type, values); 1499 var iter = try self.iterator(Type, .{ .allocator = allocator }, values);
1500 1500
1501 const row = (try iter.nextAlloc(allocator, options)) orelse return null; 1501 const row = (try iter.nextAlloc(allocator, options)) orelse return null;
1502 return row; 1502 return row;