Constructor
new DBOperation(transaction, storeName)
Parameters:
Name | Type | Description |
---|---|---|
transaction |
IDBTransaction | |
storeName |
string |
Members
(private, non-null) promise_ :shaka.util.PublicPromise
Type:
(private) store_ :IDBObjectStore
Type:
- IDBObjectStore
(private) transaction_ :IDBTransaction
Type:
- IDBTransaction
Methods
abort() → (non-null) {Promise}
Returns:
- Type
- Promise
forEachEntry(callback) → (non-null) {Promise}
Calls the given callback for each entry in the database. The callback
must be synchronous, but this operation happens asynchronously.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function(number, T, !IDBCursorWithValue=) |
Returns:
- Type
- Promise
promise() → (non-null) {Promise}
Get the promise that wraps the transaction. This promise will resolve when
all requests on the object store complete successfully and the transaction
completes. If any request fails or the operation is aborted, the promise
will be rejected.
Returns:
- Type
- Promise
store() → {IDBObjectStore}
Get the store that the operation can interact with. Requests can be made
on the store. All requests made on the store will complete successfully
before the operation's promise will resolve. If any request fails, the
operation's promise will be rejected.
Returns:
- Type
- IDBObjectStore