diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c97c31455..1261e77fed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -303,6 +303,16 @@ assert_eq!(migration.status(), MigrationStatus::Pending); assert!(matches!(db.ping().await, Err(DbErr::ConnectionAcquire))); } ``` +* Added `TryInsert` that does not panic on empty inserts https://github.com/SeaQL/sea-orm/pull/1708 +```rust +// now, you can do: +let empty_insert = Bakery::insert_many(std::iter::empty()) + .on_empty_do_nothing() + .exec(db) + .await; + +assert!(matches!(empty_insert, TryInsertResult::Empty)); +``` ### Upgrades @@ -398,6 +408,7 @@ impl ColumnTrait for Column { } } ``` +* Resolved `insert_many` failing if the models iterator is empty https://github.com/SeaQL/sea-orm/issues/873 ### Breaking changes