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
2 answers

alasql - Data source number 0 in undefined ,simple Javascript object as source then query, gives this error

var ProductList = JSON.parse('[{"ProductID":1,"ProductName":"Shoes"},{"ProductID":2,"ProductName":"Chocolate"}]'); alasql("CREATE TABLE Products (ProductID INT,…
Arun Prasad E S
  • 9,489
  • 8
  • 74
  • 87
1
vote
0 answers

Support for date range queries

I've big json array which contains date in one of the field in the ISO date format. Is it possible that I can fire up date range ( between two dates). Also does it support in SQL cluase ? Can you please provide a working example ?
MAQ
  • 443
  • 7
  • 15
1
vote
0 answers

How to export and import indexed db in alasql

i am using alasql to create the indexed db for the offline work. Now i want to export full db to xls in the indexedDB. Also import xls to indexedDB using alasql .
Sammu Sundar
  • 556
  • 3
  • 9
  • 24
1
vote
1 answer

Adding 'unsafe-eval' to existing chrome extension

I have an existing chrome extension in Chrome store which is being used by many people. Now I added alasql which uses eval function because of which I had to enable unsafe-eval in content_security_policy. I wanted to know will this affect existing…
Sanyam Jain
  • 2,925
  • 2
  • 23
  • 30
1
vote
0 answers

Binding dropdown in angularjs via api and exporting same in excel sheet

following is the plunker link plunker

SAN
  • 326
  • 6
  • 23
1
vote
0 answers

Custom XLSX Sheet using JS

I'm working on a custom widget that exports data from Exosite IoT Platform on .csv and .xlsx files. It's working really fine, I can do all the selection, export data but I'd like to ask if you can help me to change the way I get and show it on the…
1
vote
0 answers

Can one use CSV as an in-memory database with alasql?

I currently have data stored in a CSV and want to query this using alasql in node.js. Would it make more sense to store this in an alternative format? My requirements are that it needs to be in-memory, as speed will be paramount. Would sqlite or…
kd1978
  • 487
  • 5
  • 21
1
vote
0 answers

WrapText using alasql

how can i extract spreadsheet with a wraptext using alasql, this is what i thought will work : var mystyle = { headers: true, columns: [{ columnid: 'Description', width: 50, wraptext: true }], rows: { …
user2848242
  • 177
  • 1
  • 11
1
vote
1 answer

Export the data to excel & formatting that as requirements

I am able to give color, width for columns also & now I want to format a number that which we are sending to excel(i.e, I am sending 0 it should appear as 0.00 in excel): How is it possible? gone through Define cell format on AlaSQL/JS-XLSX Excel…
BABAJAN
  • 11
  • 3
1
vote
0 answers

parsing nested json alasql and export to excel

I have been trying to export multiple nested json into worksheets using alasql, but the problem is alasql is unable to parse nested json. var data1= [{'a':1,'b':[{'c':3,'d':4},{'c':5,'d':6}],'e':7,'f':8}]; var data2=…
AIR11
  • 11
  • 1
1
vote
1 answer

AlaSQL nested arrays

I'm trying tu use the AlaSQL Array agregator inside an array, it appears to be not supported :( Trying to acomplish this output (or like this): [ { "keyword":"project 1", "projects": [ { "year":2014, …
benjaroa
  • 334
  • 2
  • 8
1
vote
0 answers

Promises dont get resolved. Alasql doesnt import CSV

I cant figure out what the error is. I try to read out a CSV from my server and then to access the DateValues with an FUnction Called getZinsAnDatum. The Chain begins in function: $scope.calcZins = function database(ctrl, $scope) {.... I chained the…
noob
  • 23
  • 7
1
vote
1 answer

Alasql, export single xls sheet with multiple tables,

I'm using alasql to export to xls file. I'm able to export a HTML table to xls. But I have multiple tables in my HTML and I want export to xls which should have only one sheet with multiple tables; like image below. Is there a way to do this?
Amir Suhail
  • 1,284
  • 3
  • 12
  • 31
1
vote
1 answer

Passing a sql table created with alasql from Server (node.js) to Client (ejs)

I would be very glad to get some help on the following topic, given I didn't manage to get through it. My objective is to gather some data on the server side (so far I'm using alasql to transform my CSV fil into a sql table), and then pass it as a…
S. Le Brun
  • 11
  • 1
  • 3
1
vote
2 answers

Passing parameters using alasql in angularjs

js in my angular js project to export a grid to excel, heres my code: inventaire.exportMyDataVille = function(data) { var city='Safi'; alasql('SELECT * INTO XLSX("data.xlsx",{headers:true}) FROM ? WHERE secteur='+city+' GROUP BY…
user7035864