From 2f336c729bc0203c9875919927a54b40e6408558 Mon Sep 17 00:00:00 2001 From: thisLight Date: Wed, 13 Oct 2021 10:16:30 +0800 Subject: DynamicStatement.bindField: fix incompatible if branches for optionals --- sqlite.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sqlite.zig') diff --git a/sqlite.zig b/sqlite.zig index b8676aa..06ade5d 100644 --- a/sqlite.zig +++ b/sqlite.zig @@ -1161,7 +1161,7 @@ pub const DynamicStatement = struct { else => @compileError("cannot bind field " ++ field_name ++ " of type array of " ++ @typeName(arr.child)), }, .Optional => |opt| if (field) |non_null_field| { - try self.bindField(opt.child, options, field_name, i, non_null_field); + return try self.bindField(opt.child, options, field_name, i, non_null_field); } else optional_null: { break :optional_null c.sqlite3_bind_null(self.stmt, column); }, -- cgit v1.2.3