inBatchSync abstract method

void inBatchSync(
  1. void fn()
)

Runs a group of database operations in a batch, synchronously.

Use this when performing bulk write operations like multiple inserts/updates; it saves the overhead of multiple database commits, greatly improving performance.

Calls to inBatch must not be nested.

Any asynchronous tasks launched from inside a inBatch block must finish writing to the database before the inBatch block completes.

Implementation

void inBatchSync(void Function() fn);