Skip to content

Commit

Permalink
Fix accumulating data for localstorage test
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasrw committed Mar 25, 2017
1 parent 08afd2a commit c5814b8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 25 deletions.
25 changes: 4 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
{
"name": "alasql",
"description": "Versatile SQL database for browser or node. Handles relational data and nested JSON (noSQL). Export to and import from Excel, localStorage or IndexedDB",
"description": "Use SQL to select and filter javascript data - including relational joins and search in nested objects (JSON). Export to and import from Excel and CSV",
"version": "0.3.9",
"author": "Andrey Gershun <agershun@gmail.com>",
"contributors": [
{
"name": "Mathias Rangel Wulff",
"email": "mathias@rawu.dk"
}
"Mathias Rangel Wulff <m@rawu.dk>"
],
"directories": {
"test": "test"
Expand Down Expand Up @@ -72,29 +69,15 @@
"homepage": "https://github.com/agershun/alasql",
"main": "dist/alasql.fs.js",
"keywords": [
"sql",
"nosql",
"graph",
"alasql",
"SQL",
"javascript",
"parser",
"database",
"DBMS",
"data",
"query",
"localStorage",
"IndexedDB",
"DOM-storage",
"SQLite",
"JSON",
"Excel",
"XLSX",
"XLS",
"CSV",
"worker"
"CSV"
],
"license": "MIT",
"preferGlobal": true,
"testling": {
"browsers": [
"ie/6..latest",
Expand Down
10 changes: 7 additions & 3 deletions test/test389.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ if(typeof exports === 'object') {

describe('Test 389 Autoincrement for localStorage', function() {



it('1. CREATE DATABASE',function(done){
alasql('CREATE DATABASE test389;USE test389');
done();
Expand All @@ -27,14 +29,16 @@ describe('Test 389 Autoincrement for localStorage', function() {
done();
});

it('3. SELECTs', function(done){
it('3. SELECTs', function(){
alasql('USE test');
alasql('INSERT INTO test.one (b) VALUES ("one"), ("two")');
alasql('INSERT INTO test.one (b) VALUES ("three"), ("four")');
alasql('COMMIT TRANSACTION');
var res = alasql('SELECT * FROM test.one');
//console.log(res);
done();
//Missing assert()

alasql('TRUNCATE TABLE test.one; COMMIT TRANSACTION');

});

it('99. DROP DATABASE',function(done){
Expand Down
2 changes: 1 addition & 1 deletion test/test604.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"Atlas": "{\"databaseid\":\"Atlas\",\"tables\":{\"transactions\":true}}",
"Atlas.transactions": "{\"columns\":[{\"columnid\":\"transid\",\"dbtypeid\":\"\"},{\"columnid\":\"payee\",\"dbtypeid\":\"\"},{\"columnid\":\"amount\",\"dbtypeid\":\"\"}],\"data\":[],\"identities\":{}}",
"test": "{\"databaseid\":\"test\",\"tables\":{\"one\":true}}",
"test.one": "{\"columns\":[{\"columnid\":\"a\",\"dbtypeid\":\"INT\",\"identity\":{\"value\":1,\"step\":1}},{\"columnid\":\"b\",\"dbtypeid\":\"STRING\"}],\"data\":[{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"},{\"b\":\"one\"},{\"b\":\"two\"},{\"b\":\"three\"},{\"b\":\"four\"}],\"identities\":{\"a\":{\"value\":1,\"step\":1}}}",
"test.one": "{\"columns\":[{\"columnid\":\"a\",\"dbtypeid\":\"INT\",\"identity\":{\"value\":1,\"step\":1}},{\"columnid\":\"b\",\"dbtypeid\":\"STRING\"}],\"data\":[],\"identities\":{\"a\":{\"value\":1,\"step\":1}}}",
"ls379": "{\"databaseid\":\"ls379\",\"tables\":{\"one\":true}}",
"ls379.one": "{\"columns\":[{\"columnid\":\"a\",\"dbtypeid\":\"INT\"},{\"columnid\":\"b\",\"dbtypeid\":\"STRING\"}],\"data\":[],\"identities\":{}}"
}

0 comments on commit c5814b8

Please sign in to comment.