Skip to content
Andrey Gershun edited this page May 25, 2015 · 15 revisions

Async

Sync version:

    var result = alasql(sql, params)

Async version:

    alasql(sql, params, function(result) {
 	// do something with result
    });

It is impossible to use sync version with async operations like:

  • IndexedDB functions
  • INTO- and FROM-functions

This is the example:

     var resSync = alasql('SELECT * FROM CSV("mydata.csv")')',[],function(resAsync){
          console.log(resAsync);
     });
     console.log(resSync);
Clone this wiki locally