summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Meghan2023-07-09 13:39:52 -0700
committerGravatar Vincent Rischmann2023-07-10 13:39:47 +0200
commitcecdc84e48bfa77b12667c1d772f9b26cd183164 (patch)
treeabcd96a3a3bc1929703e2739f21dac0cd9c6bbaf
parenttest: add default value for TestUser.Color (diff)
downloadzig-sqlite-cecdc84e48bfa77b12667c1d772f9b26cd183164.tar.gz
zig-sqlite-cecdc84e48bfa77b12667c1d772f9b26cd183164.tar.xz
zig-sqlite-cecdc84e48bfa77b12667c1d772f9b26cd183164.zip
DynamicStatement.all: use iteratorAlloc
Statement.all already does
Diffstat (limited to '')
-rw-r--r--sqlite.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/sqlite.zig b/sqlite.zig
index fe53b1f..7f98c08 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -1924,7 +1924,7 @@ pub const DynamicStatement = struct {
1924 /// 1924 ///
1925 /// Note that this allocates all rows into a single slice: if you read a lot of data this can use a lot of memory. 1925 /// Note that this allocates all rows into a single slice: if you read a lot of data this can use a lot of memory.
1926 pub fn all(self: *Self, comptime Type: type, allocator: mem.Allocator, options: QueryOptions, values: anytype) ![]Type { 1926 pub fn all(self: *Self, comptime Type: type, allocator: mem.Allocator, options: QueryOptions, values: anytype) ![]Type {
1927 var iter = try self.iterator(Type, values); 1927 var iter = try self.iteratorAlloc(Type, allocator, values);
1928 1928
1929 var rows = std.ArrayList(Type).init(allocator); 1929 var rows = std.ArrayList(Type).init(allocator);
1930 while (try iter.nextAlloc(allocator, options)) |row| { 1930 while (try iter.nextAlloc(allocator, options)) |row| {