getAll() method of the
IDBObjectStore interface returns an
containing all objects in the object store matching the specified parameter or all
objects in the store if no parameters are given.
If a value is successfully found, then a structured clone of it is created and set as the result of the request object.
This method produces the same result for:
- a record that doesn't exist in the database
- a record that has an undefined value
To tell these situations apart, you either call
var request = objectStore.getAll(); var request = objectStore.getAll(query); var request = objectStore.getAll(query, count);
- query Optional
- A key or
IDBKeyRangeto be queried. If nothing is passed, this will default to a key range that selects all the records in this object store.
- count Optional
- Specifies the number of values to return if more than one is found. If it is lower
0or greater than
2^32 - 1a
TypeErrorexception will be thrown.
IDBRequest object on which subsequent events related to this
operation are fired.
This method may raise a
DOMException of one of the following types:
The key or key range provided contains an invalid key or is null.
TypeError exception is thrown if the
count parameter is
2^32 - 1 included.
|Indexed Database API 3.0 (Indexed DB 3.0)|
BCD tables only load in the browser