diff options
| -rw-r--r-- | sqlite.zig | 12 |
1 files changed, 8 insertions, 4 deletions
| @@ -1745,14 +1745,18 @@ pub const DynamicStatement = struct { | |||
| 1745 | // TODO support other pointer types | 1745 | // TODO support other pointer types |
| 1746 | std.debug.assert(PointerTypeInfo.size == .Slice); | 1746 | std.debug.assert(PointerTypeInfo.size == .Slice); |
| 1747 | 1747 | ||
| 1748 | for (values) |value_to_bind, index| { | 1748 | switch (PointerTypeInfo.size) { |
| 1749 | std.log.info("awooga {} {}", .{ value_to_bind, index }); | 1749 | .Slice => { |
| 1750 | try self.bindField(PointerTypeInfo.child, options, "", @intCast(c_int, index), value_to_bind); | 1750 | for (values) |value_to_bind, index| { |
| 1751 | try self.bindField(PointerTypeInfo.child, options, "unknown", @intCast(c_int, index), value_to_bind); | ||
| 1752 | } | ||
| 1753 | }, | ||
| 1754 | else => @compileError("TODO support pointer size " ++ @tagName(PointerTypeInfo.size)), | ||
| 1751 | } | 1755 | } |
| 1752 | }, | 1756 | }, |
| 1753 | .Array => |ArrayTypeInfo| { | 1757 | .Array => |ArrayTypeInfo| { |
| 1754 | for (values) |value_to_bind, index| { | 1758 | for (values) |value_to_bind, index| { |
| 1755 | try self.bindField(ArrayTypeInfo.child, options, "", @intCast(c_int, index), value_to_bind); | 1759 | try self.bindField(ArrayTypeInfo.child, options, "unknown", @intCast(c_int, index), value_to_bind); |
| 1756 | } | 1760 | } |
| 1757 | }, | 1761 | }, |
| 1758 | else => @compileError("Unsupported type for values: " ++ @typeName(StructType)), | 1762 | else => @compileError("Unsupported type for values: " ++ @typeName(StructType)), |