atomic<R> method

  1. @override
Future<R> atomic<R>(
  1. Future<R> delegate()
)

Runs all calls to this repository from inside delegate inside an atomic transaction.

Implementation

@override
Future<R> atomic<R>(Future<R> Function() delegate) async {
  return await find(
    postgresql,
  ).runTransaction((context) async => await delegate());
}