Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MySQL: support mysql types for binary expr and sum #4254

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 10, 2023

Conversation

shellderp
Copy link
Contributor

@shellderp shellderp commented Jun 9, 2023

Simple binary expressions like bigint*bigint did not work.

sum(bigint) previously returned REAL, while in reality it returns INTEGER except when REAL is passed in

Added tests for min/max while I was here

@shellderp shellderp marked this pull request as ready for review June 9, 2023 20:40
@@ -136,3 +175,7 @@ class MySqlTypeResolver(
)
}
}

private fun PsiElement.childOfType(types: TokenSet): PsiElement? {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is copied from :sqldelight-compiler. I could add a dep instead but I'm not sure thats desirable.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option: Move it from compiler into dialect. But I am fine with this copy here.

@hfhbd hfhbd enabled auto-merge (squash) June 10, 2023 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants