Skip to content

Commit

Permalink
CREATE TABLE without column types
Browse files Browse the repository at this point in the history
  • Loading branch information
agershun committed Apr 1, 2015
1 parent b164896 commit b7eb835
Show file tree
Hide file tree
Showing 18 changed files with 433 additions and 396 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Changelog


### 0.0.43 "The Wall" (25.03.2015 - ...03.2015)
### 0.0.43 "The Wall" (25.03.2015 - 01.04.2015)
* Created "develop" branch for git-flow
* Fixed GREATEST and LEAST() bugs
* Added flags {sourcefilename: "aaa", range:"B4"} to INTO XLSX() function
* CREATE TABLE one(two,three) - without coulmn types

### 0.0.42 "Robin" (17.03.2015 - 25.03.2015)
* MAX() and MIN() math functions renamed to GREATEST() and LEAST()
Expand Down
1 change: 1 addition & 0 deletions PEOPLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ In English:
* ValueType [Pure JavaScript In-Memory Database](http://valuetype.wordpress.com/2014/11/07/pure-javascript-in-memory-database/)
* SlideShare [Alasql.js fast JavaScript in-memory SQL database](http://www.slideshare.net/AndreyGershun/alasqljsfast-javascript-inmemory-sql-database)
* SlideShare [SQL and NoSQL in Alasql database](http://www.slideshare.net/AndreyGershun/sql-and-nosql-in-alasql)
* Glauco Custódio [Local Storage with AlaSQL in Cordova/Ionic Framework](http://blog.glaucocustodio.com/2015/03/30/local-storage-with-alasql-in-cordovaionic-framework/)


In Chinese
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Alasql.js - JavaScript SQL database library with support of localStorage, IndexedDB, and Excel

Version: 0.0.42 "Robin" Date: March 25, 2015 [Change log](CHANGELOG.md), [Release plan](RELEASES.md)
Version: 0.0.43 "The Wall" Date: April 1, 2015 [Change log](CHANGELOG.md), [Release plan](RELEASES.md)

Alasql - '[à la SQL](http://en.wiktionary.org/wiki/%C3%A0_la)' - 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.

Expand Down
259 changes: 131 additions & 128 deletions alasql.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion alasql.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions alasql.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions console/alasql.min.js

Large diffs are not rendered by default.

259 changes: 131 additions & 128 deletions dist/alasql.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/alasql.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/alasql.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alasql",
"description": "Alasql - JavaScript SQL database and data manipulation library",
"version": "0.0.42",
"version": "0.0.43",
"author": "Andrey Gershun <[email protected]>",
"directories": {
"example": "examples",
Expand Down
4 changes: 2 additions & 2 deletions src/10start.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//
// alasql.js
// Alasql - JavaScript SQL database
// Date: 25.03.2015
// Version: 0.0.42
// Date: 01.04.2015
// Version: 0.0.43
// (ñ) 2014, Andrey Gershun
//

Expand Down
2 changes: 2 additions & 0 deletions src/alasqlparser.jison
Original file line number Diff line number Diff line change
Expand Up @@ -1511,6 +1511,8 @@ ColumnDef
{ $$ = new yy.ColumnDef({columnid:$1}); yy.extend($$,$2); yy.extend($$,$3);}
| Literal ColumnConstraints
{ $$ = new yy.ColumnDef({columnid:$1}); yy.extend($$,$2); }
| Literal
{ $$ = new yy.ColumnDef({columnid:$1, dbtypeid: ''}); }
;

ColumnType
Expand Down
255 changes: 129 additions & 126 deletions src/alasqlparser.js

Large diffs are not rendered by default.

Binary file modified test/test169a.xlsx
Binary file not shown.
Binary file modified test/test238b.xlsx
Binary file not shown.
Binary file modified test/test251.xlsx
Binary file not shown.
25 changes: 25 additions & 0 deletions test/test252.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
if(typeof exports === 'object') {
var assert = require("assert");
var alasql = require('../alasql.js');
} else {
__dirname = '.';
};


describe('Test 252 CREATE TABLE without column types', function() {

it('1. Overwrite',function(done){

alasql('CREATE DATABASE test252; USE test252;');
alasql('CREATE TABLE sqlite_sequence(name,seq)');
alasql('INSERT INTO sqlite_sequence VALUES (1,10)');
alasql('INSERT INTO sqlite_sequence VALUES ("one","ten")');
var res = alasql('SELECT * FROM sqlite_sequence');
// console.log(res);

assert.deepEqual(res,[ { name: 1, seq: 10 }, { name: 'one', seq: 'ten' } ]);
done();
});

});

0 comments on commit b7eb835

Please sign in to comment.