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 Cow<str> conversion to Value #550

Merged
merged 8 commits into from
Dec 15, 2022
Merged

add Cow<str> conversion to Value #550

merged 8 commits into from
Dec 15, 2022

Conversation

beckend
Copy link
Contributor

@beckend beckend commented Dec 13, 2022

PR Info

  • Dependencies:
    • use std::borrow::Cow;

New Features


  • Value can now be converted from Cow<str>

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.

@beckend, hey! Thank you for the PR! Some comments.

src/value.rs Outdated Show resolved Hide resolved
src/value.rs Outdated Show resolved Hide resolved
src/value.rs Outdated Show resolved Hide resolved
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.

@beckend thank you! LGTM! @billy1624 @tyt2y3 can someone review PR?

src/value.rs Outdated Show resolved Hide resolved
deal with box
src/value.rs Outdated Show resolved Hide resolved
@beckend
Copy link
Contributor Author

beckend commented Dec 13, 2022

Thanks, my internet is dead, had to edit in mobile

src/value.rs Outdated
}

fn column_type() -> ColumnType {
ColumnType::Text
Copy link
Member

Choose a reason for hiding this comment

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

I think ColumnType::String(None) is more appropriate and it align with the implementation of impl ValueType for String.

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 @beckend, thanks for contributions!

Just a small nitpick: https://github.com/beckend/sea-query/pull/1

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.

Thanks!! @beckend

@ikrivosheev ikrivosheev merged commit 19ab65f into SeaQL:master Dec 15, 2022
@beckend beckend deleted the cow branch December 16, 2022 07:58
billy1624 pushed a commit to billy1624/sea-query that referenced this pull request Jan 4, 2023
add Cow<str> conversion to Value
billy1624 pushed a commit that referenced this pull request Jan 4, 2023
add Cow<str> conversion to Value
billy1624 added a commit that referenced this pull request Apr 8, 2023
* sea-query-rusqlite 0.2.0

* Postgres `GEN_RANDOM_UUID` #568

* 0.28.1

* Convert various UUID defined in `uuid::fmt` module into `sea_query::Value::Uuid`

* Merge pull request #550 from beckend/cow

add Cow<str> conversion to Value

* 0.28.2

* 0.28.2

* CI

* Get values from UpdateStatement

* Update CHANGELOG.md

* Supporting types and implementations for replacing SeaORM's `ColumnType` (#579)

* Implements `PartialEq` for `ColumnType`

* Add helper function to construct `ColumnType::Custom`

* Changelog

* Tweaks

* 0.28.3

* Fix: comma separator for dropping multiple types in Postgres.

* Add: doc-test for dropping multiple types in Postgres.

* Formatted documentation code.

* fix: enable required `syn` features

* Update CHANGELOG.md

* Revert "Update CHANGELOG.md"

This reverts commit eea846e.

* Revert "fix: enable required `syn` features"

This reverts commit 032348e.

* Refactoring: using fold method instead of loop.

* Update CHANGELOG.md

---------

Co-authored-by: Billy Chan <[email protected]>
Co-authored-by: Chris Tsang <[email protected]>
Co-authored-by: PreetamSing <[email protected]>
@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.

3 participants