4 ms·
There are a number of IndexedDb libraries that uses promises. However, there is or was a problem with how IndexedDb is specified to work that is not really comp
by jbergens 11y ago
There are a number of IndexedDb libraries that uses promises. However, there is or was a problem with how IndexedDb is specified to work that is not really compatible with promises. I'm not sure if they have fixed this yet.
https://github.com/promises-aplus/promises-spec/issues/45#issuecomment-10486869 https://github.com/promises-aplus/promises-spec/issues/45#is...
- haberman 11y agoInteresting info, thanks for the pointer! I can see the benefits of the indexedDb behavior: an open transaction is an exclusive resource, so leaving one dangling locks out other transactions. The auto-commit behavior means it's a lot harder to accidentally leave a transaction dangling. But it is unfortunate that this makes it not play nicely with promises.