diff options
Diffstat (limited to '')
| -rw-r--r-- | sqlite.zig | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1102,10 +1102,10 @@ pub fn Statement(comptime opts: StatementOptions, comptime query: ParsedQuery) t | |||
| 1102 | .Null => _ = c.sqlite3_bind_null(self.stmt, column), | 1102 | .Null => _ = c.sqlite3_bind_null(self.stmt, column), |
| 1103 | .Enum => { | 1103 | .Enum => { |
| 1104 | if (comptime std.meta.trait.isZigString(FieldType.BaseType)) { | 1104 | if (comptime std.meta.trait.isZigString(FieldType.BaseType)) { |
| 1105 | return self.bindField(FieldType.BaseType, field_name, column, @tagName(field)); | 1105 | return self.bindField(FieldType.BaseType, field_name, i, @tagName(field)); |
| 1106 | } | 1106 | } |
| 1107 | if (@typeInfo(FieldType.BaseType) == .Int) { | 1107 | if (@typeInfo(FieldType.BaseType) == .Int) { |
| 1108 | return self.bindField(FieldType.BaseType, field_name, column, @enumToInt(field)); | 1108 | return self.bindField(FieldType.BaseType, field_name, i, @enumToInt(field)); |
| 1109 | } | 1109 | } |
| 1110 | @compileError("enum column " ++ @typeName(FieldType) ++ " must have a BaseType of either string or int to bind"); | 1110 | @compileError("enum column " ++ @typeName(FieldType) ++ " must have a BaseType of either string or int to bind"); |
| 1111 | }, | 1111 | }, |