mirror of
https://github.com/parse-community/parse-server
synced 2026-08-09 13:03:18 +00:00
* removing inline sql. * Update index.js trying to fix indentation. * Update index.js commenting out console output for errors. * Rename json-object-set-key.sql to json-object-set-keys.sql * Update index.js * Update add-unique.sql correcting sql. * Update add.sql correcting sql. * Update contains-all.sql correcting sql. * Update contains.sql correcting sql. * Update remove.sql correcting sql. * Update json-object-set-keys.sql fixing sql reserved words.
12 lines
317 B
SQL
12 lines
317 B
SQL
CREATE OR REPLACE FUNCTION array_contains(
|
|
"array" jsonb,
|
|
"values" jsonb
|
|
)
|
|
RETURNS boolean
|
|
LANGUAGE sql
|
|
IMMUTABLE
|
|
STRICT
|
|
AS $function$
|
|
SELECT RES.CNT >= 1 FROM (SELECT COUNT(*) as CNT FROM jsonb_array_elements("array") as elt WHERE elt IN (SELECT jsonb_array_elements("values"))) as RES;
|
|
$function$;
|