COLLECTION_ALL ingestion
For a bounded array fetched entirely — the default ingestion type in Flux, and the right choice whenever a collection is small enough to cache and dispatch as one complete payload rather than paginating or evicting it.
- A store already registered via register() — see api/register
- ingestion/snapshot for the single-object counterpart, ingestion/lru for anything too large to fetch in full
Basic usage
ingestionType: 'COLLECTION_ALL' — or simply omit ingestionType entirely, since this is the default.What qualifies as COLLECTION_ALL
Shape validation
How it's cached
SNAPSHOT — the full array goes into one envelope under the channel's idbKey, with none of the per-item key splitting LRU channels use.diffBeforeUpdate
An open question worth confirming: partial realtime updates
FluxNormalizedEvent) carries one entity per event — an id, an op (CREATE/UPDATE/DELETE), and that single row's data. The spec doesn't lay out how a single-row event is reconciled into a COLLECTION_ALL channel's full array on dispatch — whether Flux merges the row into the cached array internally, or whether the array shape validation in step 3 means a single-row event would actually warn.Rather than invent a merge algorithm the source material doesn't describe, onRealtimeUpdate is the documented, safe place to handle a single-row event yourself if you need array-level reconciliation — worth confirming the exact built-in behavior against the actual dispatchToStore implementation before this section is finalized.
Because COLLECTION_ALL writes are atomic within IndexedDB, the entire array is replaced in a single transaction. Subscribers receive the updated collection intact without intermediate empty states or partial arrays during hydration.
For single-object channels, see ingestion/snapshot. For collections too large to fetch in full, see ingestion/lru. For ingestionType alongside the rest of a registration, see api/register.