connect abstract method

Future<Database> connect(
  1. String name,
  2. StorageMode type,
  3. AccessMode access, {
  4. bool onlyOpenVfs = false,
  5. JSAny? additionalOptions,
})

Connects to a database identified by its name stored under type and accessed via the given access mode.

When onlyOpenVfs is enabled, only the underlying file system for the database is initialized before connect returns. By default, the database will also be opened in connect. Otherwise, the database will be opened on the worker when it's first used. Only opening the VFS can be used to, for instance, check if the database already exists and to initialize it manually if it doesn't.

The optional additionalOptions must be sendable over message ports and is passed to DatabaseController.openDatabase on the worker opening the database.

Implementation

Future<Database> connect(String name, StorageMode type, AccessMode access,
    {bool onlyOpenVfs = false, JSAny? additionalOptions});