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
it would be nice if sqldelight was able to infer the type of :refreshOnStartUp:
CREATE TABLE directory (
id TEXT NOT NULL PRIMARY KEY,
refreshOnStartUp INTEGER AS Boolean
);
CREATE TABLE channel (
id TEXT NOT NULL PRIMARY KEY,
refreshOnStartUp INTEGER AS Boolean,
directoryId TEXT
);
myQuery:
SELECT channel.*
FROM channel
LEFT JOIN directory
ON channel.directoryId = directory.id
WHERE COALESCE(channel.refreshOnStartUp, directory.refreshOnStartUp, :refreshOnStartUp) = 1
;
Currently, one need to use CAST: CAST(:refreshOnStartUp AS INTEGER).
Stacktrace
No response
Gradle Build Script
No response
The text was updated successfully, but these errors were encountered:
Hm, I think, should it only be possible to infer the kotlin type, if all other parameters of the function have the same type: MAX(Int, Int, ARG) = > Arg = Int. So MAX(Int, Text, ARG) = > error would result into an error, because the type is ambiguous.
SQLDelight Version
2.0.0-alpha03
Operating System
Mac
Gradle Version
7.5.1
Kotlin Version
1.7.10
Dialect
sqlite
AGP Version
7.2.2
Describe the Bug
From: #3413 (comment)
it would be nice if sqldelight was able to infer the type of
:refreshOnStartUp
:Currently, one need to use
CAST
:CAST(:refreshOnStartUp AS INTEGER)
.Stacktrace
No response
Gradle Build Script
No response
The text was updated successfully, but these errors were encountered: