From 8064097639849a8f90c3af41b6c301271af339ee Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Wed, 26 Jul 2023 18:43:55 +0100 Subject: [PATCH] Comment --- CHANGELOG.md | 4 ++-- src/executor/insert.rs | 6 +++--- src/executor/update.rs | 2 +- tests/relational_tests.rs | 1 - 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6abec42c..99572d69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -149,10 +149,10 @@ assert_eq!(format!("{}", DisplayTea::BreakfastTea), "Breakfast Tea"); ``` * Added `UpdateMany::exec_with_returning()` https://github.com/SeaQL/sea-orm/pull/1677 ```rust -Entity::update_many() +let models: Vec = Entity::update_many() .col_expr(Column::Values, Expr::expr(..)) .exec_with_returning(db) - .await + .await?; ``` * Supporting `default_expr` in `DeriveEntityModel` https://github.com/SeaQL/sea-orm/pull/1474 ```rust diff --git a/src/executor/insert.rs b/src/executor/insert.rs index cf6f320f..2f6aa74c 100644 --- a/src/executor/insert.rs +++ b/src/executor/insert.rs @@ -82,7 +82,7 @@ where } } - /// Execute an insert operation and return the inserted model (use `RETURNING` syntax if database supported) + /// Execute an insert operation and return the inserted model (use `RETURNING` syntax if supported) pub async fn exec_with_returning<'a, C>( self, db: &'a C, @@ -141,7 +141,7 @@ where Inserter::::new(self.primary_key, self.query).exec_without_returning(db) } - /// Execute an insert operation and return the inserted model (use `RETURNING` syntax if database supported) + /// Execute an insert operation and return the inserted model (use `RETURNING` syntax if supported) pub fn exec_with_returning<'a, C>( self, db: &'a C, @@ -190,7 +190,7 @@ where exec_insert_without_returning(self.query, db) } - /// Execute an insert operation and return the inserted model (use `RETURNING` syntax if database supported) + /// Execute an insert operation and return the inserted model (use `RETURNING` syntax if supported) pub fn exec_with_returning<'a, C>( self, db: &'a C, diff --git a/src/executor/update.rs b/src/executor/update.rs index cf8938a5..e2ae3550 100644 --- a/src/executor/update.rs +++ b/src/executor/update.rs @@ -46,7 +46,7 @@ where Updater::new(self.query).exec(db).await } - /// Execute an update operation and return the updated model (use `RETURNING` syntax if database supported) + /// Execute an update operation and return the updated model (use `RETURNING` syntax if supported) /// /// # Panics /// diff --git a/tests/relational_tests.rs b/tests/relational_tests.rs index 6b0c6950..a2994ee8 100644 --- a/tests/relational_tests.rs +++ b/tests/relational_tests.rs @@ -758,7 +758,6 @@ pub async fn linked() -> Result<(), DbErr> { .build(sea_orm::DatabaseBackend::MySql) .to_string(), [ - // FIXME: This might be faulty! "SELECT `baker`.`id` AS `A_id`,", "`baker`.`name` AS `A_name`,", "`baker`.`contact_details` AS `A_contact_details`,",