Dexie.js
Dexie.js copied to clipboard
Abortable live query
Aborts liveQueries if unsubscribing from a liveQuery observable while querier is being executed.
Currently, when a live query is unsubscribed from while the querier is being executed, we let the querier continue it's execution but ignore it's result.
This PR will abort the querier eagerly for the purpose of unloading the db from unnecessary requests.
There might be a risk that aborting ongoing transactions could trigger possible bugs in native indexedDB implementations. Another risk is that there would be unhandled promise rejections when unsubscribing. These things needs to be tested before merging this query.