clear method

Removes all data from an object store.

Syntax

var retVal = IDBObjectStore.clear();

Parameters

This method has no parameters.

Return value

Type: IDBRequest

A request representing the results to clear the data.

Exceptions

This method can throw the following DOMException exceptions:

Note  As of a Windows Store app using JavaScript, the code property is deprecated in favor of the name property, which is preferred for standards compliance and future compatibility.

Exception propertiesCondition
name: InvalidStateError
code: DOMException.INVALID_STATE_ERR (11)

The update is not allowed for one of the following reasons: the cursor was created using openKeyCursor, the cursor is iterating to a new record, or the cursor has moved past the last record.

name: ReadOnlyError

The associated transaction is read-only.

name: TransactionInactiveError

The associated transaction has closed or is not active.

Standards information

See also

IDBObjectStore

 

 

Show:
© 2014 Microsoft