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

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -