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

Enumeration - 2 #261

Merged
merged 17 commits into from
Oct 27, 2021
Merged

Enumeration - 2 #261

merged 17 commits into from
Oct 27, 2021

Conversation

billy1624
Copy link
Member

@billy1624 billy1624 commented Oct 20, 2021

@billy1624 billy1624 self-assigned this Oct 20, 2021
@billy1624 billy1624 changed the base branch from master to active-enum October 20, 2021 10:54
@tyt2y3 tyt2y3 changed the title Enumeration - 1 Enumeration - 2 Oct 20, 2021
@billy1624 billy1624 linked an issue Oct 21, 2021 that may be closed by this pull request
3 tasks
src/entity/column.rs Outdated Show resolved Hide resolved
src/query/insert.rs Outdated Show resolved Hide resolved
src/query/select.rs Outdated Show resolved Hide resolved
src/query/update.rs Outdated Show resolved Hide resolved
@@ -34,6 +34,7 @@ pub enum ColumnType {
JsonBinary,
Custom(String),
Uuid,
Enum(String, Vec<String>),
Copy link
Member Author

Choose a reason for hiding this comment

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

And I defined the new column type Enum not only with enum name but enum variants.

Comment on lines +37 to +40
#[sea_orm(
rs_type = "String",
db_type = r#"Enum("tea".to_owned(), vec!["EverydayTea".to_owned(), "BreakfastTea".to_owned()])"#
)]
Copy link
Member Author

Choose a reason for hiding this comment

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

Which is quite verbose when using it...

@billy1624 billy1624 mentioned this pull request Oct 26, 2021
1 task
@billy1624 billy1624 marked this pull request as ready for review October 27, 2021 05:12
@billy1624 billy1624 merged commit 70e76eb into active-enum Oct 27, 2021
@billy1624 billy1624 deleted the active-enum-1 branch October 27, 2021 05:21
@billy1624 billy1624 mentioned this pull request Nov 19, 2021
arpancodes pushed a commit to arpancodes/sea-orm that referenced this pull request Apr 8, 2022
Support multiple tables in the select from
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.

Enumeration
1 participant