AlaSQL.js - JavaScript SQL database for browser and Node.js. Handles both traditional relational tables and nested JSON data (NoSQL). Export, store, and import data from localStorage, IndexedDB, or Excel.
Is it possible to get an Array of Arrays from a query instead of an Array of Objects?
I mean, instead of this:
var result = alasql('SELECT field1, field2 FROM table_name');
// result = [{field1: "value1", field2: "value2"}, {field1: "value3", field2: "value4"}]
This:
var result = alasql('SELECT field1, field2 FROM table_name');
// result = [["value1", "value2"], ["value3", "value4"]]
I know I can do it myself afterwards, but maybe there is a way of telling alasql to do it internally so that the results are not iterated over again by me. If result has 300k rows * 10 fields this makes a difference.
Is it possible to get an Array of Arrays from a query instead of an Array of Objects?
I mean, instead of this:
This:
I know I can do it myself afterwards, but maybe there is a way of telling alasql to do it internally so that the results are not iterated over again by me. If result has 300k rows * 10 fields this makes a difference.