diff options
| author | 2025-01-21 00:06:25 +0100 | |
|---|---|---|
| committer | 2025-01-21 00:06:25 +0100 | |
| commit | 0155a63a7efb64da6c535ee31e92ec421712951a (patch) | |
| tree | a6e2f11cf1c0a6e2130eeedcbfb0ae4afb37ba17 /sqlite.zig | |
| parent | build: disable mips in tests (diff) | |
| parent | Update some missed Int -> int (diff) | |
| download | zig-sqlite-0155a63a7efb64da6c535ee31e92ec421712951a.tar.gz zig-sqlite-0155a63a7efb64da6c535ee31e92ec421712951a.tar.xz zig-sqlite-0155a63a7efb64da6c535ee31e92ec421712951a.zip | |
Merge pull request #175 from MatthiasPortzel/master
Diffstat (limited to '')
| -rw-r--r-- | sqlite.zig | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1463,7 +1463,7 @@ pub fn Iterator(comptime Type: type) type { | |||
| 1463 | 1463 | ||
| 1464 | return std.meta.stringToEnum(FieldType, inner_value) orelse FieldType.default; | 1464 | return std.meta.stringToEnum(FieldType, inner_value) orelse FieldType.default; |
| 1465 | } | 1465 | } |
| 1466 | if (@typeInfo(FieldType.BaseType) == .Int) { | 1466 | if (@typeInfo(FieldType.BaseType) == .int) { |
| 1467 | return @enumFromInt(@as(TI.tag_type, @intCast(inner_value))); | 1467 | return @enumFromInt(@as(TI.tag_type, @intCast(inner_value))); |
| 1468 | } | 1468 | } |
| 1469 | @compileError("enum column " ++ @typeName(FieldType) ++ " must have a BaseType of either string or int"); | 1469 | @compileError("enum column " ++ @typeName(FieldType) ++ " must have a BaseType of either string or int"); |
| @@ -1680,7 +1680,7 @@ pub const DynamicStatement = struct { | |||
| 1680 | .@"enum" => { | 1680 | .@"enum" => { |
| 1681 | if (comptime isZigString(FieldType.BaseType)) { | 1681 | if (comptime isZigString(FieldType.BaseType)) { |
| 1682 | try self.bindField(FieldType.BaseType, options, field_name, i, @tagName(field)); | 1682 | try self.bindField(FieldType.BaseType, options, field_name, i, @tagName(field)); |
| 1683 | } else if (@typeInfo(FieldType.BaseType) == .Int) { | 1683 | } else if (@typeInfo(FieldType.BaseType) == .int) { |
| 1684 | try self.bindField(FieldType.BaseType, options, field_name, i, @intFromEnum(field)); | 1684 | try self.bindField(FieldType.BaseType, options, field_name, i, @intFromEnum(field)); |
| 1685 | } else { | 1685 | } else { |
| 1686 | @compileError("enum column " ++ @typeName(FieldType) ++ " must have a BaseType of either string or int to bind"); | 1686 | @compileError("enum column " ++ @typeName(FieldType) ++ " must have a BaseType of either string or int to bind"); |