diff --git a/src/sqlite3.zig b/src/sqlite3.zig index e7e5a471638a6b1dcfc03af34c5468f2bfceecab..76342ce20e80f47ee4c87d92b0423e5693d82e7f 100644 --- a/src/sqlite3.zig +++ b/src/sqlite3.zig @@ -24,10 +24,10 @@ pub fn close(self: *Self) void { self.db.deinit(); } -pub fn collect(self: *Self, alloc: *std.mem.Allocator, comptime T: type, comptime query: []const u8) ![]const T { +pub fn collect(self: *Self, alloc: *std.mem.Allocator, comptime T: type, comptime query: []const u8, args: anytype) ![]const T { var stmt = try self.db.prepare(query); defer stmt.deinit(); - var iter = try stmt.iterator(T, .{}); + var iter = try stmt.iterator(T, args); var list = std.ArrayList(T).init(alloc); while (try iter.nextAlloc(alloc, .{})) |row| { try list.append(row);