You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 16, 2023. It is now read-only.
That would make ensuring data consistency hard - we want to keep the callback-per-transaction behavior as this makes a ton of sense for developers, and it allows us to provide the readonly transaction for the rest of the world.
If we did this, then we couldn't provide the optional transaction for reading the rest of the world (or just reading the values of the keys that changed).
We could flatten them and provide the object store name per record - then we can preserve order as well. But we'll have a lot of data duplication w/ the object store name.
Yes, I was thinking adding the object store name as well, as in my OP. How bad would the duplication be?
To be clear, although I think simpler is better, there are probably valid reasons for the current design. I just want to help get the explainer to cover this question, as I think it'd be a FAQ.
I.e., why does the callback get called with an IDBObserverChanges which contains a map of IDBObserverChangeRecords?
Why not instead call the callback once for each change record (and add db/transaction/object store name fields to the change record)?
The text was updated successfully, but these errors were encountered: