Update Rust crate sea-orm to v1.1.7 (#27137)
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [sea-orm](https://www.sea-ql.org/SeaORM) ([source](https://redirect.github.com/SeaQL/sea-orm)) | dev-dependencies | patch | `1.1.5` -> `1.1.7` | | [sea-orm](https://www.sea-ql.org/SeaORM) ([source](https://redirect.github.com/SeaQL/sea-orm)) | dependencies | patch | `1.1.5` -> `1.1.7` | --- ### Release Notes <details> <summary>SeaQL/sea-orm (sea-orm)</summary> ### [`v1.1.7`](https://redirect.github.com/SeaQL/sea-orm/blob/HEAD/CHANGELOG.md#117---2025-03-02) [Compare Source](https://redirect.github.com/SeaQL/sea-orm/compare/1.1.6...1.1.7) ##### New Features - Support nested entities in `FromQueryResult` [https://github.com/SeaQL/sea-orm/pull/2508](https://redirect.github.com/SeaQL/sea-orm/pull/2508) ```rust #[derive(FromQueryResult)] struct Cake { id: i32, name: String, #[sea_orm(nested)] bakery: Option<CakeBakery>, } #[derive(FromQueryResult)] struct CakeBakery { #[sea_orm(from_alias = "bakery_id")] id: i32, #[sea_orm(from_alias = "bakery_name")] title: String, } let cake: Cake = cake::Entity::find() .select_only() .column(cake::Column::Id) .column(cake::Column::Name) .column_as(bakery::Column::Id, "bakery_id") .column_as(bakery::Column::Name, "bakery_name") .left_join(bakery::Entity) .order_by_asc(cake::Column::Id) .into_model() .one(&ctx.db) .await? .unwrap(); assert_eq!( cake, Cake { id: 1, name: "Cake".to_string(), bakery: Some(CakeBakery { id: 20, title: "Bakery".to_string(), }) } ); ``` - Support nested entities in `DerivePartialModel` [https://github.com/SeaQL/sea-orm/pull/2508](https://redirect.github.com/SeaQL/sea-orm/pull/2508) ```rust #[derive(DerivePartialModel)] // FromQueryResult is no longer needed #[sea_orm(entity = "cake::Entity", from_query_result)] struct Cake { id: i32, name: String, #[sea_orm(nested)] bakery: Option<Bakery>, } #[derive(DerivePartialModel)] #[sea_orm(entity = "bakery::Entity", from_query_result)] struct Bakery { id: i32, #[sea_orm(from_col = "Name")] title: String, } // same as previous example, but without the custom selects let cake: Cake = cake::Entity::find() .left_join(bakery::Entity) .order_by_asc(cake::Column::Id) .into_partial_model() .one(&ctx.db) .await? .unwrap(); assert_eq!( cake, Cake { id: 1, name: "Cake".to_string(), bakery: Some(CakeBakery { id: 20, title: "Bakery".to_string(), }) } ); ``` - Derive also `IntoActiveModel` with `DerivePartialModel` [https://github.com/SeaQL/sea-orm/pull/2517](https://redirect.github.com/SeaQL/sea-orm/pull/2517) ```rust #[derive(DerivePartialModel)] #[sea_orm(entity = "cake::Entity", into_active_model)] struct Cake { id: i32, name: String, } assert_eq!( Cake { id: 12, name: "Lemon Drizzle".to_owned(), } .into_active_model(), cake::ActiveModel { id: Set(12), name: Set("Lemon Drizzle".to_owned()), ..Default::default() } ); ``` - Added `SelectThree` [https://github.com/SeaQL/sea-orm/pull/2518](https://redirect.github.com/SeaQL/sea-orm/pull/2518) ```rust // Order -> (many) Lineitem -> Cake let items: Vec<(order::Model, Option<lineitem::Model>, Option<cake::Model>)> = order::Entity::find() .find_also_related(lineitem::Entity) .and_also_related(cake::Entity) .order_by_asc(order::Column::Id) .order_by_asc(lineitem::Column::Id) .all(&ctx.db) .await?; ``` ##### Enhancements - Support complex type path in `DeriveIntoActiveModel` [https://github.com/SeaQL/sea-orm/pull/2517](https://redirect.github.com/SeaQL/sea-orm/pull/2517) ```rust #[derive(DeriveIntoActiveModel)] #[sea_orm(active_model = "<fruit::Entity as EntityTrait>::ActiveModel")] struct Fruit { cake_id: Option<Option<i32>>, } ``` - Added `DatabaseConnection::close_by_ref` [https://github.com/SeaQL/sea-orm/pull/2511](https://redirect.github.com/SeaQL/sea-orm/pull/2511) ```rust pub async fn close(self) -> Result<(), DbErr> { .. } // existing pub async fn close_by_ref(&self) -> Result<(), DbErr> { .. } // new ``` ##### House Keeping - Cleanup legacy `ActiveValue::Set` [https://github.com/SeaQL/sea-orm/pull/2515](https://redirect.github.com/SeaQL/sea-orm/pull/2515) ### [`v1.1.6`](https://redirect.github.com/SeaQL/sea-orm/blob/HEAD/CHANGELOG.md#116---2025-02-24) [Compare Source](https://redirect.github.com/SeaQL/sea-orm/compare/1.1.5...1.1.6) ##### New Features - Support PgVector (under feature flag `postgres-vector`) [https://github.com/SeaQL/sea-orm/pull/2500](https://redirect.github.com/SeaQL/sea-orm/pull/2500) ```rust // Model #[derive(Clone, Debug, PartialEq, DeriveEntityModel)] #[sea_orm(table_name = "image_model")] pub struct Model { #[sea_orm(primary_key, auto_increment = false)] pub id: i32, pub embedding: PgVector, } // Schema sea_query::Table::create() .table(image_model::Entity.table_ref()) .col(ColumnDef::new(Column::Id).integer().not_null().primary_key()) .col(ColumnDef::new(Column::Embedding).vector(None).not_null()) .. // Insert ActiveModel { id: NotSet, embedding: Set(PgVector::from(vec![1., 2., 3.])), } .insert(db) .await? ``` - Added `Insert::exec_with_returning_keys` & `Insert::exec_with_returning_many` (Postgres only) ```rust assert_eq!( Entity::insert_many([ ActiveModel { id: NotSet, name: Set("two".into()) }, ActiveModel { id: NotSet, name: Set("three".into()) }, ]) .exec_with_returning_many(db) .await .unwrap(), [ Model { id: 2, name: "two".into() }, Model { id: 3, name: "three".into() }, ] ); assert_eq!( cakes_bakers::Entity::insert_many([ cakes_bakers::ActiveModel { cake_id: Set(1), baker_id: Set(2), }, cakes_bakers::ActiveModel { cake_id: Set(2), baker_id: Set(1), }, ]) .exec_with_returning_keys(db) .await .unwrap(), [(1, 2), (2, 1)] ); ``` - Added `DeleteOne::exec_with_returning` & `DeleteMany::exec_with_returning` [https://github.com/SeaQL/sea-orm/pull/2432](https://redirect.github.com/SeaQL/sea-orm/pull/2432) ##### Enhancements - Expose underlying row types (e.g. `sqlx::postgres::PgRow`) [https://github.com/SeaQL/sea-orm/pull/2265](https://redirect.github.com/SeaQL/sea-orm/pull/2265) - \[sea-orm-cli] Added `acquire-timeout` option [https://github.com/SeaQL/sea-orm/pull/2461](https://redirect.github.com/SeaQL/sea-orm/pull/2461) - \[sea-orm-cli] Added `with-prelude` option [https://github.com/SeaQL/sea-orm/pull/2322](https://redirect.github.com/SeaQL/sea-orm/pull/2322) - \[sea-orm-cli] Added `impl-active-model-behavior` option [https://github.com/SeaQL/sea-orm/pull/2487](https://redirect.github.com/SeaQL/sea-orm/pull/2487) ##### Bug Fixes - Fixed `seaography::register_active_enums` macro [https://github.com/SeaQL/sea-orm/pull/2475](https://redirect.github.com/SeaQL/sea-orm/pull/2475) ##### House keeping - Remove `futures` crate, replace with `futures-util` [https://github.com/SeaQL/sea-orm/pull/2466](https://redirect.github.com/SeaQL/sea-orm/pull/2466) </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 3pm on Wednesday" in timezone America/New_York, Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- Release Notes: - N/A <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMDcuMSIsInVwZGF0ZWRJblZlciI6IjM5LjIwNy4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
parent
9fd2d064ee
commit
c9bff6e762
Generated
+31
-21
@@ -1879,7 +1879,7 @@ dependencies = [
|
||||
"bitflags 2.8.0",
|
||||
"cexpr",
|
||||
"clang-sys",
|
||||
"itertools 0.12.1",
|
||||
"itertools 0.10.5",
|
||||
"lazy_static",
|
||||
"lazycell",
|
||||
"log",
|
||||
@@ -1902,7 +1902,7 @@ dependencies = [
|
||||
"bitflags 2.8.0",
|
||||
"cexpr",
|
||||
"clang-sys",
|
||||
"itertools 0.12.1",
|
||||
"itertools 0.10.5",
|
||||
"log",
|
||||
"prettyplease",
|
||||
"proc-macro2",
|
||||
@@ -2356,7 +2356,7 @@ dependencies = [
|
||||
"cap-primitives",
|
||||
"cap-std",
|
||||
"io-lifetimes",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2384,7 +2384,7 @@ dependencies = [
|
||||
"ipnet",
|
||||
"maybe-owned",
|
||||
"rustix",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
"winx",
|
||||
]
|
||||
|
||||
@@ -4592,7 +4592,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5267,7 +5267,7 @@ checksum = "5e2e6123af26f0f2c51cc66869137080199406754903cc926a7690401ce09cb4"
|
||||
dependencies = [
|
||||
"io-lifetimes",
|
||||
"rustix",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -6926,7 +6926,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2285ddfe3054097ef4b2fe909ef8c3bcd1ea52a8f0d274416caebeef39f04a65"
|
||||
dependencies = [
|
||||
"io-lifetimes",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -7572,7 +7572,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"windows-targets 0.48.5",
|
||||
"windows-targets 0.52.6",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -10112,6 +10112,15 @@ dependencies = [
|
||||
"indexmap",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "pgvector"
|
||||
version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e0e8871b6d7ca78348c6cd29b911b94851f3429f0cd403130ca17f26c1fb91a6"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "phf"
|
||||
version = "0.11.2"
|
||||
@@ -10772,7 +10781,7 @@ checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4"
|
||||
dependencies = [
|
||||
"bytes 1.10.1",
|
||||
"heck 0.5.0",
|
||||
"itertools 0.12.1",
|
||||
"itertools 0.10.5",
|
||||
"log",
|
||||
"multimap 0.10.0",
|
||||
"once_cell",
|
||||
@@ -10805,7 +10814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools 0.12.1",
|
||||
"itertools 0.10.5",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 2.0.100",
|
||||
@@ -10999,7 +11008,7 @@ dependencies = [
|
||||
"once_cell",
|
||||
"socket2",
|
||||
"tracing",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -11924,7 +11933,7 @@ dependencies = [
|
||||
"libc",
|
||||
"linux-raw-sys",
|
||||
"once_cell",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -12257,17 +12266,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sea-orm"
|
||||
version = "1.1.5"
|
||||
version = "1.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "00733e5418e8ae3758cdb988c3654174e716230cc53ee2cb884207cf86a23029"
|
||||
checksum = "3417812d38049e8ec3d588c03570f8c60de811d2453fb48e424045a1600ffd86"
|
||||
dependencies = [
|
||||
"async-stream",
|
||||
"async-trait",
|
||||
"bigdecimal",
|
||||
"chrono",
|
||||
"futures 0.3.31",
|
||||
"futures-util",
|
||||
"log",
|
||||
"ouroboros",
|
||||
"pgvector",
|
||||
"rust_decimal",
|
||||
"sea-orm-macros",
|
||||
"sea-query",
|
||||
@@ -12285,9 +12295,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sea-orm-macros"
|
||||
version = "1.1.5"
|
||||
version = "1.1.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a98408f82fb4875d41ef469a79944a7da29767c7b3e4028e22188a3dd613b10f"
|
||||
checksum = "d705ba84e1c74c8ac27784e4ac6f21584058c1dc0cadb9d39b43e109fcf8139c"
|
||||
dependencies = [
|
||||
"heck 0.4.1",
|
||||
"proc-macro2",
|
||||
@@ -13716,7 +13726,7 @@ dependencies = [
|
||||
"fd-lock",
|
||||
"io-lifetimes",
|
||||
"rustix",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
"winx",
|
||||
]
|
||||
|
||||
@@ -13860,7 +13870,7 @@ dependencies = [
|
||||
"getrandom 0.3.1",
|
||||
"once_cell",
|
||||
"rustix",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -16254,7 +16264,7 @@ version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
|
||||
dependencies = [
|
||||
"windows-sys 0.48.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -16814,7 +16824,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3f3fd376f71958b862e7afb20cfe5a22830e1963462f3a17f49d82a6c1d1f42d"
|
||||
dependencies = [
|
||||
"bitflags 2.8.0",
|
||||
"windows-sys 0.52.0",
|
||||
"windows-sys 0.59.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
||||
Reference in New Issue
Block a user