Closed mmollick closed 1 month ago
Describe the bug I'm seeing syntax errors for both ?| and ?& operators.
?|
?&
Database Engine Postgres
To Reproduce
Node: v21.7.3 Package: v5.2.0 (also tested against latest commit from main)
v21.7.3
v5.2.0
main
For SELECT id, collection::jsonb ?| array['val1', 'val2'] FROM instances I get the following error:
SELECT id, collection::jsonb ?| array['val1', 'val2'] FROM instances
SyntaxError: Expected "!", "$", "$$", "'", "(", "*", "+", "-", "--", ".", "/*", ":", "@", "@@", "ARRAY", "ARRAY_AGG", "AVG", "CASE", "CAST", "COUNT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "DATE", "DATETIME", "DENSE_RANK", "E", "EXISTS", "EXTRACT", "FALSE", "FIRST_VALUE", "GROUP_CONCAT", "INTERVAL", "LAG", "LAST_VALUE", "LEAD", "MAX", "MIN", "NOT", "NTH_VALUE", "NTILE", "NULL", "RANK", "ROW_NUMBER", "SELECT", "SESSION_USER", "STRING_AGG", "SUM", "SYSTEM_USER", "TIME", "TIMESTAMP", "TRUE", "USER", "WITH", "\"", "`", "crosstab", "json_to_record", "json_to_recordset", "jsonb_to_record", "jsonb_to_recordset", "mode", "now", "percentile_cont", "percentile_disc", "trim", "~", [ \t\n\r], [0-9], or [A-Za-z_一-龥] but "|" found
For SELECT id, collection::jsonb ?& array['val1', 'val2'] FROM instances I get the following error:
SELECT id, collection::jsonb ?& array['val1', 'val2'] FROM instances
SyntaxError: Expected "!", "$", "$$", "'", "(", "*", "+", "-", "--", ".", "/*", ":", "@", "@@", "ARRAY", "ARRAY_AGG", "AVG", "CASE", "CAST", "COUNT", "CURRENT_DATE", "CURRENT_TIME", "CURRENT_TIMESTAMP", "CURRENT_USER", "DATE", "DATETIME", "DENSE_RANK", "E", "EXISTS", "EXTRACT", "FALSE", "FIRST_VALUE", "GROUP_CONCAT", "INTERVAL", "LAG", "LAST_VALUE", "LEAD", "MAX", "MIN", "NOT", "NTH_VALUE", "NTILE", "NULL", "RANK", "ROW_NUMBER", "SELECT", "SESSION_USER", "STRING_AGG", "SUM", "SYSTEM_USER", "TIME", "TIMESTAMP", "TRUE", "USER", "WITH", "\"", "`", "crosstab", "json_to_record", "json_to_recordset", "jsonb_to_record", "jsonb_to_recordset", "mode", "now", "percentile_cont", "percentile_disc", "trim", "~", [ \t\n\r], [0-9], or [A-Za-z_一-龥] but "&" found.
Expected behavior That the operator successfully parses into the AST.
Screenshots N/A
Additional context N/A
Describe the bug I'm seeing syntax errors for both
?|
and?&
operators.Database Engine Postgres
To Reproduce
Node:
v21.7.3
Package:v5.2.0
(also tested against latest commit frommain
)For
SELECT id, collection::jsonb ?| array['val1', 'val2'] FROM instances
I get the following error:For
SELECT id, collection::jsonb ?& array['val1', 'val2'] FROM instances
I get the following error:Expected behavior That the operator successfully parses into the AST.
Screenshots N/A
Additional context N/A