sql - javascript/WebSQL: how to cancel query -
I have a situation in which I execute a complex query that will take some time but sometimes I need the result now Not so, so I want to cancel it. Is this possible? Here's the basic structure:
db.transaction (function (tx) {tx.executeSql ('SELECT * FROM ... JOIN ...', [a, b, c], callback );}, Function (mistake) {....}, function () {/ * transaction complete *}};
There is no exception in the WebSQL API Recommended method Invalid transaction active transaction in SQL You want to include and cancel rollback, as follows:
var errback = {return true; // rollback} tx.executeSql ('ABORT', [], faucet, disturbances); / / Yes, this will cause the error
Comments
Post a Comment