diff --git a/src/insert.zig b/src/insert.zig index 55e00a7..fbe1c4a 100644 --- a/src/insert.zig +++ b/src/insert.zig @@ -196,14 +196,14 @@ pub fn RepositoryInsert(comptime Model: type, comptime TableShape: type, comptim } /// Set selected columns for RETURNING clause. - pub fn returningColumns(self: *Self, _select: []const []const u8) void { + pub fn returningColumns(self: *Self, _select: []const []const u8) !void { if (_select.len == 0) { return ZrmError.AtLeastOneSelectionRequired; } self.returning(.{ // Join selected columns. - .sql = std.mem.join(self.arena.allocator(), ", ", _select), + .sql = try std.mem.join(self.arena.allocator(), ", ", _select), .params = &[_]_sql.RawQueryParameter{}, // No parameters. }); } diff --git a/src/update.zig b/src/update.zig index 29f50fb..1bf922e 100644 --- a/src/update.zig +++ b/src/update.zig @@ -153,14 +153,14 @@ pub fn RepositoryUpdate(comptime Model: type, comptime TableShape: type, comptim } /// Set selected columns for RETURNING clause. - pub fn returningColumns(self: *Self, _select: []const []const u8) void { + pub fn returningColumns(self: *Self, _select: []const []const u8) !void { if (_select.len == 0) { return ZrmError.AtLeastOneSelectionRequired; } self.returning(.{ // Join selected columns. - .sql = std.mem.join(self.arena.allocator(), ", ", _select), + .sql = try std.mem.join(self.arena.allocator(), ", ", _select), .params = &[_]_sql.RawQueryParameter{}, // No parameters. }); }