open abstract method

Future<DatabaseConnection> open(
  1. WasmStorageImplementation implementation,
  2. String name, {
  3. FutureOr<Uint8List?> initializeDatabase()?,
  4. WasmDatabaseSetup? localSetup,
  5. bool enableMigrations = true,
})

Opens a connection to a database via the chosen implementation.

When this database doesn't exist, initializeDatabase is invoked to optionally return the initial bytes of the database. When enableMigrations is set to false, drift will not check the user_version pragma when opening the database or run migrations.

Implementation

Future<DatabaseConnection> open(
  WasmStorageImplementation implementation,
  String name, {
  FutureOr<Uint8List?> Function()? initializeDatabase,
  WasmDatabaseSetup? localSetup,
  bool enableMigrations = true,
});