summaryrefslogtreecommitdiff
path: root/sqlite.zig
diff options
context:
space:
mode:
authorGravatar Vincent Rischmann2022-05-02 19:21:22 +0200
committerGravatar Vincent Rischmann2022-05-02 19:21:22 +0200
commitd4bc0c0ee29e5c8b253d80c0fa5f2bbecbaeda39 (patch)
tree890e7957ceef912f0569f178b3b953d817b4a9c3 /sqlite.zig
parentput the TODO comment at the end of the line instead (diff)
downloadzig-sqlite-d4bc0c0ee29e5c8b253d80c0fa5f2bbecbaeda39.tar.gz
zig-sqlite-d4bc0c0ee29e5c8b253d80c0fa5f2bbecbaeda39.tar.xz
zig-sqlite-d4bc0c0ee29e5c8b253d80c0fa5f2bbecbaeda39.zip
the '_' character is valid in a named bind parameter
Diffstat (limited to '')
-rw-r--r--sqlite.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/sqlite.zig b/sqlite.zig
index 5299e7f..d9cff3b 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -3534,9 +3534,9 @@ test "sqlite: one with all named parameters" {
3534 3534
3535 const id = try db.one( 3535 const id = try db.one(
3536 usize, 3536 usize,
3537 "SELECT id FROM user WHERE age = $age AND weight < :weight and id < @id", 3537 "SELECT id FROM user WHERE age = $age AND weight < :weight and id < @my_id",
3538 .{ .diags = &diags }, 3538 .{ .diags = &diags },
3539 .{ .id = 400, .age = 33, .weight = 200 }, 3539 .{ .my_id = 400, .age = 33, .weight = 200 },
3540 ); 3540 );
3541 try testing.expect(id != null); 3541 try testing.expect(id != null);
3542 try testing.expectEqual(@as(usize, 20), id.?); 3542 try testing.expectEqual(@as(usize, 20), id.?);