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
@Deprecated('Await and use currentSession() instead')
Future<T> doWhenOpened<T>(FutureOr<T> Function(DriftSession e) fn) async {
final session = await currentSession();
return await Future.sync(() => fn(session));
}