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>

Available on DB, provided by the ComputeWithDriftIsolate extension

Spawns a short-lived isolate to run the computation with a drift database.
serializableConnection() Future<DriftIsolate>

Available on DB, provided by the ComputeWithDriftIsolate extension

Creates a DriftIsolate that, when connected to, will run queries on the database already opened by this.