count
Summary
The count method returns the number of records in an object store.
Method of apis/indexeddb/IDBObjectStoreapis/indexeddb/IDBObjectStore
Syntax
var recordCount = objectStore.count(key);
Parameters
key
- Data-type
- DOM Node
(Optional)
A key value or a reference to a IDBKeyRange object.
Return Value
Returns an object of type NumberNumber
The number of records matching the specified value or “0” if no matches are found.
Notes
The method throws and exception is
- The transaction this IDBObjectStoreSync belongs to is not active.
- The key parameter is not a valid key or a key range.
- Occurs if a request is made on a source object that has been deleted or removed.
Syntax
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]