Skip to content

Commit 9f2e2c0

Browse files
Tom Weissido50
authored andcommitted
Add support for "array_cat" function
This commit contains code that adds support for the "array_cat" function used during the update statement. This function concatenate two arrays.
1 parent d65c674 commit 9f2e2c0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

update.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,3 +274,12 @@ func ArrayRemove(name string, value interface{}) UpdateFunction {
274274
Arguments: []interface{}{Indirect(name), value},
275275
}
276276
}
277+
278+
// ArrayConcat is an UpdateFunction for calling PostgreSQL's
279+
// array_cat function during an update.
280+
func ArrayConcat(name string, value interface{}) UpdateFunction {
281+
return UpdateFunction{
282+
Name: "array_cat",
283+
Arguments: []interface{}{Indirect(name), value},
284+
}
285+
}

0 commit comments

Comments
 (0)