WasmDatabase constructor

WasmDatabase(
  1. {required CommonSqlite3 sqlite3,
  2. required String path,
  3. WasmDatabaseSetup? setup,
  4. IndexedDbFileSystem? fileSystem,
  5. bool logStatements = false,
  6. bool cachePreparedStatements = true}
)

Creates a wasm database at path in the virtual file system of the sqlite3 module. If fileSystem provided, the data is guaranteed to be stored in the IndexedDB when the request is complete. Attention! Insert/update queries may be slower when this option enabled. If you want to insert more than one rows, be sure you run in a transaction if possible.

Implementation

factory WasmDatabase({
  required CommonSqlite3 sqlite3,
  required String path,
  WasmDatabaseSetup? setup,
  IndexedDbFileSystem? fileSystem,
  bool logStatements = false,
  bool cachePreparedStatements = true,
}) {
  return WasmDatabase._(
    _WasmDelegate(sqlite3, path, setup, fileSystem, cachePreparedStatements),
    logStatements,
  );
}