Skip to content

Supporting types and implementations for replacing SeaORM's ColumnType - #579

Merged
tyt2y3 merged 2 commits into
0.28.xfrom
impl-partial-eq-for-column-type
Jan 18, 2023
Merged

tyt2y3 merged 2 commits into
0.28.xfrom
impl-partial-eq-for-column-type

Conversation

@billy1624

@billy1624 billy1624 commented Jan 12, 2023 •

Copy link
Copy Markdown
Member

PR Info

New Features

  • Implemented PartialEq for ColumnType
  • Derived Eq and PartialEq for MySqlYear
  • Derived Eq and PartialEq for BlobSize
  • Added ColumnType::custom helper function for constructing ColumnType::Custom from &str

@billy1624 billy1624 self-assigned this Jan 12, 2023
@billy1624 billy1624 changed the title Implements PartialEq for ColumnType Supporting types and implementations for replacing SeaORM's ColumnType and IdenStatic Jan 12, 2023
@billy1624
billy1624 marked this pull request as ready for review January 12, 2023 08:20

@ikrivosheev ikrivosheev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@billy1624 hello! Thank you, I have a question.

Comment thread src/types.rs Outdated
}

#[derive(Debug, Clone)]
pub enum Identity {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@billy1624 can you explain, why you move this enum to SeaQuery? I cannot find place, where we can use it in SeaQuery

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hey @ikrivosheev, it's true that Identity and IntoIdentity aren't used in any part of SeaQuery at the moment. It originally reside in SeaORM because we replace SeaORM's IdenStatic with sea_query::IdenStatic, this make it impossible to define impl<T: IdenStatic> IntoIdentity for T and hence moving both into SeaQuery.

Btw, IdenList trait can be replaced by IntoIdentity in the future, i.e. methods that originally take IdenList parameter can now take IntoIdentity instead.

@billy1624
billy1624 force-pushed the impl-partial-eq-for-column-type branch from f707a58 to 4d49c88 Compare January 14, 2023 02:25
@billy1624 billy1624 changed the title Supporting types and implementations for replacing SeaORM's ColumnType and IdenStatic Supporting types and implementations for replacing SeaORM's ColumnType Jan 14, 2023
@billy1624 billy1624 mentioned this pull request Jan 14, 2023
4 tasks done
@tyt2y3

tyt2y3 commented Jan 18, 2023

Copy link
Copy Markdown
Member

Identity will be handled in another PR

@tyt2y3
tyt2y3 merged commit e107fde into 0.28.x Jan 18, 2023
@tyt2y3
tyt2y3 deleted the impl-partial-eq-for-column-type branch January 18, 2023 07:45
@tyt2y3

tyt2y3 commented Jan 18, 2023

Copy link
Copy Markdown
Member

Oh, we should always first merge into master then backport to a release branch instead.

tyt2y3 pushed a commit that referenced this pull request Jan 18, 2023
…pe` (#579)

* Implements `PartialEq` for `ColumnType`

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

tyt2y3 commented Jan 18, 2023

Copy link
Copy Markdown
Member

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]>
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