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
sqlite query with fallback non null value from argument #3421
Comments
With pure SQL this is impossible I think. And the syntax has to be unambiguous, this is a problem. For example using |
What if we were to allow: CAST(:backgroundRefreshInterval NOT NULL) With #3431 |
Hm, on the one hand I like the sql like syntax, on the other hand I dislike the sql like syntax because it is (invalid) sql and with sql you still have the limited sql types. |
|
Bonus: it is easily to remove the kotlin expression for schemacrawler or dump sql schema: https://regex101.com/r/N4wKoq/1 |
Another fun one:
Where columns are defined as:
so I'd expect |
I will create another issue... Background: Inferring only uses the sql types, not the actual column definition. |
I have the following two tables:
I wrote the following query:
I want to get a
backgroundRefreshInterval
, either from the channel if present, otherwise from the directory if present and if both are null, I want to have a non-null default value that I pass into the query.The problem is that sqldelight infers the type to be of
Long?
, how can I tell sqldelight to make this non null?The text was updated successfully, but these errors were encountered: