SdbDatabase class abstract
SimpleDb database.
A database is a collection of stores. The database has a version. The database has a name. The database has a factory.
A database can be opened using SdbFactory.openDatabase.
A database can be closed using SdbDatabase.close.
- Implemented types
- Available extensions
Constructors
Properties
- factory → SdbFactory
-
Factory
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
Get the name of the database.
no setter
- openDatabaseOptions → SdbOpenDatabaseOptions?
-
Available on SdbDatabase, provided by the SdbDatabaseExtension extension
Get the openDatabaseOptions used to open the database Could be null, if an existing database is opened without open options without schema informationno setter - rawIdb → Database
-
Available on SdbDatabase, provided by the SdbDatabaseIdbExt extension
Database implementation.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
storeNames
→ Iterable<
String> -
Object store names.
no setterinherited
- version → int
-
Get the version of the database.
no setter
Methods
-
close(
) → Future< void> - Close the database.
-
compatMigrate1To2(
{List< String> ? stores}) → Future<void> -
Available on SdbClient, provided by the SdbClientMigrationExtension extension
Null means all stores Need to convert SdbTimestamp format if you created before v2 idb_shim -
inStoresTransaction<
T> (List< SdbStoreRef< stores, SdbTransactionMode mode, FutureOr<SdbKey, SdbValue> >T> callback(SdbMultiStoreTransaction txn)) → Future<T> - Run a transaction on multiple stores.
-
inStoreTransaction<
T, K extends SdbKey, V extends SdbValue> (SdbStoreRef< K, V> store, SdbTransactionMode mode, FutureOr<T> callback(SdbSingleStoreTransaction<K, V> txn)) → Future<T> - Run a transaction on a single store.
-
inTransaction<
T> ({List< String> ? storeNames, List<SdbStoreRef< ? stores, SdbTransactionMode? mode, required FutureOr<SdbKey, SdbValue> >T> run(SdbTransaction txn)}) → Future<T> -
Run a transaction.
Use either
storeNamesorstores, mode default to read only -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readSchemaDef(
) → Future< SdbDatabaseSchemaDef> -
Available on SdbDatabase, provided by the SchemaSdbDatabaseExtension extension
Read the database schema definition -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited