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

SdbDatabase()

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
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.
inStoresTransaction<T>(List<SdbStoreRef<SdbKey, SdbValue>> stores, SdbTransactionMode mode, FutureOr<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<SdbKey, SdbValue>>? stores, SdbTransactionMode? mode, required FutureOr<T> run(SdbTransaction txn)}) Future<T>
Run a transaction. Use either storeNames or stores, 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