IDBRequest class

The interface of the IndexedDB API provides access to results of asynchronous requests to databases and database objects using event handler attributes. Each reading and writing operation on a database is done using a request. The request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the instance. All asynchronous operations immediately return an instance. Each request has a readyState that is set to the 'pending' state; this changes to 'done' when the request is completed or fails. When the state is set to done, every request returns a result and an error, and an event is fired on the request. When the state is still pending, any attempt to access the result or error raises an InvalidStateError exception. In plain words, all asynchronous methods return a request object. If the request has been completed successfully, the result is made available through the result property and an event indicating success is fired at the request (IDBRequest.onsuccess). If an error occurs while performing the operation, the exception is made available through the result property and an error event is fired (IDBRequest.onerror). The interface IDBOpenDBRequest is derived from . Note: This feature is available in Web Workers

EventTarget

IDBRequest

Implemented types
Implementers
Available Extensions
Annotations
  • @JS()
  • @staticInterop

Constructors

IDBRequest()
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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