moor_web library
A version of moor that runs on the web by using sql.js You manually need to include that library into your website to use the web version of moor. See the documentation for a more detailed instruction.
Classes
- PreparedStatement
- Dart api wrapping an underlying prepared statement object from the sql.js library.
- SqlJsDatabase
- Dart wrapper around a sql database provided by the sql.js library.
- SqlJsModule
-
sql.js
module from the underlying library - WebDatabase
-
Experimental drift backend for the web. To use this platform, you need to
include the latest version of
sql.js
in your html.
Extensions
- PortToChannel on MessagePort
-
Extension to transform a raw MessagePort from web workers into a Dart
StreamChannel
.
Functions
-
initSqlJs(
) → Future< SqlJsModule> -
Calls the
initSqlJs
function from the native sql.js library.
Typedefs
-
CreateWebDatabase
= FutureOr<
Uint8List> Function() - Signature of a function that asynchronously initializes a web database if it doesn't exist. The bytes returned should represent a valid sqlite3 database file.
- MoorWebStorage = DriftWebStorage
- Interface to control how moor should store data on the web.
-
WebSetup
= FutureOr<
void> Function(SqlJsDatabase database) - Signature of a function that initializes a SqlJsDatabase before its used by drift.