| ... | ... | @@ -24,10 +24,10 @@ pub fn close(self: *Self) void { |
| 24 | 24 | self.db.deinit(); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | | pub fn collect(self: *Self, alloc: *std.mem.Allocator, comptime T: type, comptime query: []const u8) ![]const T { |
| 27 | pub fn collect(self: *Self, alloc: *std.mem.Allocator, comptime T: type, comptime query: []const u8, args: anytype) ![]const T { |
| 28 | 28 | var stmt = try self.db.prepare(query); |
| 29 | 29 | defer stmt.deinit(); |
| 30 | | var iter = try stmt.iterator(T, .{}); |
| 30 | var iter = try stmt.iterator(T, args); |
| 31 | 31 | var list = std.ArrayList(T).init(alloc); |
| 32 | 32 | while (try iter.nextAlloc(alloc, .{})) |row| { |
| 33 | 33 | try list.append(row); |