Skip to content

Commit

Permalink
Merge pull request #175 from MatthiasPortzel/master
Browse files Browse the repository at this point in the history
  • Loading branch information
vrischmann authored Jan 20, 2025
2 parents 18c42fb + 8b6621a commit 0155a63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqlite.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ pub fn Iterator(comptime Type: type) type {

return std.meta.stringToEnum(FieldType, inner_value) orelse FieldType.default;
}
if (@typeInfo(FieldType.BaseType) == .Int) {
if (@typeInfo(FieldType.BaseType) == .int) {
return @enumFromInt(@as(TI.tag_type, @intCast(inner_value)));
}
@compileError("enum column " ++ @typeName(FieldType) ++ " must have a BaseType of either string or int");
Expand Down Expand Up @@ -1680,7 +1680,7 @@ pub const DynamicStatement = struct {
.@"enum" => {
if (comptime isZigString(FieldType.BaseType)) {
try self.bindField(FieldType.BaseType, options, field_name, i, @tagName(field));
} else if (@typeInfo(FieldType.BaseType) == .Int) {
} else if (@typeInfo(FieldType.BaseType) == .int) {
try self.bindField(FieldType.BaseType, options, field_name, i, @intFromEnum(field));
} else {
@compileError("enum column " ++ @typeName(FieldType) ++ " must have a BaseType of either string or int to bind");
Expand Down

0 comments on commit 0155a63

Please sign in to comment.