IndexedDB – Cursors In retrieving data we used the get() function when we knew what key we wanted to retrieve but if we want to step through all the values of the object store we can use cursors. Firstly we use the open cursor function and then we can add our arguments to it. The […]
Category Archives: indexeddb
IndexedDB – Error Handling Not all requests we write will return an output. This may happen due to − possible errors while writing the code. If the storage limit has been exceeded. If transactions have failed etc. In a failed request the transaction is canceled, and all the changes are reverted. But sometimes we want […]
IndexedDB – Ranges When we don’t want to get all the data at once we use ranges. When we want to get data in a specific range only we use ranges. We define the range using the IDBKeyRange object. This object has 4 methods which are − upperBound() lowerBound() bound() only() Syntax IDBKeyRange.lowerBound(indexKey); IDBKeyRange.upperBound(indexKey); IDBKeyRange.bound(lowerIndexKey, […]