demo · v141

getAllRecords

Spin up a real IndexedDB store, fill it with 1,000 synthetic records, then call getAllRecords() with options. The page returns key+value pairs in one round-trip and shows the wall-clock cost — compare against the cursor fallback below.

probing IDBObjectStore.getAllRecords…
No results yet.

the call

const tx = db.transaction("notes", "readonly");
const store = tx.objectStore("notes");
const req = store.getAllRecords({
  count: 100,
  direction: "prev",     // NEW: direction option
});
req.onsuccess = () => {
  // each record = { key, primaryKey, value }
  for (const rec of req.result) console.log(rec.key, rec.value);
};

see also