-
Notifications
You must be signed in to change notification settings - Fork 688
Async
Mathias Rangel Wulff edited this page Jun 12, 2015
·
15 revisions
Normal sync version would be
var result = alasql(sql, params)To run Async version add a 3rd parameter as callback:
alasql(sql, params, function(result) {
// do something with result
});AlaSQL will always run async in the following cases.
- IndexedDB functions
- INTO- functions
- FROM-functions
Example:
var resSync = alasql('SELECT * FROM CSV("mydata.csv")')',[],function(resAsync){
console.log(resAsync);
});
console.log(resSync);© 2014-2026, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo