You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE TABLE IF NOT EXISTS business(
businessId SERIAL PRIMARY KEY,
name TEXT NOT NULL,
locations TEXT[] NOT NULL
);
i am unable to perform a query to search for businesses that have a keyword in their location:
SELECT *
FROM business
WHERE EXISTS (
SELECT 1
FROM unnest(locations) as loc
WHERE lower(loc) LIKE '%' || LOWER(:query) || '%'
);
this gives me the error
/Users/wreedamz/d/sql-delight-blank/src/main/sqldelight/com/foo/Student.sq: (7, 15): ')', ',', '.', <compound operator real>, <join operator real>, <table alias real>, AS, FOR, GROUP, HAVING, INDEXED, LIMIT, NOT, OFFSET, ORDER or WHERE expected, got '('
3 SELECT *
4 FROM business
5 WHERE EXISTS (
6 SELECT 1
7 FROM unnest(locations) as loc
^
8 WHERE lower(loc) LIKE '%' || LOWER(:query) || '%'
9 )
SQLDelight Version
2.0.2
SQLDelight Dialect
postgresql
Describe the Bug
given the schema
i am unable to perform a query to search for businesses that have a keyword in their location:
this gives me the error
sample repository here
Stacktrace
No response
The text was updated successfully, but these errors were encountered: