Questions tagged [alasql]

Alasql - is a SQL database and data manipulation library, written in pure JavaScript and designed to work in browsers and Node.js. It provides a SQL language interface and data processing functions to data arrays. The library also provides import/export functions for CSV, TAB, JSON and other data file formats. It can use LocalStorage and IndexedDB as backend storage.

Alasql - 'à la SQL' - is a lightweight JavaScript SQL database designed to work in browser, Node.js, and Apache Cordova. It supports traditional SQL with some NoSQL functionality. Current version of Alasql can work in memory and use file, IndexedDB, and localStorage as a persistent storage.

See also

Useful links

225 questions
1
vote
0 answers

Excel save in AlaSQL not saving data correctly

I have an array of objects and I am using alaSQL to save it as an excel file but I am unable to save it. vm.excelSave = function(){ alasql.promise('SELECT * INTO XLSX("Statistics.xlsx",{headers:true}) FROM ?', [vm.dataPerformance]) …
MaazKhan47
  • 811
  • 1
  • 11
  • 22
1
vote
0 answers

throw Error ('Data source number +h+ is undefined) alasql

It works on jsFiddle but when I deploy my code and run it crashes. What could be the problem. var res = alasql('SELECT top 5 price, sitedetails->0->latestoffers->0->seller as seller, sitedetails->0->latestoffers->0->availability as availability,…
rubycon
  • 11
  • 2
1
vote
0 answers

Run a function in javascript when an array is being "written" or "read"

I have an array (actually the database data from alasql on github), and I want to run a function when it is "written" or "read" in script. "written" stands for push, pull and Assignment operator like =, While "read" stands for direct access to the…
Michael Lee
  • 467
  • 5
  • 14
1
vote
0 answers

[AngularJS]Export excel with file exist

I defined one file report include title, header,width for every cell.... i call this my template (picture 1).I have used the alasql lib for export the excel for my website.I received a file (picture 2). Now, I want export data to my template but i…
John
  • 207
  • 2
  • 5
  • 15
1
vote
0 answers

How to create an additional summary row within an excel sheet with alasql

I'm creating an excel sheet with alasql. For example my sheet looks like date | value1 | value2 ---------- | ------ | ------ 2016-01-01 | 2 | 3 2016-01-02 | 1 | 4 Is it possible to add a summary row at the bottom of the values?…
sylo
  • 207
  • 3
  • 16
1
vote
2 answers

alasql parses time from excel but I need only string

I'm using alaSQL to parse data from excel. in excel, I have field named: "text" and output field is "word", here I have 3 row, abc test 11:30 third is time but I need to parse as string, now it parses directly and result is:…
userProfile
  • 141
  • 1
  • 8
1
vote
1 answer

Alasql and Breeze entities, does this work?

I have the following object below which is a breeze.js entity. I am trying to do a basic group by function. In this case it is throwing an error. Is the issue is that Breeze entities are not supported? Basic select statements are working fine on…
Jordan McDonald
  • 1,101
  • 3
  • 14
  • 24
1
vote
0 answers

Grouping JSON multilevel data by multiple properties

Here are the JSON data records : results = [{ "name": "UserManagement", "parent": "modules", "grandpa": "non", "level": "module", "partitions": { } }, { "name": "UsersRoles", "level": "partition", "parent":…
Hala Ba
  • 249
  • 3
  • 21
1
vote
1 answer

How to use alasql with webpack?

I'm failing to use alasql with webpack. I instalaled alasql npm install --save alasql As mentioned on the npmjs page I added this to my webpack.config.js: plugins: [ new webpack.IgnorePlugin(/(^fs$|xlsx|xls|^path$)/), Then in my code I…
BetaRide
  • 16,207
  • 29
  • 99
  • 177
1
vote
1 answer

AlaSQL saved database location

Where can I find the locations that are made from alasql? For example alasql('CREATE TABLE one (two INT)'); Where is table one will be saved?
Al Ryan Acain
  • 477
  • 8
  • 17
1
vote
1 answer

How to sum() a column in alasql (AngularJS)

I have the following output table: Quote | art0001 | art0002 | art0003 | ===================================== 100 | 4 | 1 | 5 | 99 | 0 | 10 | 1 | 98 | 12 | 5 | 19 | 97 | 1 | 0 …
yuro
  • 2,189
  • 6
  • 40
  • 76
1
vote
0 answers

how to export complex json to excel with alasql

I have a json like this (there might be some syntax errors, I did extract and rewrite some private data) "todo-items": [{ "id": 3511710, "company-name": "company1", "author" : "Jon Doe", "tags": [{ "id": 10101, …
Mi Ro
  • 740
  • 1
  • 6
  • 31
1
vote
0 answers

running two queries and then joining the results alasql promise notation

I currently can use the following promise notation as in 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…
Arnab
  • 2,324
  • 6
  • 36
  • 60
1
vote
1 answer

How to set the alasql output as Array

I need to set the alasql output as Array. Is it possible? I don't find any method for this var pre = document.getElementById('pre'); var keys = Object.keys(alasql).map(function(e) { return [e]; }); var qLikes = alasql('SELECT * FROM ? WHERE…
contributorpw
  • 4,739
  • 5
  • 27
  • 50
1
vote
1 answer

Alasql how to export data to csv

Okay, so keyResource pulls data from my C# controller as a List of comma separated values. When the button is clicked, the console does log this data but when I set the alasql query to keyResource or to data it says datasource 0 is…