Database class abstract

Abstraction over a database either available locally or in a remote worker.

Constructors

Database()

Properties

closed Future<void>
A future that resolves when the database is closed.
no setter
fileSystem FileSystem
no setter
hashCode int
The hash code for this object.
no setterinherited
lastInsertRowId Future<int>
The rowid for the last insert operation made on this database.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
updates Stream<SqliteUpdate>
A relayed stream of CommonDatabase.updates from the remote worker.
no setter
userVersion Future<int>
The application-specific user version, mirroring CommonDatabase.userVersion being accessed in the remote worker.
no setter

Methods

additionalConnection() Future<SqliteWebEndpoint>
Creates a MessagePort (a transferrable object that can be sent to another JavaScript context like a worker) that can be used with WebSqlite.connectToPort to open another instance of this database remotely.
customRequest(JSAny? request) Future<JSAny?>
Sends a custom request to the worker database.
dispose() Future<void>
Closes this database and instructs the worker to release associated resources.
execute(String sql, [List<Object?> parameters = const []]) Future<void>
Prepares sql and executes it with the given parameters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
select(String sql, [List<Object?> parameters = const []]) Future<ResultSet>
Prepares sql, executes it with the given parameters and returns the ResultSet.
setUserVersion(int version) Future<void>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited