contributions/mobl/www/js/persistence.store.sql.js
/**
   * Utility function to execute a series of queries in an asynchronous way
   * @param tx the transaction to execute the queries on
   * @param queries an array of [query, args] tuples
   * @param callback the function to call when all queries have been executed
   */
Utility function to execute a series of queries in an asynchronous way
@param tx the transaction to execute the queries on
@param queries an array of [query, args] tuples
@param callback the function to call when all queries have been executed
Utility function to execute a series of queries in an asynchronous way @param tx the transaction to execute the queries on @param queries an array of [ query args ] tuples @param callback the function to call when all queries have been executed
function executeQueriesSeq (tx, queries, callback) {
    var callbackArgs = [];
    for ( var i = 3; i < arguments.length; i++) {
      callbackArgs.push(arguments[i]);
    }
    persistence.asyncForEach(queries, function(queryTuple, callback) {
        tx.executeSql(queryTuple[0], queryTuple[1], callback, function(_, err) {
            console.log(err.message);
            callback();
          });
      }, function() {
        if(callback) callback.apply(null, callbackArgs);
      });
  }
function executeQueriesSeq ( tx , queries , callback ) { var callbackArgs = [ ] ; for ( var i = 3 ; i < arguments . length ; i ++ ) { callbackArgs . push ( arguments [ i ] ) ; } persistence . asyncForEach ( queries , function ( queryTuple , callback ) { tx . executeSql ( queryTuple [ 0 ] , queryTuple [ 1 ] , callback , function ( _ , err ) { console . log ( err . message ) ; callback ( ) ; } ) ; } , function ( ) { if ( callback ) callback . apply ( null , callbackArgs ) ; } ) ; }
Utility function to execute a series of queries in an asynchronous way
 @param tx the transaction to execute the queries on
 @param queries an array of [query, args] tuples
 @param callback the function to call when all queries have been executed
Utility function to execute a series of queries in an asynchronous way @param tx the transaction to execute the queries on @param queries an array of [ query args ] tuples @param callback the function to call when all queries have been executed
// queries.reverse();