From 9d0f7e39172303c8323c1c3c3ead51e247bf06ce Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 2 Dec 2024 13:56:27 +0800 Subject: [PATCH 1/6] clippy --- sea-orm-macros/src/derives/case_style.rs | 2 +- src/database/stream/metric.rs | 4 ++-- src/database/stream/transaction.rs | 10 +++++----- src/executor/delete.rs | 4 ++-- src/executor/insert.rs | 12 ++++++------ 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sea-orm-macros/src/derives/case_style.rs b/sea-orm-macros/src/derives/case_style.rs index cf087a470..8b800ce72 100644 --- a/sea-orm-macros/src/derives/case_style.rs +++ b/sea-orm-macros/src/derives/case_style.rs @@ -111,7 +111,7 @@ impl CaseStyleHelpers for Ident { } } -impl<'meta> TryFrom<&ParseNestedMeta<'meta>> for CaseStyle { +impl TryFrom<&ParseNestedMeta<'_>> for CaseStyle { type Error = syn::Error; fn try_from(value: &ParseNestedMeta) -> Result { diff --git a/src/database/stream/metric.rs b/src/database/stream/metric.rs index be091c388..9b56a36b9 100644 --- a/src/database/stream/metric.rs +++ b/src/database/stream/metric.rs @@ -31,7 +31,7 @@ impl<'a> MetricStream<'a> { } } -impl<'a> Stream for MetricStream<'a> { +impl Stream for MetricStream<'_> { type Item = Result; fn poll_next( @@ -51,7 +51,7 @@ impl<'a> Stream for MetricStream<'a> { } } -impl<'a> Drop for MetricStream<'a> { +impl Drop for MetricStream<'_> { fn drop(&mut self) { if let (Some(callback), Some(elapsed)) = (self.metric_callback.as_deref(), self.elapsed) { let info = crate::metric::Info { diff --git a/src/database/stream/transaction.rs b/src/database/stream/transaction.rs index 0040455a3..06034a105 100644 --- a/src/database/stream/transaction.rs +++ b/src/database/stream/transaction.rs @@ -27,20 +27,20 @@ pub struct TransactionStream<'a> { stream: MetricStream<'this>, } -impl<'a> std::fmt::Debug for TransactionStream<'a> { +impl std::fmt::Debug for TransactionStream<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "TransactionStream") } } -impl<'a> TransactionStream<'a> { +impl TransactionStream<'_> { #[instrument(level = "trace", skip(metric_callback))] #[allow(unused_variables)] pub(crate) fn build( - conn: MutexGuard<'a, InnerConnection>, + conn: MutexGuard<'_, InnerConnection>, stmt: Statement, metric_callback: Option, - ) -> TransactionStream<'a> { + ) -> TransactionStream<'_> { TransactionStreamBuilder { stmt, conn, @@ -98,7 +98,7 @@ impl<'a> TransactionStream<'a> { } } -impl<'a> Stream for TransactionStream<'a> { +impl Stream for TransactionStream<'_> { type Item = Result; fn poll_next( diff --git a/src/executor/delete.rs b/src/executor/delete.rs index e1663a6c8..ae2a27aa7 100644 --- a/src/executor/delete.rs +++ b/src/executor/delete.rs @@ -20,7 +20,7 @@ where A: ActiveModelTrait, { /// Execute a DELETE operation on one ActiveModel - pub fn exec(self, db: &'a C) -> impl Future> + '_ + pub fn exec(self, db: &'a C) -> impl Future> + 'a where C: ConnectionTrait, { @@ -34,7 +34,7 @@ where E: EntityTrait, { /// Execute a DELETE operation on many ActiveModels - pub fn exec(self, db: &'a C) -> impl Future> + '_ + pub fn exec(self, db: &'a C) -> impl Future> + 'a where C: ConnectionTrait, { diff --git a/src/executor/insert.rs b/src/executor/insert.rs index 665fa5bee..1e6aca621 100644 --- a/src/executor/insert.rs +++ b/src/executor/insert.rs @@ -110,7 +110,7 @@ where { /// Execute an insert operation #[allow(unused_mut)] - pub fn exec<'a, C>(self, db: &'a C) -> impl Future, DbErr>> + '_ + pub fn exec<'a, C>(self, db: &'a C) -> impl Future, DbErr>> + 'a where C: ConnectionTrait, A: 'a, @@ -134,7 +134,7 @@ where pub fn exec_without_returning<'a, C>( self, db: &'a C, - ) -> impl Future> + '_ + ) -> impl Future> + 'a where ::Model: IntoActiveModel, C: ConnectionTrait, @@ -147,7 +147,7 @@ where pub fn exec_with_returning<'a, C>( self, db: &'a C, - ) -> impl Future::Model, DbErr>> + '_ + ) -> impl Future::Model, DbErr>> + 'a where ::Model: IntoActiveModel, C: ConnectionTrait, @@ -171,7 +171,7 @@ where } /// Execute an insert operation, returning the last inserted id - pub fn exec<'a, C>(self, db: &'a C) -> impl Future, DbErr>> + '_ + pub fn exec<'a, C>(self, db: &'a C) -> impl Future, DbErr>> + 'a where C: ConnectionTrait, A: 'a, @@ -183,7 +183,7 @@ where pub fn exec_without_returning<'a, C>( self, db: &'a C, - ) -> impl Future> + '_ + ) -> impl Future> + 'a where C: ConnectionTrait, A: 'a, @@ -195,7 +195,7 @@ where pub fn exec_with_returning<'a, C>( self, db: &'a C, - ) -> impl Future::Model, DbErr>> + '_ + ) -> impl Future::Model, DbErr>> + 'a where ::Model: IntoActiveModel, C: ConnectionTrait, From b83a07212390b161fe81eb41b93abf4966265b70 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 2 Dec 2024 14:01:13 +0800 Subject: [PATCH 2/6] clippy --- sea-orm-migration/src/connection.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sea-orm-migration/src/connection.rs b/sea-orm-migration/src/connection.rs index 116185e45..2c3b9919d 100644 --- a/sea-orm-migration/src/connection.rs +++ b/sea-orm-migration/src/connection.rs @@ -11,7 +11,7 @@ pub enum SchemaManagerConnection<'c> { } #[async_trait::async_trait] -impl<'c> ConnectionTrait for SchemaManagerConnection<'c> { +impl ConnectionTrait for SchemaManagerConnection<'_> { fn get_database_backend(&self) -> DbBackend { match self { SchemaManagerConnection::Connection(conn) => conn.get_database_backend(), @@ -56,7 +56,7 @@ impl<'c> ConnectionTrait for SchemaManagerConnection<'c> { } #[async_trait::async_trait] -impl<'c> TransactionTrait for SchemaManagerConnection<'c> { +impl TransactionTrait for SchemaManagerConnection<'_> { async fn begin(&self) -> Result { match self { SchemaManagerConnection::Connection(conn) => conn.begin().await, From 7b1495d16872102a8b91926f6bcb3baece0d04e6 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 2 Dec 2024 14:33:21 +0800 Subject: [PATCH 3/6] Upstream Pro - 1 (#2415) * Added `ColumnTrait::enum_type_name()` to signify enum types * dep * Added `DbBackend::boolean_value()` for database dependent boolean value * Bump sea-query * fmt --- sea-orm-macros/src/derives/active_enum.rs | 4 ++++ sea-orm-macros/src/derives/entity_model.rs | 17 +++++++++++++++++ src/database/db_connection.rs | 7 +++++++ src/entity/column.rs | 5 +++++ 4 files changed, 33 insertions(+) diff --git a/sea-orm-macros/src/derives/active_enum.rs b/sea-orm-macros/src/derives/active_enum.rs index b3be14733..2a5e42b7b 100644 --- a/sea-orm-macros/src/derives/active_enum.rs +++ b/sea-orm-macros/src/derives/active_enum.rs @@ -414,6 +414,10 @@ impl ActiveEnum { .to_owned() .into() } + + fn enum_type_name() -> Option<&'static str> { + Some(stringify!(#ident)) + } } #[automatically_derived] diff --git a/sea-orm-macros/src/derives/entity_model.rs b/sea-orm-macros/src/derives/entity_model.rs index 7070ac9d4..ec12a5259 100644 --- a/sea-orm-macros/src/derives/entity_model.rs +++ b/sea-orm-macros/src/derives/entity_model.rs @@ -73,6 +73,7 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec) -> syn::Res // generate Column enum and it's ColumnTrait impl let mut columns_enum: Punctuated<_, Comma> = Punctuated::new(); let mut columns_trait: Punctuated<_, Comma> = Punctuated::new(); + let mut columns_enum_type_name: Punctuated<_, Comma> = Punctuated::new(); let mut columns_select_as: Punctuated<_, Comma> = Punctuated::new(); let mut columns_save_as: Punctuated<_, Comma> = Punctuated::new(); let mut primary_keys: Punctuated<_, Comma> = Punctuated::new(); @@ -302,6 +303,16 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec) -> syn::Res } // match_row = quote! { #match_row.comment() }; columns_trait.push(match_row); + + let ty: syn::Type = syn::LitStr::new(field_type, field_span) + .parse() + .expect("field type error"); + let enum_type_name = quote::quote_spanned! { field_span => + <#ty as sea_orm::sea_query::ValueType>::enum_type_name() + }; + columns_enum_type_name.push(quote! { + Self::#field_name => #enum_type_name + }); } } } @@ -358,6 +369,12 @@ pub fn expand_derive_entity_model(data: Data, attrs: Vec) -> syn::Res } } + fn enum_type_name(&self) -> Option<&'static str> { + match self { + #columns_enum_type_name + } + } + fn select_as(&self, expr: sea_orm::sea_query::Expr) -> sea_orm::sea_query::SimpleExpr { match self { #columns_select_as diff --git a/src/database/db_connection.rs b/src/database/db_connection.rs index a06381532..f49a43254 100644 --- a/src/database/db_connection.rs +++ b/src/database/db_connection.rs @@ -583,6 +583,13 @@ impl DbBackend { _ => false, } } + + /// A getter for database dependent boolean value + pub fn boolean_value(&self, boolean: bool) -> sea_query::Value { + match self { + Self::MySql | Self::Postgres | Self::Sqlite => boolean.into(), + } + } } #[cfg(test)] diff --git a/src/entity/column.rs b/src/entity/column.rs index 7b60f95a5..599d87d70 100644 --- a/src/entity/column.rs +++ b/src/entity/column.rs @@ -75,6 +75,11 @@ pub trait ColumnTrait: IdenStatic + Iterable + FromStr { /// Define a column for an Entity fn def(&self) -> ColumnDef; + /// Get the enum name of the column type + fn enum_type_name(&self) -> Option<&'static str> { + None + } + /// Get the name of the entity the column belongs to fn entity_name(&self) -> DynIden { SeaRc::new(Self::EntityName::default()) as DynIden From afdf9bba0d496e091f6e2c3e6c3bb9dd299c13bb Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 2 Dec 2024 14:55:33 +0800 Subject: [PATCH 4/6] 1.1.2 --- Cargo.toml | 4 ++-- sea-orm-cli/Cargo.toml | 4 ++-- sea-orm-codegen/Cargo.toml | 2 +- sea-orm-macros/Cargo.toml | 2 +- sea-orm-migration/Cargo.toml | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index eafd5d9c8..05b4332f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = [".", "sea-orm-macros", "sea-orm-codegen"] [package] name = "sea-orm" -version = "1.1.1" +version = "1.1.2" authors = ["Chris Tsang "] edition = "2021" description = "🐚 An async & dynamic ORM for Rust" @@ -33,7 +33,7 @@ log = { version = "0.4", default-features = false } tracing = { version = "0.1", default-features = false, features = ["attributes", "log"] } rust_decimal = { version = "1", default-features = false, optional = true } bigdecimal = { version = "0.4", default-features = false, optional = true } -sea-orm-macros = { version = "~1.1.1", path = "sea-orm-macros", default-features = false, features = ["strum"] } +sea-orm-macros = { version = "~1.1.2", path = "sea-orm-macros", default-features = false, features = ["strum"] } sea-query = { version = "0.32.0", default-features = false, features = ["thread-safe", "hashable-value", "backend-mysql", "backend-postgres", "backend-sqlite"] } sea-query-binder = { version = "0.7.0", default-features = false, optional = true } strum = { version = "0.26", default-features = false } diff --git a/sea-orm-cli/Cargo.toml b/sea-orm-cli/Cargo.toml index e8ed030ce..a5c09bd20 100644 --- a/sea-orm-cli/Cargo.toml +++ b/sea-orm-cli/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "sea-orm-cli" -version = "1.1.1" +version = "1.1.2" authors = [ "Chris Tsang ", "Billy Chan ", @@ -37,7 +37,7 @@ required-features = ["cli", "codegen"] clap = { version = "4.3", features = ["env", "derive"], optional = true } dotenvy = { version = "0.15", default-features = false, optional = true } async-std = { version = "1.9", default-features = false, features = ["attributes", "tokio1"], optional = true } -sea-orm-codegen = { version = "=1.1.1", path = "../sea-orm-codegen", default-features = false, optional = true } +sea-orm-codegen = { version = "=1.1.2", path = "../sea-orm-codegen", default-features = false, optional = true } sea-schema = { version = "0.16.0" } sqlx = { version = "0.8.2", default-features = false, features = ["mysql", "postgres"], optional = true } tracing-subscriber = { version = "0.3.17", default-features = false, features = ["env-filter", "fmt"] } diff --git a/sea-orm-codegen/Cargo.toml b/sea-orm-codegen/Cargo.toml index a0e8f26d8..dfeffeacd 100644 --- a/sea-orm-codegen/Cargo.toml +++ b/sea-orm-codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sea-orm-codegen" -version = "1.1.1" +version = "1.1.2" authors = ["Billy Chan "] edition = "2021" description = "Code Generator for SeaORM" diff --git a/sea-orm-macros/Cargo.toml b/sea-orm-macros/Cargo.toml index 602141bad..e9a172548 100644 --- a/sea-orm-macros/Cargo.toml +++ b/sea-orm-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sea-orm-macros" -version = "1.1.1" +version = "1.1.2" authors = [ "Billy Chan " ] edition = "2021" description = "Derive macros for SeaORM" diff --git a/sea-orm-migration/Cargo.toml b/sea-orm-migration/Cargo.toml index 073dccea3..d7c053fd4 100644 --- a/sea-orm-migration/Cargo.toml +++ b/sea-orm-migration/Cargo.toml @@ -3,7 +3,7 @@ [package] name = "sea-orm-migration" -version = "1.1.1" +version = "1.1.2" authors = ["Billy Chan "] edition = "2021" description = "Migration utility for SeaORM" @@ -23,8 +23,8 @@ path = "src/lib.rs" async-trait = { version = "0.1", default-features = false } clap = { version = "4.3", features = ["env", "derive"], optional = true } dotenvy = { version = "0.15", default-features = false, optional = true } -sea-orm = { version = "~1.1.1", path = "../", default-features = false, features = ["macros"] } -sea-orm-cli = { version = "~1.1.1", path = "../sea-orm-cli", default-features = false, optional = true } +sea-orm = { version = "~1.1.2", path = "../", default-features = false, features = ["macros"] } +sea-orm-cli = { version = "~1.1.2", path = "../sea-orm-cli", default-features = false, optional = true } sea-schema = { version = "0.16.0" } tracing = { version = "0.1", default-features = false, features = ["log"] } tracing-subscriber = { version = "0.3.17", default-features = false, features = ["env-filter", "fmt"] } From cf99b5f075df343a4e7e02aa2305787aa5be3722 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 2 Dec 2024 14:55:35 +0800 Subject: [PATCH 5/6] update examples --- examples/actix_example/entity/Cargo.toml | 2 +- examples/actix_example/migration/Cargo.toml | 2 +- examples/actix_example/service/Cargo.toml | 2 +- examples/axum_example/entity/Cargo.toml | 2 +- examples/axum_example/migration/Cargo.toml | 2 +- examples/axum_example/service/Cargo.toml | 2 +- examples/graphql_example/entity/Cargo.toml | 2 +- examples/graphql_example/migration/Cargo.toml | 2 +- examples/graphql_example/service/Cargo.toml | 2 +- examples/jsonrpsee_example/entity/Cargo.toml | 2 +- examples/jsonrpsee_example/migration/Cargo.toml | 2 +- examples/jsonrpsee_example/service/Cargo.toml | 2 +- examples/loco_example/Cargo.toml | 2 +- examples/loco_example/migration/Cargo.toml | 2 +- examples/loco_seaography/Cargo.toml | 2 +- examples/loco_seaography/migration/Cargo.toml | 2 +- examples/loco_starter/Cargo.toml | 2 +- examples/loco_starter/migration/Cargo.toml | 2 +- examples/poem_example/entity/Cargo.toml | 2 +- examples/poem_example/migration/Cargo.toml | 2 +- examples/poem_example/service/Cargo.toml | 2 +- examples/react_admin/backend/Cargo.toml | 2 +- examples/react_admin/backend/migration/Cargo.toml | 2 +- examples/rocket_example/entity/Cargo.toml | 2 +- examples/rocket_example/migration/Cargo.toml | 2 +- examples/rocket_example/service/Cargo.toml | 2 +- examples/rocket_okapi_example/entity/Cargo.toml | 2 +- examples/rocket_okapi_example/migration/Cargo.toml | 2 +- examples/rocket_okapi_example/service/Cargo.toml | 2 +- examples/salvo_example/entity/Cargo.toml | 2 +- examples/salvo_example/migration/Cargo.toml | 2 +- examples/salvo_example/service/Cargo.toml | 2 +- examples/seaography_example/migration/Cargo.toml | 4 ++-- examples/tonic_example/entity/Cargo.toml | 2 +- examples/tonic_example/migration/Cargo.toml | 2 +- examples/tonic_example/service/Cargo.toml | 2 +- 36 files changed, 37 insertions(+), 37 deletions(-) diff --git a/examples/actix_example/entity/Cargo.toml b/examples/actix_example/entity/Cargo.toml index 521f52ca3..a148309cd 100644 --- a/examples/actix_example/entity/Cargo.toml +++ b/examples/actix_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version diff --git a/examples/actix_example/migration/Cargo.toml b/examples/actix_example/migration/Cargo.toml index 29ffc1422..2fbc1a8a8 100644 --- a/examples/actix_example/migration/Cargo.toml +++ b/examples/actix_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-actix-native-tls", diff --git a/examples/actix_example/service/Cargo.toml b/examples/actix_example/service/Cargo.toml index ae6f455a9..700cc699d 100644 --- a/examples/actix_example/service/Cargo.toml +++ b/examples/actix_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version features = [ "debug-print", "runtime-async-std-native-tls", diff --git a/examples/axum_example/entity/Cargo.toml b/examples/axum_example/entity/Cargo.toml index 521f52ca3..a148309cd 100644 --- a/examples/axum_example/entity/Cargo.toml +++ b/examples/axum_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version diff --git a/examples/axum_example/migration/Cargo.toml b/examples/axum_example/migration/Cargo.toml index 2c26c7fdd..9303c324b 100644 --- a/examples/axum_example/migration/Cargo.toml +++ b/examples/axum_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/axum_example/service/Cargo.toml b/examples/axum_example/service/Cargo.toml index 088d364ca..ca9ab9c30 100644 --- a/examples/axum_example/service/Cargo.toml +++ b/examples/axum_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version features = [ "debug-print", "runtime-tokio-native-tls", diff --git a/examples/graphql_example/entity/Cargo.toml b/examples/graphql_example/entity/Cargo.toml index 311f50650..c2f4fd4cf 100644 --- a/examples/graphql_example/entity/Cargo.toml +++ b/examples/graphql_example/entity/Cargo.toml @@ -16,4 +16,4 @@ version = "5.0.10" [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version diff --git a/examples/graphql_example/migration/Cargo.toml b/examples/graphql_example/migration/Cargo.toml index f80d33883..b5c5e62b2 100644 --- a/examples/graphql_example/migration/Cargo.toml +++ b/examples/graphql_example/migration/Cargo.toml @@ -14,7 +14,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/graphql_example/service/Cargo.toml b/examples/graphql_example/service/Cargo.toml index cf9d92c55..76b974c02 100644 --- a/examples/graphql_example/service/Cargo.toml +++ b/examples/graphql_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version features = [ "debug-print", "runtime-async-std-native-tls", diff --git a/examples/jsonrpsee_example/entity/Cargo.toml b/examples/jsonrpsee_example/entity/Cargo.toml index 521f52ca3..a148309cd 100644 --- a/examples/jsonrpsee_example/entity/Cargo.toml +++ b/examples/jsonrpsee_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version diff --git a/examples/jsonrpsee_example/migration/Cargo.toml b/examples/jsonrpsee_example/migration/Cargo.toml index a98072456..a8d7c09b5 100644 --- a/examples/jsonrpsee_example/migration/Cargo.toml +++ b/examples/jsonrpsee_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/jsonrpsee_example/service/Cargo.toml b/examples/jsonrpsee_example/service/Cargo.toml index 54aa00863..9ce9789ac 100644 --- a/examples/jsonrpsee_example/service/Cargo.toml +++ b/examples/jsonrpsee_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version features = [ "debug-print", "runtime-tokio-native-tls", diff --git a/examples/loco_example/Cargo.toml b/examples/loco_example/Cargo.toml index 42807ca35..82a599d55 100644 --- a/examples/loco_example/Cargo.toml +++ b/examples/loco_example/Cargo.toml @@ -27,7 +27,7 @@ tracing-subscriber = { version = "0.3.17", features = ["env-filter", "json"] } [dependencies.sea-orm] path = "../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version features = [ "sqlx-sqlite", "sqlx-postgres", diff --git a/examples/loco_example/migration/Cargo.toml b/examples/loco_example/migration/Cargo.toml index 1e351a38a..8fb52ac63 100644 --- a/examples/loco_example/migration/Cargo.toml +++ b/examples/loco_example/migration/Cargo.toml @@ -14,7 +14,7 @@ loco-rs = { version = "0.7" } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ # Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI. # View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime. diff --git a/examples/loco_seaography/Cargo.toml b/examples/loco_seaography/Cargo.toml index d4f56fb60..c6177eb57 100644 --- a/examples/loco_seaography/Cargo.toml +++ b/examples/loco_seaography/Cargo.toml @@ -34,7 +34,7 @@ tower-service = { version = "0.3" } [dependencies.sea-orm] path = "../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version features = [ "sqlx-sqlite", "sqlx-postgres", diff --git a/examples/loco_seaography/migration/Cargo.toml b/examples/loco_seaography/migration/Cargo.toml index 8e9158f57..48f1cd9ba 100644 --- a/examples/loco_seaography/migration/Cargo.toml +++ b/examples/loco_seaography/migration/Cargo.toml @@ -14,7 +14,7 @@ loco-rs = { version = "0.7.0" } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ # Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI. # View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime. diff --git a/examples/loco_starter/Cargo.toml b/examples/loco_starter/Cargo.toml index 55f0fbda8..f4dad3d20 100644 --- a/examples/loco_starter/Cargo.toml +++ b/examples/loco_starter/Cargo.toml @@ -28,7 +28,7 @@ tracing-subscriber = { version = "0.3.17", features = ["env-filter", "json"] } [dependencies.sea-orm] path = "../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version features = [ "sqlx-sqlite", "sqlx-postgres", diff --git a/examples/loco_starter/migration/Cargo.toml b/examples/loco_starter/migration/Cargo.toml index 8e9158f57..48f1cd9ba 100644 --- a/examples/loco_starter/migration/Cargo.toml +++ b/examples/loco_starter/migration/Cargo.toml @@ -14,7 +14,7 @@ loco-rs = { version = "0.7.0" } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ # Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI. # View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime. diff --git a/examples/poem_example/entity/Cargo.toml b/examples/poem_example/entity/Cargo.toml index 521f52ca3..a148309cd 100644 --- a/examples/poem_example/entity/Cargo.toml +++ b/examples/poem_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version diff --git a/examples/poem_example/migration/Cargo.toml b/examples/poem_example/migration/Cargo.toml index a98072456..a8d7c09b5 100644 --- a/examples/poem_example/migration/Cargo.toml +++ b/examples/poem_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/poem_example/service/Cargo.toml b/examples/poem_example/service/Cargo.toml index 5a0f5fee2..d205317ec 100644 --- a/examples/poem_example/service/Cargo.toml +++ b/examples/poem_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version features = [ "debug-print", "runtime-async-std-native-tls", diff --git a/examples/react_admin/backend/Cargo.toml b/examples/react_admin/backend/Cargo.toml index de7d99d03..b2f7cdbe9 100644 --- a/examples/react_admin/backend/Cargo.toml +++ b/examples/react_admin/backend/Cargo.toml @@ -34,7 +34,7 @@ tower-service = { version = "0.3" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version features = [ "sqlx-sqlite", "sqlx-postgres", diff --git a/examples/react_admin/backend/migration/Cargo.toml b/examples/react_admin/backend/migration/Cargo.toml index ef3cdfdd6..28eef0424 100644 --- a/examples/react_admin/backend/migration/Cargo.toml +++ b/examples/react_admin/backend/migration/Cargo.toml @@ -14,7 +14,7 @@ loco-rs = { version = "0.7.0" } [dependencies.sea-orm-migration] path = "../../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ # Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI. # View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime. diff --git a/examples/rocket_example/entity/Cargo.toml b/examples/rocket_example/entity/Cargo.toml index 4340630df..961f66030 100644 --- a/examples/rocket_example/entity/Cargo.toml +++ b/examples/rocket_example/entity/Cargo.toml @@ -13,4 +13,4 @@ rocket = { version = "0.5.0", features = ["json"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version diff --git a/examples/rocket_example/migration/Cargo.toml b/examples/rocket_example/migration/Cargo.toml index ba3d580ee..e84d1dcd7 100644 --- a/examples/rocket_example/migration/Cargo.toml +++ b/examples/rocket_example/migration/Cargo.toml @@ -14,7 +14,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/rocket_example/service/Cargo.toml b/examples/rocket_example/service/Cargo.toml index 85b442e55..601772bec 100644 --- a/examples/rocket_example/service/Cargo.toml +++ b/examples/rocket_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version features = [ "runtime-tokio-native-tls", "sqlx-postgres", diff --git a/examples/rocket_okapi_example/entity/Cargo.toml b/examples/rocket_okapi_example/entity/Cargo.toml index c7e82ac13..6f3301a6d 100644 --- a/examples/rocket_okapi_example/entity/Cargo.toml +++ b/examples/rocket_okapi_example/entity/Cargo.toml @@ -13,7 +13,7 @@ rocket = { version = "0.5.0", features = ["json"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version [dependencies.rocket_okapi] version = "0.8.0" diff --git a/examples/rocket_okapi_example/migration/Cargo.toml b/examples/rocket_okapi_example/migration/Cargo.toml index ba3d580ee..e84d1dcd7 100644 --- a/examples/rocket_okapi_example/migration/Cargo.toml +++ b/examples/rocket_okapi_example/migration/Cargo.toml @@ -14,7 +14,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/rocket_okapi_example/service/Cargo.toml b/examples/rocket_okapi_example/service/Cargo.toml index 7234ac1be..9336ae69b 100644 --- a/examples/rocket_okapi_example/service/Cargo.toml +++ b/examples/rocket_okapi_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version features = [ "runtime-tokio-native-tls", # "sqlx-postgres", diff --git a/examples/salvo_example/entity/Cargo.toml b/examples/salvo_example/entity/Cargo.toml index a3b78dcb8..5af8164c4 100644 --- a/examples/salvo_example/entity/Cargo.toml +++ b/examples/salvo_example/entity/Cargo.toml @@ -14,4 +14,4 @@ salvo = { version = "0.50" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version diff --git a/examples/salvo_example/migration/Cargo.toml b/examples/salvo_example/migration/Cargo.toml index a98072456..a8d7c09b5 100644 --- a/examples/salvo_example/migration/Cargo.toml +++ b/examples/salvo_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-native-tls", diff --git a/examples/salvo_example/service/Cargo.toml b/examples/salvo_example/service/Cargo.toml index 0d2e8b8fd..3286b63ca 100644 --- a/examples/salvo_example/service/Cargo.toml +++ b/examples/salvo_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version features = [ "debug-print", "runtime-tokio-native-tls", diff --git a/examples/seaography_example/migration/Cargo.toml b/examples/seaography_example/migration/Cargo.toml index fb5858318..e82794dc5 100644 --- a/examples/seaography_example/migration/Cargo.toml +++ b/examples/seaography_example/migration/Cargo.toml @@ -15,11 +15,11 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ "runtime-async-std-native-tls", "sqlx-mysql", diff --git a/examples/tonic_example/entity/Cargo.toml b/examples/tonic_example/entity/Cargo.toml index 521f52ca3..a148309cd 100644 --- a/examples/tonic_example/entity/Cargo.toml +++ b/examples/tonic_example/entity/Cargo.toml @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version diff --git a/examples/tonic_example/migration/Cargo.toml b/examples/tonic_example/migration/Cargo.toml index 963df0e48..168c7c6e5 100644 --- a/examples/tonic_example/migration/Cargo.toml +++ b/examples/tonic_example/migration/Cargo.toml @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] } [dependencies.sea-orm-migration] path = "../../../sea-orm-migration" # remove this line in your own project -version = "~1.1.1" # sea-orm-migration version +version = "~1.1.2" # sea-orm-migration version features = [ # Enable following runtime and db backend features if you want to run migration via CLI # "runtime-tokio-rustls", diff --git a/examples/tonic_example/service/Cargo.toml b/examples/tonic_example/service/Cargo.toml index 750c72442..5bda2f952 100644 --- a/examples/tonic_example/service/Cargo.toml +++ b/examples/tonic_example/service/Cargo.toml @@ -10,7 +10,7 @@ entity = { path = "../entity" } [dependencies.sea-orm] path = "../../../" # remove this line in your own project -version = "~1.1.1" # sea-orm version +version = "~1.1.2" # sea-orm version features = [ "debug-print", "runtime-tokio-rustls", From 760b825a12b6050fd3196d75de0b77a803dca284 Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Mon, 2 Dec 2024 14:55:50 +0800 Subject: [PATCH 6/6] CHANGELOG --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8111a2da0..e9c966cac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). + +## 1.1.2 - 2024-12-02 + +### Enhancements + +- Added `ColumnTrait::enum_type_name()` to signify enum types https://github.com/SeaQL/sea-orm/pull/2415 +- Added `DbBackend::boolean_value()` for database dependent boolean value https://github.com/SeaQL/sea-orm/pull/2415 + ## 1.1.1 - 2024-11-04 ### Enhancements