transaction<R> method
Future<R>
transaction<R>(
- Future<
R> body(- KeyStoreTxn<
String, AtNotification, dynamic> txn
- KeyStoreTxn<
override
Run body as a transaction. Mutations performed via the
supplied handle are buffered in memory and applied in body
order on successful completion; if the body throws, the
buffer is dropped and the exception propagates.
Hive impls provide best-effort atomicity; a future SQL impl will provide true atomicity.
Implementation
@override
Future<R> transaction<R>(
Future<R> Function(KeyStoreTxn<String, AtNotification, dynamic> txn)
body) async {
// Notifications are appended one-at-a-time in practice; a minimal
// buffered transaction keeps the contract without a bespoke handle.
throw UnsupportedError(
'transaction() is not used on the notification keystore');
}