1

我目前可以在 wiki 中使用以下承诺符号。

alasql.promise('SELECT * FROM XLS("mydata.xls") WHERE lastname LIKE "A%" and city = "London" GROUP BY name ')
      .then(function(res){
           console.log(res); // output depends on mydata.xls
      }).catch(function(err){
           console.log('Does the file exists? there was an error:', err);
      });

我需要做的是运行两个查询,然后使用自定义 js 合并结果数据。

我可以在运行查询之前初始化两个数组,然后在内部将查询结果块复制到数组中,但这是处理这种情况的正确方法。

真诚感谢任何帮助。

4

0 回答 0