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
I have a query where I return fields from join'ed tables. Fields from joined table considered as nullable, and I want to return only not nullable values. So I want to convert Boolean? to Boolean with IFNULL(field, 0) or COALESCE(field, 0). But instead of Boolean I'm getting Long even when I'm specifying AS Boolean.
Tables:
CREATETABLENotification (
id TEXTPRIMARY KEYNOT NULL,
);
CREATETABLENotificationReadStatus (
id TEXTPRIMARY KEYNOT NULL,
read INTEGERASBooleanNOT NULL
);
Query:
SELECTNotification.id,
COALESCE(NotificationReadStatus.read, 0) ASBoolean-- OR
IFNULL(NotificationReadStatus.read, 0) ASBooleanFROM Notification
LEFT JOIN NotificationReadStatus ONNotification.id==NotificationReadStatus.id;
SQLDelight Version
2.0.2
Operating System
macOS 14.6.1
Gradle Version
8.8
Kotlin Version
1.9.24
Dialect
sqlite-3-18
AGP Version
8.4.2
Describe the Bug
I have a query where I return fields from join'ed tables. Fields from joined table considered as nullable, and I want to return only not nullable values. So I want to convert
Boolean?
toBoolean
withIFNULL(field, 0)
orCOALESCE(field, 0)
. But instead ofBoolean
I'm gettingLong
even when I'm specifyingAS Boolean
.Tables:
Query:
Think it's related to #3572.
Stacktrace
No response
Gradle Build Script
No response
The text was updated successfully, but these errors were encountered: