diff options
| author | 2023-07-09 13:39:52 -0700 | |
|---|---|---|
| committer | 2023-07-10 13:39:47 +0200 | |
| commit | cecdc84e48bfa77b12667c1d772f9b26cd183164 (patch) | |
| tree | abcd96a3a3bc1929703e2739f21dac0cd9c6bbaf | |
| parent | test: add default value for TestUser.Color (diff) | |
| download | zig-sqlite-cecdc84e48bfa77b12667c1d772f9b26cd183164.tar.gz zig-sqlite-cecdc84e48bfa77b12667c1d772f9b26cd183164.tar.xz zig-sqlite-cecdc84e48bfa77b12667c1d772f9b26cd183164.zip | |
DynamicStatement.all: use iteratorAlloc
Statement.all already does
| -rw-r--r-- | sqlite.zig | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -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| { |