Skip to content

Commit

Permalink
Merge branch 'release/0.1.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
agershun committed May 7, 2015
2 parents 9941350 + 45a017e commit c615f20
Show file tree
Hide file tree
Showing 31 changed files with 3,969 additions and 1,929 deletions.
6 changes: 2 additions & 4 deletions .bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alasql",
"description":"AlaSQL.js - JavaScript SQL database library for relational and graph data with support of localStorage, IndexedDB, and Excel",
"version": "0.1.1",
"version": "0.1.2",
"license": "MIT",
"keywords": [
"sql",
Expand All @@ -15,7 +15,6 @@
"query",
"localStorage",
"IndexedDB",
"DOM-storage",
"SQLite",
"JSON",
"Excel",
Expand All @@ -31,9 +30,8 @@
"url": "https://github.com/agershun/alasql.git"
},
"dependencies": {
"dom-storage":"2.0.1",
"xlsjs":"0.7.15",
"xlsx":"0.8.0"
"js-xlsx":"0.8.0"
},
"devDependencies": {
"gulp":"3.8.11",
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Changelog

### 0.1.1 "Milano" (03.05.2015 - ...05.2015)
### 0.1.2 "Firenze" (06.05.2015 - 07.05.2015)
* Simple compilation of SEARCH operator
* SUM(),COUNT(),MIN(),MAX(),FIRST(),LAST() search aggregators
* # operator, CREATE VERTEX #
* SEARCH # - start with object
* SERCH smth # - test for object
* SEARCH VALUE - leave only one first object in the result
* Bug in browser version (no global object)
* Changed Bower
* CREATE GRAPH
* Minor changes in SEARCH over XML syntax
* New tests added

### 0.1.1 "Milano" (03.05.2015 - 04.05.2015)
* XLSXML() into- function with colors
* $$hashKey - remove Angular's key
* CREATE VERTEX, CREATE EDGE
Expand Down
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AlaSQL.js - JavaScript SQL database library for relational and graph data with support of localStorage, IndexedDB, and Excel

Version: 0.1.1 "Milano" Date: May 5, 2015 [Change log](CHANGELOG.md), [Release plan](RELEASES.md)
Version: 0.1.2 "Firenze" Date: May 7, 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 Expand Up @@ -54,28 +54,22 @@ Check AlaSQL vs other JavaScript SQL databases and data processing libraries:
AlaSQL now is multi-paradigm database with support documents and graphs. Below you can find an example
how to create graph:
```js
alasql('SET @olga = (CREATE VERTEX "Olga")');
alasql('SET @helen = (CREATE VERTEX "Helen")');
alasql('SET @pablo = (CREATE VERTEX "Pablo")');
alasql('SET @andrey = (CREATE VERTEX "Andrey")');
alasql('SET @alice = (CREATE VERTEX "Alice")');
alasql('CREATE EDGE FROM @olga TO @pablo');
alasql('CREATE EDGE FROM @helen TO @andrey');
alasql('CREATE EDGE FROM @pablo TO @alice');
alasql('CREATE EDGE FROM @andrey TO @alice');
alasql('CREATE GRAPH #Olga, #Helen, #Pablo, #Andrey, #Alice, \
#Olga >> #Pablo, #Helen >> #Andrey, \
#Pablo >> #Alice, #Andrey >> #Alice');
```
and search over it with SEARCH operator:
```js
// Whom loves Olga?
alasql('SEARCH "Olga" >> name');
alasql('SEARCH #Olga >> name');
// ['Pablo']

// Whom loves Olga's love objects?
alasql('SEARCH "Olga" >> >> name');
alasql('SEARCH #Olga >> >> name');
// ['Alice']

// Who loves lovers of Alice?
alasql('SEARCH IF(>> >> "Alice") name');
alasql('SEARCH ANY(>> >> #Alice) name');
// ['Olga','Helen']

```
Expand All @@ -90,9 +84,9 @@ You also make searches over JSON object with SEARCH operator:
var res = alasql('SEARCH /+b FROM ?',[data]);
var res = alasql('SEARCH a* b FROM ?',[data]);
var res = alasql('SEARCH a+ b FROM ?',[data]);
var res = alasql('SEARCH a? b FROM ?',[data]);
var res = alasql('SEARCH a? b WHERE(b>20) FROM ?',[data]);
```
Please see more examples in test300-test304.js. All these features will be documented soon.
Please see more examples in test300-test309.js. All these features will be documented soon.

### Version upgrade from 0.0.51 to 0.1.0

Expand Down
71 changes: 71 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,77 @@ This file contanis unstructured ideas for future development of AlaSQL.

## Ideas






search / ORDER BY(name DESC)

if next selector is order, then

(/ ORDER BY (no))+

SEARCH c @c sel(a b) ORDER BY(_) @b @[(@c),(@b)]

SEARCH c sel(/ ORDER BY(age))+ @b {name:@c,age:@b}


search :person @p where(age > 2) > :loves > where(sex="F") @@p;
ok = where;


Read: Neo.js
http://neo4j.com/docs/stable/query-unwind.html


create graph #Andrey, #Bonapart, #Andrey >> #Bonapart, #Olga {age:26};

alasql('create graph from gedf("my.gedf"');
alasql('search edge set(color="black"');
alasql('search #Andrey path(#Bonapart) set(color="red")');
d3.force()
.nodes(alasql('search vertex d3()'))
.links(alasql('search edge d3()'));


alasql('search #Andrey path(#Olga) set(color="red")');
alasql('search #Andrey paths((>>)+ OK(sex="F")) / set(color="red")');


1.Change XML mode from '/' to simple tag
2. Add HTML parser (?)


#SUM(_,/b)

alasql('=1+1'); // = operator
alasql('=#Andrey');

alasql('=#SUM(@1,)');
alasql('=(SEARCH SUM(VERTEX))');

alasql('=(SEARCH SUM(a) FROM _)');
alasql('=(SEARCH _ SUM(a))');
alasql('=#SUM(_,a)');
alasql('=#SUM(VERTEX)');

alasql('=(SEARCH SUM(VERTEX))');
alasql('=(SEARCH SUM(EDGE))');
alasql('=(SEARCH SUM(VERTEX),SUM(EDGE))');
alasql('=(SEARCH ALL(SUM(VERTEX),SUM(EDGE))');
alasql('=(SEARCH ANY(SUM(VERTEX),SUM(EDGE))');


alasql('SELECT #SUM(/a) FROM one')

SEARCH a EX( COUNT(b) + COUNT(c d))



(SEARCH SUM(c d) FROM _)


Add ! operator;


Expand Down
1,597 changes: 988 additions & 609 deletions alasql.js

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions console/alasql.min.js

Large diffs are not rendered by default.

1,597 changes: 988 additions & 609 deletions dist/alasql.js

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions dist/alasql.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ gulp.task('js-merge', function () {
'./src/832xlsxml.js',
'./src/84from.js',
'./src/843xml.js',
'./src/844gexf.js',
'./src/85help.js',
'./src/86print.js',
'./src/87source.js',
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "alasql",
"description": "AlaSQL.js - JavaScript SQL database library for relational and graph data with support of localStorage, IndexedDB, and Excel",
"version": "0.1.1",
"version": "0.1.2",
"author": "Andrey Gershun <[email protected]>",
"directories": {
"example": "examples",
Expand All @@ -16,7 +16,7 @@
"jison":"0.4.15",
"lodash":"3.7.0",
"xlsjs":"0.7.15",
"xlsx":"0.8.0"
"js-xlsx":"0.8.0"
},
"engines": [
"node"
Expand Down
4 changes: 2 additions & 2 deletions src/05copyright.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//
// alasql.js
// AlaSQL - JavaScript SQL database
// Date: 4.05.2015
// Version: 0.1.1
// Date: 7.05.2015
// Version: 0.1.2
// (ñ) 2014-2015, Andrey Gershun
//

Expand Down
2 changes: 1 addition & 1 deletion src/10start.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,5 @@ var alasql = function(sql, params, cb, scope) {
};

/** Current version of alasql */
alasql.version = "0.1.1";
alasql.version = "0.1.2";

Loading

0 comments on commit c615f20

Please sign in to comment.