ComputeWithDriftIsolate<DB extends DatabaseConnectionUser> extension

Experimental methods to connect to an existing drift database from different isolates.

on
  • DB

Methods

computeWithDatabase<Ret>({required FutureOr<Ret> computation(DB), required DB connect(DatabaseConnection)}) Future<Ret>
Spawns a short-lived isolate to run the computation with a drift database.
serializableConnection() Future<DriftIsolate>
Creates a DriftIsolate that, when connected to, will run queries on the database already opened by this.