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.
The StorageAdapter contract held in plain Maps. Used by Node tests and by anything that wants a project without a browser.
Behaves like the IndexedDB adapter: an index name is the field it reads (
getAllByIndex("clips", "track_id", id)filters onrow.track_id), andaddrejects when the id already exists.Rows are structured-cloned on the way in and out, like IndexedDB does, so a caller can never change a stored row by mutating a reference. Rows hold only JSON-like data, never a File or Blob; keep it that way.