Skip to content

Commit

Permalink
Merge branch 'master' into do-nothing-on-conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
darkmmon committed Jun 21, 2023
2 parents 240ec4f + f7398d1 commit 1d1f556
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 1d1f556

Please sign in to comment.