diff options
Diffstat (limited to 'sqlite.zig')
| -rw-r--r-- | sqlite.zig | 7 |
1 files changed, 1 insertions, 6 deletions
| @@ -735,12 +735,6 @@ pub fn Iterator(comptime Type: type) type { | |||
| 735 | // The options must contain an `allocator` field which will be used to create a copy of the data. | 735 | // The options must contain an `allocator` field which will be used to create a copy of the data. |
| 736 | fn readBytes(self: *Self, comptime BytesType: type, allocator: *mem.Allocator, _i: usize, comptime mode: ReadBytesMode) !BytesType { | 736 | fn readBytes(self: *Self, comptime BytesType: type, allocator: *mem.Allocator, _i: usize, comptime mode: ReadBytesMode) !BytesType { |
| 737 | const i = @intCast(c_int, _i); | 737 | const i = @intCast(c_int, _i); |
| 738 | const type_info = @typeInfo(BytesType); | ||
| 739 | |||
| 740 | var ret: BytesType = switch (BytesType) { | ||
| 741 | Text, Blob => .{ .data = "" }, | ||
| 742 | else => try dupeWithSentinel(BytesType, allocator, ""), | ||
| 743 | }; | ||
| 744 | 738 | ||
| 745 | switch (mode) { | 739 | switch (mode) { |
| 746 | .Blob => { | 740 | .Blob => { |
| @@ -1250,6 +1244,7 @@ fn addTestData(db: *Db) !void { | |||
| 1250 | 1244 | ||
| 1251 | test "sqlite: db init" { | 1245 | test "sqlite: db init" { |
| 1252 | var db = try getTestDb(); | 1246 | var db = try getTestDb(); |
| 1247 | _ = db; | ||
| 1253 | } | 1248 | } |
| 1254 | 1249 | ||
| 1255 | test "sqlite: db pragma" { | 1250 | test "sqlite: db pragma" { |