doWhenOpened<T> method
Performs the async fn
after this executor is ready, or directly if it's
already ready.
Calling this method directly might circumvent the current transaction. For that reason, it should only be called inside drift.
Implementation
Future<T> doWhenOpened<T>(FutureOr<T> Function(QueryExecutor e) fn) {
return executor.ensureOpen(attachedDatabase).then((_) {
_isOpen = true;
return fn(executor);
});
}