Skip to content

Commit 2513c49

Browse files
committed
More tests
1 parent e02ebaf commit 2513c49

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

tests/update/test_update_arrays.nim

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import
1616

1717

1818

19-
suite "arrays":
19+
suite "update - arrays":
2020

2121
test "[manual] update arrays - ARRAY_REMOVE":
2222

@@ -38,6 +38,24 @@ suite "arrays":
3838
check querycompare(q, sql("UPDATE table SET project_ids = ARRAY_REMOVE(project_ids, ?) WHERE id = ?"))
3939

4040

41+
42+
43+
suite "update - arrays where cond ANY":
44+
45+
test "array":
46+
47+
let q = sqlUpdate(
48+
"table",
49+
["name"],
50+
["some_ids = ANY(?::INT[])"],
51+
)
52+
check querycompare(q, sql("UPDATE table SET name = ? WHERE some_ids = ANY(?::INT[])"))
53+
54+
55+
56+
57+
suite "update - arrays dedicated":
58+
4159
test "[dedicated] update array - ARRAY_REMOVE":
4260

4361
let q = sqlUpdateArrayRemove(

0 commit comments

Comments
 (0)