Skip to content

Commit

Permalink
Version 0.0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
agershun committed Nov 10, 2014
1 parent 83c9f03 commit bda9607
Show file tree
Hide file tree
Showing 27 changed files with 995 additions and 562 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,11 @@

* alasql.userlib replaces with alasql.fn
* Fixed gulpfile.js
* CommonJS/AMD/UMD and require.js test
* alasql(sql, params, callback) function
* SELECT * FROM one AS t
* alasql('SELECT * FROM ? AS t', [data]); - array as subquery


### 0.0.14.5 (10.11.2014)

Expand Down
42 changes: 33 additions & 9 deletions README.md
@@ -1,6 +1,6 @@
# Alasql.js - pure JavaScript client-side in-memory fast SQL-database

Version: 0.0.14.5 Date: November 10, 2014 [Changelog](CHANGELOG.md)
Version: 0.0.15 Date: November 10, 2014 [Changelog](CHANGELOG.md) [Release Plan](RELEASES.md)

Alasql - '[à la SQL](http://en.wiktionary.org/wiki/%C3%A0_la)' - is a lightweight client-side in-memory SQL database designed to work in browser and Node.js.

Expand Down Expand Up @@ -35,16 +35,24 @@ Include file: [alasql.js](./alasql.js) to the page.
```
<script src="alasql.js"></script>
<script>
alasql.exec("CREATE TABLE test (language INT, hello STRING)");
alasql.exec("INSERT INTO test VALUES (1,'Hello!')");
alasql.exec("INSERT INTO test VALUES (2,'Aloha!')");
alasql.exec("INSERT INTO test VALUES (3,'Bonjour!')");
console.table(alasql.exec("SELECT * FROM test WHERE language > 1"));
alasql("CREATE TABLE test (language INT, hello STRING)");
alasql("INSERT INTO test VALUES (1,'Hello!')");
alasql("INSERT INTO test VALUES (2,'Aloha!')");
alasql("INSERT INTO test VALUES (3,'Bonjour!')");
console.table(alasql("SELECT * FROM test WHERE language > 1"));
</script>
```

You can use alasql.js with define()/require() functions in browser as well, because it supports AMD and UMD.
You can use alasql.js with define()/require() functions in browser as well, because it supports AMD and UMD:

```
require(['../../alasql.js'], function(alasql) {
alasql('CREATE TABLE test1 (a int, b int, c int)');
alasql('INSERT INTO test1 VALUES (1,10,1)');
console.log(alasql('SELECT * FROM test1'));
});
```

### In Node.js

Expand Down Expand Up @@ -135,14 +143,14 @@ In browser:
```
<script src="alasql.js"></script>
<script>
alasql.exec('CREATE TABLE one (two INT)');
alasql('CREATE TABLE one (two INT)');
</script>
```

or in Node.js:
```
var alasql = require('alasql');
alasql.exec('CREATE TABLE one (two INT)');
alasql('CREATE TABLE one (two INT)');
```

Another approach is to create new database:
Expand Down Expand Up @@ -196,6 +204,22 @@ You can use parameters in compiled statements:
db.exec('INSERT INTO one (?,?)',[5,6]);
```
You even can use param in FROM clause:

```
var years = [
{yearid: 2012},
{yearid: 2013},
{yearid: 2014},
{yearid: 2015},
{yearid: 2016},
];
var res = alasql.queryArray('SELECT * FROM ? AS years ' +
'WHERE yearid > ?', [years,2014]);
// res == [2015,2016]
```

### Transactions

Expand Down
50 changes: 50 additions & 0 deletions RELEASES.md
@@ -0,0 +1,50 @@
## RELEASES PLAN

#### Version 0.0.20 - "Battle for SQL-92"

* Fix Dates issues (comparision, ordering)
* Dates parsing in SELECT and UPDATE
* Upper and lower case in tables, columns, and functions names issue
* Replace magic character '`' to CharCode(0) or something else similar
* Many-many SQL-92 Tests
* Complaience with [SQL-92 specifications](http://savage.net.au/SQL/sql-92.bnf.html) where it is possible
* Chrome/FireFox/Safari/IE/Chromium/Opera/Node.Js/Rhino/iOS/Android/Win8 compatibilty tests
* NULL, IS NULL
* SQL-errors
* AVG()
* PIVOT like [T-SQL](http://technet.microsoft.com/en-us/library/ms177410(v=sql.105).aspx)
* Third UNION order issue
* Float numbers like 10e20
* INSERT DEFAULT VALUES
* Development environment (clean gulp code)

#### Version 0.0.30 - "Battle for Performance"

* Remove forEach loops
* EXPLAIN
* Optmization parameters
* Data types reolution for subqueries
* Indices
* Transactions

#### Version 0.0.40 - "Battle for Memory"

* Memory leaks
* Minification
* Persistence
* ALTER TABLE
* CONSTRAINTS, PRIMARY KEYS
* Triggers

#### Version 0.0.40 - "JavaScript API"

* JavaScript API clarification
* $.alasql(sql, params) plugin
* AngularJS plugin

#### Version 0.0.50 - "Battle with Bugs"

* Bug fixing release (alpha for 0.1)

#### Version 0.1.0 - "First Pancake!"

69 changes: 10 additions & 59 deletions TODO.md
@@ -1,64 +1,5 @@
# To do

## RELEASES PLAN

#### Version 0.0.15 - "Battle for functionality"

* Sandbox for Website
* Dates parsing

#### Version 0.0.16 - "Battle for SQL-92"

* Fix Dates issues (comparision, ordering)
* Upper and lower case in tables, columns, and functions names issue
* Many-many SQL-92 Tests
* Complaience with [SQL-92 specifications](http://savage.net.au/SQL/sql-92.bnf.html) where it is possible
* Chrome/FireFox/Safari/IE/Chromium/Opera/Node.Js/Rhino/iOS/Android/Win8 compatibilty tests
* NULL, IS NULL
* SQL-errors
* AVG()
* PIVOT like [T-SQL](http://technet.microsoft.com/en-us/library/ms177410(v=sql.105).aspx)
* Third UNION order issue
* Float numbers like 10e20
* INSERT DEFAULT VALUES
* Development environment (clean gulp code)

#### Version 0.0.17 - "Battle for Performance"

* Remove forEach loops
* EXPLAIN
* Optmization parameters
* Data types reolution for subqueries
* Indices
* Transactions

#### Version 0.0.18 - "Battle for Memory"

* Memory leaks
* Minification
* Persistence
* ALTER TABLE
* CONSTRAINTS, PRIMARY KEYS
* Triggers

#### Version 0.0.19 - "JavaScript Dao"

* JavaScript API clarification

#### Version 0.0.20 - "Battle with Bugs"

* Bug fixing release (alpha for 0.1)

### Version 0.1 - "First Pancake!"

### Version 0.2 - NoSQL supports

* JavaScript search like MongoDB

### Version 0.3 - OLAP + MDX

* Mini MDX parser
* JavaScript in-memory OLAP functionality (additional library)

## FEATURES TO BE IMPLEMENTED SOON

Expand Down Expand Up @@ -191,6 +132,16 @@ SAMPLES
* One more [sample](http://yradtsevich.github.io/pure-js-websql/test/index.html)
* Create tutorial database on https://github.com/txje/js-sql-tutorial for best console

### Version 0.2 - NoSQL supports

* JavaScript search like MongoDB

### Version 0.3 - OLAP + MDX

* Mini MDX parser
* JavaScript in-memory OLAP functionality (additional library)


OTHER

* Create site alasql.org

0 comments on commit bda9607

Please sign in to comment.