From e7ef940e246a8b60f956513cadb430d09150d868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Hol=C3=BD?= Date: Thu, 4 Jul 2024 17:13:24 +0200 Subject: [PATCH] Update pg-ops/- docstring wrt array input The `-` operator also works for arrays: ```sql select '{"a":1,"b":2,"c":3}' - array['a','b']; -- => {c:3} select '["a","b","c"]'::jsonb - array['a','b'] -- => ["c"] ``` --- src/honey/sql/pg_ops.cljc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/honey/sql/pg_ops.cljc b/src/honey/sql/pg_ops.cljc index 247d75d..cf7a4fc 100644 --- a/src/honey/sql/pg_ops.cljc +++ b/src/honey/sql/pg_ops.cljc @@ -49,6 +49,7 @@ (def - "The - operator: - text value: deletes a key (and its value) from a JSON object, or matching string value(s) from a JSON array + - text[] array value: as above, but for all the provided keys - int value: deletes the array element with specified index (negative integers count from the end)" :-) (def hash- "The #- operator - deletes the field or array element at the specified path, where path elements can be either field keys or array indexes." :#-)