computeWithDatabase<T> method

  1. @override
Future<T> computeWithDatabase<T>(
  1. Future<T> compute(
    1. CommonDatabase db
    )
)
override

See SqliteReadContext.computeWithDatabase.

When called here directly on the connection, the call is wrapped in a write transaction.

Implementation

@override
Future<T> computeWithDatabase<T>(
    Future<T> Function(sqlite.CommonDatabase db) compute) {
  return writeTransaction((tx) async {
    return tx.computeWithDatabase(compute);
  });
}