IDBDatabase class

The interface of the IndexedDB API provides a connection to a database; you can use an 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. Note: This feature is available in Web Workers Note: Everything you do in IndexedDB always happens in the context of a transaction, representing interactions with data in the database. All objects in IndexedDB — including object stores, indexes, and cursors — are tied to a particular transaction. Thus, you cannot execute commands, access data, or open anything outside of a transaction.

EventTarget

IDBDatabase

Implemented types
Available extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

IDBDatabase()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
name String

Available on IDBDatabase, provided by the PropsIDBDatabase extension

no setter
objectStoreNames DOMStringList

Available on IDBDatabase, provided by the PropsIDBDatabase extension

no setter
onabort EventHandlerNonNull<Event>?

Available on IDBDatabase, provided by the PropsIDBDatabase extension

getter/setter pair
onclose EventHandlerNonNull<Event>?

Available on IDBDatabase, provided by the PropsIDBDatabase extension

getter/setter pair
onerror EventHandlerNonNull<Event>?

Available on IDBDatabase, provided by the PropsIDBDatabase extension

getter/setter pair
onversionchange EventHandlerNonNull<Event>?

Available on IDBDatabase, provided by the PropsIDBDatabase extension

getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
version int

Available on IDBDatabase, provided by the PropsIDBDatabase extension

no setter

Methods

addEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

close() → void

Available on IDBDatabase, provided by the PropsIDBDatabase extension

createObjectStore(String name, [IDBObjectStoreParameters? options]) IDBObjectStore

Available on IDBDatabase, provided by the PropsIDBDatabase extension

deleteObjectStore(String name) → void

Available on IDBDatabase, provided by the PropsIDBDatabase extension

dispatchEvent(Event event) bool

Available on EventTarget, provided by the PropsEventTarget extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

toString() String
A string representation of this object.
inherited
transaction(dynamic storeNames, [IDBTransactionMode? mode = IDBTransactionMode.readonly, IDBTransactionOptions? options]) IDBTransaction

Available on IDBDatabase, provided by the PropsIDBDatabase extension

Operators

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