Database class abstract

Database.

The database object and client for the store and record operations

Implemented types
Available extensions

Constructors

Database()

Properties

hashCode → int
The hash code for this object.
no setterinherited
path → String
Database path
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
version → int
Version of the database
no setter

Methods

addAllStoresOnChangesListener(TransactionRecordChangeListener onChanges, {List<String>? excludedStoreNames, StoresTrackOnChangesStorePredicate? storePredicate}) → void

Available on Database, provided by the SembastDatabaseAllStoresChangesListenerExtension extension

Listen for changes on all stores
checkForChanges() → Future<void>

Available on Database, provided by the DatabaseExtension extension

Behavior depends on the implementation. On sembast io, nothing will happen. On sembast_web and sembast_sqflite, data will be read again (incrementally or not) to handle external changes.
close() → Future
Close the database
compact() → Future<void>

Available on Database, provided by the DatabaseExtension extension

Compact the database.
dropAll() → Future<void>

Available on DatabaseClient, provided by the SembastDatabaseClientExtension extension

Clear all records in the database. Close all existing listeners.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reload() → Future<void>

Available on Database, provided by the DatabaseExtension extension

Warning: unsafe.
removeAllStoresOnChangesListener(TransactionRecordChangeListener onChanges) → void

Available on Database, provided by the SembastDatabaseAllStoresChangesListenerExtension extension

Remove a global change listener
reOpen() → Future<void>

Available on Database, provided by the DatabaseExtension extension

Warning: unsafe.
toString() → String
A string representation of this object.
inherited
transaction<T>(FutureOr<T> action(Transaction transaction)) → Future<T>
execute the action in a transaction use the current if any

Operators

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