diff options
| author | 2021-10-13 10:16:30 +0800 | |
|---|---|---|
| committer | 2021-10-13 10:16:30 +0800 | |
| commit | 2f336c729bc0203c9875919927a54b40e6408558 (patch) | |
| tree | c662d1ff6f3d0851d3a0d3ef34767638abe59664 | |
| parent | sqlite: some doc fixes (diff) | |
| download | zig-sqlite-2f336c729bc0203c9875919927a54b40e6408558.tar.gz zig-sqlite-2f336c729bc0203c9875919927a54b40e6408558.tar.xz zig-sqlite-2f336c729bc0203c9875919927a54b40e6408558.zip | |
DynamicStatement.bindField: fix incompatible if branches for optionals
| -rw-r--r-- | sqlite.zig | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -1161,7 +1161,7 @@ pub const DynamicStatement = struct { | |||
| 1161 | else => @compileError("cannot bind field " ++ field_name ++ " of type array of " ++ @typeName(arr.child)), | 1161 | else => @compileError("cannot bind field " ++ field_name ++ " of type array of " ++ @typeName(arr.child)), |
| 1162 | }, | 1162 | }, |
| 1163 | .Optional => |opt| if (field) |non_null_field| { | 1163 | .Optional => |opt| if (field) |non_null_field| { |
| 1164 | try self.bindField(opt.child, options, field_name, i, non_null_field); | 1164 | return try self.bindField(opt.child, options, field_name, i, non_null_field); |
| 1165 | } else optional_null: { | 1165 | } else optional_null: { |
| 1166 | break :optional_null c.sqlite3_bind_null(self.stmt, column); | 1166 | break :optional_null c.sqlite3_bind_null(self.stmt, column); |
| 1167 | }, | 1167 | }, |