open static method
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.
The optional handleCustomRequest
function is invoked when the controller
sends a custom request to the client (via ClientConnection.customRequest).
If it's absent, the default is to throw an exception when called.
Implementation
static WebSqlite open({
required Uri worker,
required Uri wasmModule,
DatabaseController? controller,
Future<JSAny?> Function(JSAny?)? handleCustomRequest,
}) {
return DatabaseClient(
worker,
wasmModule,
controller ?? const _DefaultDatabaseController(),
handleCustomRequest,
);
}