-
-
Notifications
You must be signed in to change notification settings - Fork 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
Enumeration #258
Enumeration #258
Conversation
billy1624
commented
Oct 19, 2021
•
edited
Loading
edited
- Resolve Enumeration #252
- Related to Custom type support in Postgres sea-query#131
- Depends on Cast expression as custom type sea-query#170
Oh we have Derive macro already? Great |
Yep |
Btw... I will try to document all newly added types starting from this PR. Plz check the docs and give me some feedback on it @tyt2y3 |
Is there a test case for not using a Derive macro? |
75d6895
to
e2c8d32
Compare
Sorry for creating the conflicts |
No worries, I will resolve it |
I think we are pretty much done Schema Definition sea-orm/tests/common/features/schema.rs Lines 128 to 163 in bb78a1d
Entity Definition sea-orm/tests/common/features/active_enum.rs Lines 1 to 43 in bb78a1d
Action sea-orm/tests/active_enum_tests.rs Lines 1 to 68 in bb78a1d
|
Ooh I really like the look of this. I had a bried look at the linked code snippets you shared @tyt2y3 and it looks really explicit. I like how you can use an enum as an integer too! |
Just tried it on a complex project and it mostly worked flawlessly, awesome work ! Two things I noticed:
|
Nice catch! Fixed on f64f1e9 |
After second thought, it only make sense to cast string to enum type inside |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been a long road