Hello,
I try to VACUUM my db after to have delete table content
[...]
tx.executeSql("DELETE FROM event", [], function (tx, rs) {
console.log('SQLITE 1');
tx.executeSql("VACUUM", [], function (tx, rs) {
console.log('SQLITE 2');
});
});
but it doesn't work. In documentation you said that it's good to VACUUM database sometimes but I haven't see where to do this?
Thanks
In general I do NOT recommend executing VACUUM within a transaction. I recommend that you wait for an existing transaction to finish then do something like this (not tested):
Raised in https://github.com/litehelpers/Cordova-sqlite-storage/issues/678 by @tktorza:
In general I do NOT recommend executing VACUUM within a transaction. I recommend that you wait for an existing transaction to finish then do something like this (not tested):
I will test and document this further when I get a chance.
I hope to add auto-vacuum in the near future ref: litehelpers/Cordova-sqlite-storage#646