I’m having some trouble using Dexie inside a WebSQL transaction. It looks like Dexie closes WebSQL transaction when it’s promise is finished.
The code structure looks something like this:
AccessIndexDBThroughDexie = () => {
return this.dexieTable.bulkPut(data);
};
Database.read( tx => {
tx.executeFragment('SQL ...')
.then((result) => {
return AccessIndexDBThroughDexie(result);
})
.then( () => {
return tx.executeFragment('SQL ...'); //this execution raises the error on DOM
})
})
This throws the following error:
DOMException: Failed to execute 'executeSql' on 'SQLTransaction': SQL execution is disallowed.
I tried solving it with Dexie.transaction to see if explicitly creating a transaction for the Dexie operations it would do it, but it didn’t made any difference.
Is there a way to prevent Dexie from interfering with webSQL transactions?