Insert a new record. Rejects if id already exists.
Delete a record by primary key
Delete all records matching an index value (cascade helper)
Get a single record by its primary key
Get all records matching a specific index value (foreign key lookup)
Replace an existing record (full replacement by primary key).
Atomically replace every record matching an index value with a new set,
in a single transaction: delete all matches, then insert records.
A concurrent read either sees the entire old set or the entire new set,
never a partial mix, and a mid-write failure rolls back the whole change.
Abstract storage contract. IndexedDB is the default implementation, but any backend (SQLite, REST API, in-memory) can implement this.