mirror of https://github.com/AMT-Cheif/drift.git
Expand documentation on how batches are executed
This commit is contained in:
parent
6b2480f10c
commit
139908ba99
|
@ -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}) {
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue