Database class abstract

provides a connection to a database; you can use an Database object to open a transaction on your database then create, manipulate, and delete objects (data) in that database. The interface provides the only way to get and manage versions of the database.

Constructors

Database(IdbFactory _factory)
ctor

Properties

factory IdbFactory
factory for this type of database
no setter
hashCode int
The hash code for this object.
no setterinherited
name String
name of the connected database.
no setter
objectStoreNames Iterable<String>
list of the names of the object stores currently in the connected database
no setter
onVersionChange Stream<VersionChangeEvent>
listen for onVersionChange event
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version int
A 64-bit integer that contains the version of the connected database.
no setter

Methods

close() → void
returns immediately and closes the connection in a separate thread.
createObjectStore(String name, {Object? keyPath, bool? autoIncrement}) ObjectStore
creates and returns a new object store or index.
deleteObjectStore(String name) → void
destroys the object store with the given name in the connected database, along with any indexes that reference it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
transaction(Object storeNameOrStoreNames, String mode) Transaction
returns a transaction object (Transaction) containing the Transaction.objectStore method, which you can use to access your object store.
transactionList(List<String> storeNames, String mode) Transaction
helper for transaction on list of object stores

Operators

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