diff options
| author | 2022-05-02 19:21:22 +0200 | |
|---|---|---|
| committer | 2022-05-02 19:21:22 +0200 | |
| commit | d4bc0c0ee29e5c8b253d80c0fa5f2bbecbaeda39 (patch) | |
| tree | 890e7957ceef912f0569f178b3b953d817b4a9c3 /sqlite.zig | |
| parent | put the TODO comment at the end of the line instead (diff) | |
| download | zig-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 'sqlite.zig')
| -rw-r--r-- | sqlite.zig | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -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.?); |