Skip to content

remove literal expression error #520

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

Merged
merged 1 commit into from
Jun 22, 2023

Conversation

griffio
Copy link
Contributor

@griffio griffio commented Jun 20, 2023

closes #514

Removing this restriction allows literals like date/time to be used in criteria queries.

The following is valid Sql that should be allowed 💯

UPDATE test
SET date1 = CURRENT_TIMESTAMP,
    date2 = CURRENT_TIME,
    date3 = CURRENT_TIMESTAMP
WHERE date1 > CURRENT_TIME;

⚠️ I have tested this with SqlDelight using the publishLocalToMaven with the current snapshot. 📷
However, SqlDelight is using sql-psi 0.4.3 and this current 0.5.0-Snapshot is not compatible (as expected semantically) with SqlDelight. e.g https://github.com/cashapp/sqldelight/blob/master/sqldelight-compiler/src/main/kotlin/app/cash/sqldelight/core/SqlDelightEnvironment.kt#L75 and https://github.com/AlecStrong/sql-psi/blob/master/core/src/main/kotlin/com/alecstrong/sql/psi/core/SqlCoreEnvironment.kt#L68

Either changes should be made on top of 0.4.3 or wait for 0.5.0 to be integrated into SqlDelight ⚔️

Found this 0.5.0 release to be integrated with SqlDelight 🏒 🥅 and appears to fix the breaking differences
sqldelight/sqldelight#4283 (comment) - so can wait for that to be merged 🧜

@hfhbd hfhbd merged commit e1d0018 into sqldelight:master Jun 22, 2023
@griffio griffio deleted the remove-literal-expression-error branch June 22, 2023 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test fixture failure prevents override of Mixin
2 participants