Skip to content
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

Case-sensitive enum type casts #789

Merged
merged 1 commit into from
Oct 4, 2024
Merged

Conversation

niklaskorz
Copy link
Contributor

@niklaskorz niklaskorz commented Jun 25, 2024

PR Info

Bug Fixes

  • Casting to an enum whose type name was declared case-sensitive does not crash anymore

Breaking Changes

  • Enum type casts are now case sensitive, so casting to SomeEnum will now cast to "SomeEnum" on PostgreSQL, while it previously casted to someenum.

@niklaskorz
Copy link
Contributor Author

This still has problems with arrays, as sea-orm constructs array types directly as {enum_name}[], making it hard to only quote the type name but not the array brackets from sea-query.

Copy link
Member

@tyt2y3 tyt2y3 left a comment

Choose a reason for hiding this comment

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

Thank you!

@tyt2y3 tyt2y3 merged commit a30b918 into SeaQL:master Oct 4, 2024
tyt2y3 pushed a commit that referenced this pull request Oct 5, 2024
Copy link

github-actions bot commented Oct 5, 2024

🎉 Released In 0.31.1 🎉

Thank you everyone for the contribution!
This feature is now available in the latest release. Now is a good time to upgrade!
Your participation is what makes us unique; your adoption is what drives us forward.
You can support SeaQL 🌊 by starring our repos, sharing our libraries and becoming a sponsor ⭐.

@mpyw
Copy link

mpyw commented Oct 9, 2024

@niklaskorz Please check the issue above. Thank you 🙇

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.

postgres: CAST($2 AS CaseSensitiveEnumType) enum type must be enquoted
3 participants