← Back to release summary

IndexedDB: batchGetAll()

Category
Miscellaneous
Type
New or changed feature
Status
No active development (Chrome No active development)
Intent stage
Start prototyping

WPT details: We intend to get full test coverage as we build out the feature.

Summary

The new IDBObjectStore.batchGetAll() and IDBIndex.batchGetAll() will execute multiple getAll() calls in one query to avoid the request overhead of a burst of small queries.

Motivation

Currently, IDBObjectStore.getAll() and IDBIndex.getAll() takes an IDBKeyRange and returns an array of IDBValue. If a developer has the need to retrieve from multiple IDBKeyRanges, a burst of getAll() requests need to be issued. batchGetAll() methods will provide an ergonomic way to request multiple IDBKeyRanges while avoiding request overhead from event loops for bursts of small getAll() queries. This feature is requested by a partner via https://github.com/w3c/IndexedDB/issues/376.

Standards & signals

Ecosystem

Explainers: https://github.com/w3c/IndexedDB/issues/376

View on chromestatus.com