Skip to content

promise

Mathias Rangel Wulff edited this page Jan 26, 2016 · 7 revisions

Promise notation

You can use promise notation for AlaSQL

alasql.promise('SELECT * FROM XLS("mydata.xls") GROUP BY name WHERE lastname LIKE "A%" and city = "London"')
      .then(function(res){
           console.log(res);
      }).catch(function(err){
           console.log('error:', err);
      });

Please make sure promise is supported - for example by including es6-promise - if using alasql in the browser.

Clone this wiki locally