open static method

WebSqlite open({
  1. required Uri worker,
  2. required Uri wasmModule,
  3. DatabaseController? controller,
})

Opens a WebSqlite instance by connecting to the given worker and using the wasmModule url to load sqlite3.

The controller is used when connecting to a sqlite3 database without using workers. It should typically be the same implementation as the one passed to workerEntrypoint.

Implementation

static WebSqlite open({
  required Uri worker,
  required Uri wasmModule,
  DatabaseController? controller,
}) {
  return DatabaseClient(
    worker,
    wasmModule,
    controller ?? const _DefaultDatabaseController(),
  );
}