| author | |
| committer | |
| log | ef9f5a749c06bbbe9b30ff582faa5b31150d83a6 |
| tree | a349401cd88d53ae8661e9aa8b610d01ebac2b8b |
| parent | c673458e1d44ba8981103bf336a6b2edd25198ac |
1 files changed, 4 insertions(+), 0 deletions(-)
src/sqlite3.zig+4| ... | ... | @@ -20,6 +20,10 @@ pub fn connect(path: [:0]const u8) !Self { |
| 20 | 20 | }; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | pub fn close(self: *Self) void { | |
| 24 | self.db.deinit(); | |
| 25 | } | |
| 26 | ||
| 23 | 27 | pub fn collect(self: *Self, alloc: *std.mem.Allocator, comptime T: type, comptime query: []const u8) ![]const T { |
| 24 | 28 | var stmt = try self.db.prepare(query); |
| 25 | 29 | defer stmt.deinit(); |