New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PostgreSQL is missing function for DATE_TRUNC
#3407
Comments
That's impossible, I added it :D #3295 |
What is the type of
According to the docs, timestamp, timestamp with time zone and interval are supported:
https://www.postgresql.org/docs/14/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC Line 88 in 500d5c1
|
I found the error. The parameter of date_trunc isn't a column, but a bind parameter (PrimitiveType.Argument), so the sqldelight compiler has to infer the Kotlin type. But this is impossible, if the function supports multiple types. @kevincianfarini as a workaround use |
Oh nice. Thanks! Let me know if there's anything I can do to help in the meantime. |
SQLDelight Version
2.0.0-alpha03
SQLDelight Dialect
PostgreSQL
Describe the Bug
When trying to use the
DATE_TRUNC
function like shown below.I get the following error when trying to run the
generateMainDatabaseInterface
gradle task.Stacktrace
The text was updated successfully, but these errors were encountered: