-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Supporting types and implementations for replacing SeaORM's ColumnType
#579
Conversation
PartialEq
for ColumnType
ColumnType
and IdenStatic
There was a problem hiding this comment.
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.
src/types.rs
Outdated
@@ -66,6 +66,36 @@ impl fmt::Debug for dyn Iden { | |||
} | |||
} | |||
|
|||
#[derive(Debug, Clone)] | |||
pub enum Identity { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
f707a58
to
4d49c88
Compare
ColumnType
and IdenStatic
ColumnType
|
Oh, we should always first merge into master then backport to a release branch instead. |
…pe` (#579) * Implements `PartialEq` for `ColumnType` * Add helper function to construct `ColumnType::Custom`
* 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]>
PR Info
Dependents:
ColumnType
andIdenStatic
with its SeaQuery's counterparts sea-orm#1390Cherry pick this back to the master branch
New Features
PartialEq
forColumnType
Eq
andPartialEq
forMySqlYear
Eq
andPartialEq
forBlobSize
ColumnType::custom
helper function for constructingColumnType::Custom
from&str