Whether the IDB connection has been established. Useful for tests and for callers that want to skip a slow first-call open if not needed yet.
Clears all items in a specific category. If no category is specified, clears the default category only.
The category to clear
Gets all keys in a specific category.
The category to list keys from
Retrieves a value from storage. The implementation is responsible for any deserialization required by the underlying medium:
Returns null for missing keys or corrupt entries.
Expected type of the stored value. Caller-controlled — the provider does
not validate the runtime shape against this type. Falls back to unknown.
The key to retrieve
Optionalcategory: stringOptional category for key isolation (e.g., 'RunViewCache', 'Metadata')
Batched read using a single IndexedDB transaction. The IndexedDB engine
serializes transactions on the same object store, so Promise.all([...N gets])
actually pays per-transaction setup overhead (~3–10ms each in most browsers).
Issuing all get() calls inside one transaction amortizes that overhead — for
85 keys, this is the difference between ~425ms of IDB bookkeeping and ~10ms.
Inputs are deduplicated (same key requested twice → one read, one map entry).
Missing keys map to null.
Optionalcategory: stringRemoves an item from storage.
The key to remove
Optionalcategory: stringOptional category for key isolation
Stores a value. Callers should pass plain data (objects/arrays/primitives/Date/etc). Implementations handle any serialization required by the medium:
Class instances lose their prototype on retrieval — store the underlying data
(e.g. via entity.GetAll()) and reconstruct on read if needed.
Type of the value being stored. Caller-controlled.
The key to store under
The value to store
Optionalcategory: stringOptional category for key isolation
IndexedDB storage provider with category support via separate object stores.
Native object storage: values pass through IndexedDB's structured clone algorithm — no JSON.stringify/parse round-trip. This preserves
Date,Map,Set, typed arrays, nested objects, and is significantly faster than JSON (parse/serialize implemented in browser-native C++ vs. JS-level JSON).Class instances lose their prototype — store the raw data form (e.g. via
entity.GetAll()for BaseEntity). This matches how the cache layer above already operates.Schema upgrades are version-driven: bumping
IDB_DB_VERSION(auto-derived from the package's minor version) firesonupgradeneededon the next page load, wipes all stores, and recreates them. Stale entries from any prior schema are gone in one atomic transition; no backward-compat read paths.Known categories (mj:Metadata, mj:RunViewCache, etc.) get dedicated stores; unknown categories share
mj:defaultwith prefixed keys.