diff options
| author | 2022-12-19 00:32:59 -0800 | |
|---|---|---|
| committer | 2022-12-19 13:00:05 +0100 | |
| commit | 9f26b5b18088fe55fa3fdea3c21af6edbda23c9c (patch) | |
| tree | 56b7268a5665f44025aeba1377d0c44c949ed1a9 /sqlite.zig | |
| parent | fix for latest zig (diff) | |
| download | zig-sqlite-9f26b5b18088fe55fa3fdea3c21af6edbda23c9c.tar.gz zig-sqlite-9f26b5b18088fe55fa3fdea3c21af6edbda23c9c.tar.xz zig-sqlite-9f26b5b18088fe55fa3fdea3c21af6edbda23c9c.zip | |
Update for latest Zig builtin renames
See https://github.com/ziglang/zig/pull/13930
Diffstat (limited to '')
| -rw-r--r-- | sqlite.zig | 14 |
1 files changed, 7 insertions, 7 deletions
| @@ -1398,7 +1398,7 @@ pub fn Iterator(comptime Type: type) type { | |||
| 1398 | inline for (@typeInfo(Type).Struct.fields) |field, _i| { | 1398 | inline for (@typeInfo(Type).Struct.fields) |field, _i| { |
| 1399 | const i = @as(usize, _i); | 1399 | const i = @as(usize, _i); |
| 1400 | 1400 | ||
| 1401 | const ret = try self.readField(field.field_type, options, i); | 1401 | const ret = try self.readField(field.type, options, i); |
| 1402 | 1402 | ||
| 1403 | @field(value, field.name) = ret; | 1403 | @field(value, field.name) = ret; |
| 1404 | } | 1404 | } |
| @@ -1673,7 +1673,7 @@ pub const DynamicStatement = struct { | |||
| 1673 | if (field_tag == this_tag) { | 1673 | if (field_tag == this_tag) { |
| 1674 | const field_value = @field(field, u_field.name); | 1674 | const field_value = @field(field, u_field.name); |
| 1675 | 1675 | ||
| 1676 | try self.bindField(u_field.field_type, options, u_field.name, i, field_value); | 1676 | try self.bindField(u_field.type, options, u_field.name, i, field_value); |
| 1677 | } | 1677 | } |
| 1678 | } | 1678 | } |
| 1679 | } else { | 1679 | } else { |
| @@ -1726,9 +1726,9 @@ pub const DynamicStatement = struct { | |||
| 1726 | 1726 | ||
| 1727 | const i = sqlite3BindParameterIndex(self.stmt, struct_field.name); | 1727 | const i = sqlite3BindParameterIndex(self.stmt, struct_field.name); |
| 1728 | if (i >= 0) { | 1728 | if (i >= 0) { |
| 1729 | try self.bindField(struct_field.field_type, options, struct_field.name, i, field_value); | 1729 | try self.bindField(struct_field.type, options, struct_field.name, i, field_value); |
| 1730 | } else { | 1730 | } else { |
| 1731 | try self.bindField(struct_field.field_type, options, struct_field.name, struct_field_i, field_value); | 1731 | try self.bindField(struct_field.type, options, struct_field.name, struct_field_i, field_value); |
| 1732 | } | 1732 | } |
| 1733 | } | 1733 | } |
| 1734 | }, | 1734 | }, |
| @@ -2028,13 +2028,13 @@ pub fn Statement(comptime opts: StatementOptions, comptime query: anytype) type | |||
| 2028 | inline for (StructTypeInfo.fields) |struct_field, _i| { | 2028 | inline for (StructTypeInfo.fields) |struct_field, _i| { |
| 2029 | const bind_marker = query.bind_markers[_i]; | 2029 | const bind_marker = query.bind_markers[_i]; |
| 2030 | if (bind_marker.typed) |typ| { | 2030 | if (bind_marker.typed) |typ| { |
| 2031 | const FieldTypeInfo = @typeInfo(struct_field.field_type); | 2031 | const FieldTypeInfo = @typeInfo(struct_field.type); |
| 2032 | switch (FieldTypeInfo) { | 2032 | switch (FieldTypeInfo) { |
| 2033 | .Struct, .Enum, .Union => comptime assertMarkerType( | 2033 | .Struct, .Enum, .Union => comptime assertMarkerType( |
| 2034 | if (@hasDecl(struct_field.field_type, "BaseType")) struct_field.field_type.BaseType else struct_field.field_type, | 2034 | if (@hasDecl(struct_field.type, "BaseType")) struct_field.type.BaseType else struct_field.type, |
| 2035 | typ, | 2035 | typ, |
| 2036 | ), | 2036 | ), |
| 2037 | else => comptime assertMarkerType(struct_field.field_type, typ), | 2037 | else => comptime assertMarkerType(struct_field.type, typ), |
| 2038 | } | 2038 | } |
| 2039 | } | 2039 | } |
| 2040 | } | 2040 | } |