summaryrefslogtreecommitdiff
path: root/sqlite.zig
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite.zig')
-rw-r--r--sqlite.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/sqlite.zig b/sqlite.zig
index fd52691..4500d8d 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -1726,9 +1726,9 @@ pub const DynamicStatement = struct {
1726 // 1726 //
1727 // If however there are no name bind markers then the behaviour will revert to using the field index in the struct, and the fields order must be correct. 1727 // If however there are no name bind markers then the behaviour will revert to using the field index in the struct, and the fields order must be correct.
1728 fn bind(self: *Self, options: anytype, values: anytype) !void { 1728 fn bind(self: *Self, options: anytype, values: anytype) !void {
1729 const StructType = @TypeOf(values); 1729 const Type = @TypeOf(values);
1730 1730
1731 switch (@typeInfo(StructType)) { 1731 switch (@typeInfo(Type)) {
1732 .Struct => |StructTypeInfo| { 1732 .Struct => |StructTypeInfo| {
1733 inline for (StructTypeInfo.fields) |struct_field, struct_field_i| { 1733 inline for (StructTypeInfo.fields) |struct_field, struct_field_i| {
1734 const field_value = @field(values, struct_field.name); 1734 const field_value = @field(values, struct_field.name);
@@ -1759,7 +1759,7 @@ pub const DynamicStatement = struct {
1759 try self.bindField(ArrayTypeInfo.child, options, "unknown", @intCast(c_int, index), value_to_bind); 1759 try self.bindField(ArrayTypeInfo.child, options, "unknown", @intCast(c_int, index), value_to_bind);
1760 } 1760 }
1761 }, 1761 },
1762 else => @compileError("Unsupported type for values: " ++ @typeName(StructType)), 1762 else => @compileError("Unsupported type for values: " ++ @typeName(Type)),
1763 } 1763 }
1764 } 1764 }
1765 1765