summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sqlite.zig11
1 files changed, 2 insertions, 9 deletions
diff --git a/sqlite.zig b/sqlite.zig
index d140e56..d3df1a4 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -555,16 +555,9 @@ test "sqlite: statement exec" {
555 // Test with a Bytes struct 555 // Test with a Bytes struct
556 556
557 { 557 {
558 // NOTE(vincent): can't yet pass an anonymous struct, the compiler crashes. 558 try db.exec("INSERT INTO user(id, name, age) VALUES(?, ?, ?)", .{
559 const Params = struct {
560 id: usize,
561 name: Bytes,
562 age: usize,
563 };
564
565 try db.exec("INSERT INTO user(id, name, age) VALUES(?, ?, ?)", Params{
566 .id = 200, 559 .id = 200,
567 .name = .{ .Text = "hello" }, 560 .name = Bytes{ .Text = "hello" },
568 .age = 20, 561 .age = 20,
569 }); 562 });
570 } 563 }