From 139908ba9969f355735e42de8b8863b56404d691 Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Wed, 27 Nov 2019 20:18:51 +0100 Subject: [PATCH] Expand documentation on how batches are executed --- moor/lib/src/runtime/api/batch.dart | 2 ++ moor/lib/src/runtime/api/query_engine.dart | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/moor/lib/src/runtime/api/batch.dart b/moor/lib/src/runtime/api/batch.dart index c83eb1a7..dcf86954 100644 --- a/moor/lib/src/runtime/api/batch.dart +++ b/moor/lib/src/runtime/api/batch.dart @@ -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( TableInfo table, List> rows, {InsertMode mode}) { diff --git a/moor/lib/src/runtime/api/query_engine.dart b/moor/lib/src/runtime/api/query_engine.dart index a3c484a1..e049f7b2 100644 --- a/moor/lib/src/runtime/api/query_engine.dart +++ b/moor/lib/src/runtime/api/query_engine.dart @@ -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.