Expand documentation on how batches are executed

This commit is contained in:
Simon Binder 2019-11-27 20:18:51 +01:00
parent 6b2480f10c
commit 139908ba99
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
2 changed files with 3 additions and 1 deletions

View File

@ -40,6 +40,8 @@ class Batch {
/// By default, an exception will be thrown if another row with the same
/// primary key already exists. This behavior can be overridden with [mode],
/// for instance by using [InsertMode.replace] or [InsertMode.insertOrIgnore].
/// Using [insertAll] will not disable primary keys or any column constraint
/// checks.
void insertAll<D extends DataClass>(
TableInfo<Table, D> table, List<Insertable<D>> rows,
{InsertMode mode}) {

View File

@ -258,7 +258,7 @@ mixin QueryEngine on DatabaseConnectionUser {
/// A batch can only run a subset of statements, and those statements must be
/// called on the [Batch] instance. The statements aren't executed with a call
/// to [Batch]. Instead, all generated queries are queued up and are then run
/// and executed atomically.
/// and executed atomically in a transaction.
/// Typically, running bulk updates (so a lot of similar statements) over a
/// [Batch] is much faster than running them via the [GeneratedDatabase]
/// directly.