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
/Volumes/dev/JakeWharton/thing/src/main/sqldelight/com/jakewharton/thing/db/conversations.sq: (10, 8): No column found with name LOCALTIMESTAMP
09 INSERT INTO conversations(created_at, updated_at)
10 VALUES (LOCALTIMESTAMP, LOCALTIMESTAMP)
^^^^^^^^^^^^^^
11 RETURNING id
/Volumes/dev/JakeWharton/thing/src/main/sqldelight/com/jakewharton/thing/db/conversations.sq: (10, 24): No column found with name LOCALTIMESTAMP
09 INSERT INTO conversations(created_at, updated_at)
10 VALUES (LOCALTIMESTAMP, LOCALTIMESTAMP)
^^^^^^^^^^^^^^
11 RETURNING id
The text was updated successfully, but these errors were encountered:
Recognizing them without the parentheses only works with custom tokens. The same for the better error message, we need to "know" if you want to refer to a column or to the function. LOCALTIMESTAMP is a keyword and we should add these keywords too.
CREATETABLEfoo(id INT);
SELECT LOCALTIMESTAMP, id FROM foo;
IntelliJ also warns you:
BTW DB2 is even worse, eg: SELECT CURRENT DATE; :)
SQLDelight Version
2.0.0-alpha04
SQLDelight Dialect
postgresql
Describe the Bug
This query fails:
This one succeeds:
Can we make the former work? Or at least have an error message saying it has to be executed as a function.
Note, there are a bunch of these: https://www.postgresql.org/docs/current/functions-datetime.html#FUNCTIONS-DATETIME-CURRENT
Stacktrace
The text was updated successfully, but these errors were encountered: