WasmDatabase constructor
WasmDatabase({
- required CommonSqlite3 sqlite3,
- required String path,
- WasmDatabaseSetup? setup,
- IndexedDbFileSystem? fileSystem,
- bool logStatements = false,
- bool enableMigrations = true,
- 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 enableMigrations = true,
bool cachePreparedStatements = true,
}) {
return WasmDatabase._(
_WasmDelegate(
sqlite3,
path,
setup,
fileSystem,
cachePreparedStatements: cachePreparedStatements,
enableMigrations: enableMigrations,
),
logStatements,
);
}