From 9898c4ee14541a811ae6a805bf075a879281ff96 Mon Sep 17 00:00:00 2001 From: Luna Date: Mon, 11 Apr 2022 23:28:34 -0300 Subject: add support for arrays as runtime bind values --- sqlite.zig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sqlite.zig b/sqlite.zig index f1add39..b78099d 100644 --- a/sqlite.zig +++ b/sqlite.zig @@ -1750,6 +1750,11 @@ pub const DynamicStatement = struct { try self.bindField(PointerTypeInfo.child, options, "", @intCast(c_int, index), value_to_bind); } }, + .Array => |ArrayTypeInfo| { + for (values) |value_to_bind, index| { + try self.bindField(ArrayTypeInfo.child, options, "", @intCast(c_int, index), value_to_bind); + } + }, else => @compileError("Unsupported type for values: " ++ @typeName(StructType)), } } -- cgit v1.2.3