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

Add simple extra param for table create statement #611

Merged
merged 10 commits into from
Mar 19, 2023

Conversation

nrot
Copy link
Contributor

@nrot nrot commented Feb 25, 2023

PR Info

Closes

New Features

  • Add extra param for TableCreateStatement.

Changes

  • Added set_extra and get_extra for TableCreateStatement.
  • Added documentation with test example for set_extra

Discussions

let table = Table::create().table(Char::Table).set_extra(
 match () {
        #[cfg(feature = "postgres")]
        () => &"POSTGRES EXTRA",
        #[cfg(feature = "mysql")]
        () => &"MYSQL EXTRA",
        #[cfg(feature="sqlite")]
        () => &"SQLLITE EXTRA",
    }
)

Desciption

There are too many parameters to add them all. Moreover, the parameters depend too much on the database backend. For now enough add simple extra param for more flexibility.

nrot added a commit to nrot/AnyBunker that referenced this pull request Feb 25, 2023
Wait until add extra to sea-query [PR](SeaQL/sea-query#611)
Wait until fix cors to tonic_web [PR](hyperium/tonic#1286)
Copy link
Member

@billy1624 billy1624 left a comment

Choose a reason for hiding this comment

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

Hey @nrot, thanks for contributing!!

src/table/create.rs Outdated Show resolved Hide resolved
src/table/create.rs Outdated Show resolved Hide resolved
src/table/create.rs Outdated Show resolved Hide resolved
nrot and others added 2 commits March 7, 2023 09:38
@tyt2y3
Copy link
Member

tyt2y3 commented Mar 8, 2023

We still need to fix the CI though

@ikrivosheev
Copy link
Member

@nrot, hello! Can you run rustfmt?)

Copy link
Member

@ikrivosheev ikrivosheev left a comment

Choose a reason for hiding this comment

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

@nrot, thank you, LGTM. Derive tests are my bad...

@ikrivosheev ikrivosheev merged commit 71b975d into SeaQL:master Mar 19, 2023
@nrot
Copy link
Contributor Author

nrot commented Mar 20, 2023

Thanks for the review. You have a great community.

@github-actions
Copy link

🎉 Released In 0.29.0 🎉

Your participation is what makes us unique; your adoption is what drives us forward.
Thank you all in the Rust community for making SeaQL what it is today. 🦀
You are also invited to shape it's future! Please star our repos, every ⭐ counts!

@github-actions
Copy link

🎉 Released In 0.29.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 ⭐.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants