runBatched method

  1. @override
Future<void> runBatched(
  1. BatchedStatements statements
)
inherited

Prepares and runs statements.

Running them doesn't need to happen in a transaction. When using drift's batch api, drift will call this method from a transaction either way. This method mainly exists to save duplicate parsing costs, allowing each statement to be prepared only once.

Implementation

@override
Future<void> runBatched(BatchedStatements statements) {
  return _synchronized(() {
    assert(_debugCheckIsOpen());
    if (logStatements) {
      driftRuntimeOptions
          .debugPrint('Drift: Executing $statements in a batch');
    }
    return impl.runBatched(statements);
  });
}