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

String parameter should take generic Into<String> #594

Merged
merged 7 commits into from
Mar 1, 2023

Conversation

billy1624
Copy link
Member

@billy1624 billy1624 commented Feb 1, 2023

PR Info

Breaking Changes

  • Changed the &str parameter of the following methods to a generic T: Into<String>: Expr::cust():

    • Expr::cust_with_values()
    • Expr::cust_with_expr()
    • Expr::cust_with_exprs()
    • TableForeignKey::name()
    • ForeignKeyCreateStatement::name()
    • ForeignKeyDropStatement::name()
    • TableIndex::name()
    • IndexCreateStatement::name()
    • IndexDropStatement::name()
    • SqlWriterValues::new()
    • ColumnType::custom()
    • TableCreateStatement::engine()
    • TableCreateStatement::collate()
    • TableCreateStatement::character_set()
    • TableRef::new()
    • LikeExpr::str()
  • Changed the String parameter of the following methods to a generic ColumnType::extra():

    • LikeExpr::new()

Changes

  • Provide blanket IntoLikeExpr implementations for all types implemented Into<String>

Deprecates

  • Deprecated LikeExpr::str(), please use LikeExpr::new() instead

@ikrivosheev
Copy link
Member

@billy1624 hello! I have pushed new commit.

@billy1624 billy1624 marked this pull request as ready for review February 24, 2023 04:12
@billy1624
Copy link
Member Author

Hey @ikrivosheev, sorry for the delay. Had been starting a new proprietary project in the past two weeks loll. Now, I'm back :)

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.

@billy1624 hello! LGTM!

@ikrivosheev ikrivosheev merged commit cc86657 into master Mar 1, 2023
@ikrivosheev ikrivosheev deleted the takes-any-into-string branch March 1, 2023 09:34
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.

I think this has a real benefit - if given a String, we don't have to allocate a second time.

@billy1624
Copy link
Member Author

I think this has a real benefit - if given a String, we don't have to allocate a second time.

Yes, we only .clone() / .to_owned() while necessary

@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
None yet
Development

Successfully merging this pull request may close these issues.

3 participants