summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sqlite.zig22
1 files changed, 9 insertions, 13 deletions
diff --git a/sqlite.zig b/sqlite.zig
index f734d54..4bbc650 100644
--- a/sqlite.zig
+++ b/sqlite.zig
@@ -1489,19 +1489,15 @@ pub fn Statement(comptime opts: StatementOptions, comptime query: ParsedQuery) t
1489 1489
1490 inline for (StructTypeInfo.fields) |struct_field, _i| { 1490 inline for (StructTypeInfo.fields) |struct_field, _i| {
1491 const bind_marker = query.bind_markers[_i]; 1491 const bind_marker = query.bind_markers[_i];
1492 switch (bind_marker) { 1492 if (bind_marker.typed) |typ| {
1493 .Typed => |typ| { 1493 const FieldTypeInfo = @typeInfo(struct_field.field_type);
1494 const FieldTypeInfo = @typeInfo(struct_field.field_type); 1494 switch (FieldTypeInfo) {
1495 switch (FieldTypeInfo) { 1495 .Struct, .Enum, .Union => comptime assertMarkerType(
1496 .Struct, .Enum, .Union => comptime assertMarkerType( 1496 if (@hasDecl(struct_field.field_type, "BaseType")) struct_field.field_type.BaseType else struct_field.field_type,
1497 if (@hasDecl(struct_field.field_type, "BaseType")) struct_field.field_type.BaseType else struct_field.field_type, 1497 typ,
1498 typ, 1498 ),
1499 ), 1499 else => comptime assertMarkerType(struct_field.field_type, typ),
1500 else => comptime assertMarkerType(struct_field.field_type, typ), 1500 }
1501 }
1502 },
1503
1504 .Untyped => {},
1505 } 1501 }
1506 } 1502 }
1507 1503