diff options
| author | 2022-12-01 22:55:48 +0100 | |
|---|---|---|
| committer | 2022-12-01 22:55:48 +0100 | |
| commit | b98ebdf4a9f038ca6322e6091e45c4998efad946 (patch) | |
| tree | 90dcac16fd9e1bca8691d4db80068b5def73ecf9 | |
| parent | build: fix for latest zig (diff) | |
| download | zig-sqlite-b98ebdf4a9f038ca6322e6091e45c4998efad946.tar.gz zig-sqlite-b98ebdf4a9f038ca6322e6091e45c4998efad946.tar.xz zig-sqlite-b98ebdf4a9f038ca6322e6091e45c4998efad946.zip | |
fix for latest zig
| -rw-r--r-- | sqlite.zig | 4 | ||||
| -rw-r--r-- | vtab.zig | 2 |
2 files changed, 3 insertions, 3 deletions
| @@ -3404,7 +3404,7 @@ test "sqlite: bind runtime slice" { | |||
| 3404 | var list = std.ArrayList([]const u8).init(allocator); | 3404 | var list = std.ArrayList([]const u8).init(allocator); |
| 3405 | defer list.deinit(); | 3405 | defer list.deinit(); |
| 3406 | try list.append("this is some data"); | 3406 | try list.append("this is some data"); |
| 3407 | const args = list.toOwnedSlice(); | 3407 | const args = try list.toOwnedSlice(); |
| 3408 | 3408 | ||
| 3409 | var db = try getTestDb(); | 3409 | var db = try getTestDb(); |
| 3410 | defer db.deinit(); | 3410 | defer db.deinit(); |
| @@ -3819,7 +3819,7 @@ test "sqlite: empty slice" { | |||
| 3819 | try addTestData(&db); | 3819 | try addTestData(&db); |
| 3820 | 3820 | ||
| 3821 | var list = std.ArrayList(u8).init(arena.allocator()); | 3821 | var list = std.ArrayList(u8).init(arena.allocator()); |
| 3822 | const ptr = list.toOwnedSlice(); | 3822 | const ptr = try list.toOwnedSlice(); |
| 3823 | 3823 | ||
| 3824 | try db.exec("INSERT INTO article(author_id, data) VALUES(?, ?)", .{}, .{ 1, ptr }); | 3824 | try db.exec("INSERT INTO article(author_id, data) VALUES(?, ?)", .{}, .{ 1, ptr }); |
| 3825 | 3825 | ||
| @@ -1064,7 +1064,7 @@ const TestVirtualTable = struct { | |||
| 1064 | 1064 | ||
| 1065 | // | 1065 | // |
| 1066 | 1066 | ||
| 1067 | builder.id.str = builder.id_str_buffer.toOwnedSlice(); | 1067 | builder.id.str = try builder.id_str_buffer.toOwnedSlice(); |
| 1068 | builder.estimated_cost = 200; | 1068 | builder.estimated_cost = 200; |
| 1069 | builder.estimated_rows = 200; | 1069 | builder.estimated_rows = 200; |
| 1070 | 1070 | ||