diff options
Diffstat (limited to 'sqlite.zig')
| -rw-r--r-- | sqlite.zig | 8 |
1 files changed, 7 insertions, 1 deletions
| @@ -1653,7 +1653,13 @@ pub const DynamicStatement = struct { | |||
| 1653 | } | 1653 | } |
| 1654 | }, | 1654 | }, |
| 1655 | .Struct => { | 1655 | .Struct => { |
| 1656 | try self.bindField(FieldType.BaseType, options, field_name, i, try field.bindField(options.allocator)); | 1656 | if (!comptime std.meta.trait.hasFn("bindField")(FieldType)) { |
| 1657 | @compileError("cannot bind field " ++ field_name ++ " of type " ++ @typeName(FieldType) ++ ", consider implementing the bindField() method"); | ||
| 1658 | } | ||
| 1659 | |||
| 1660 | const field_value = try field.bindField(options.allocator); | ||
| 1661 | |||
| 1662 | try self.bindField(FieldType.BaseType, options, field_name, i, field_value); | ||
| 1657 | }, | 1663 | }, |
| 1658 | else => @compileError("cannot bind field " ++ field_name ++ " of type " ++ @typeName(FieldType)), | 1664 | else => @compileError("cannot bind field " ++ field_name ++ " of type " ++ @typeName(FieldType)), |
| 1659 | }, | 1665 | }, |