Version 0.0.2 (31.01.2015) ChangelogRelease plan
Sorry, work still in progress. Only WebSQL/SQLite SQL parser is ready for the moment.
You can also look at the AlaSQL project with IndexedDB support.
To use WebSQLShim add the websqlshim.js library to your page:
<scriptsrc="websqlshim.js"></script><script>vardb=WebSQLShim.openDatabase("mybase",'0.1','',100000);db.transaction(function(tx){tx.executeSql('SELECT * FROM one WHERE a = ?',[10],function(result){},function(error){console.log(error);});});</script>In case you want to use WebSQLShim as WebSQL shim add this replacement code:
<scriptsrc="websqlshim.js"></script><script>if(typeofopenDatabase=='undefined')openDatabase=WebSQLShim.openDatabase;//...vardb=openDatabase("mybase",'0.1','',100000);//...</script>WebSQL/SQLite language Jison grammar file and JavaScript parser.
Use Mocha.js test package. To run tests in Node.js:
cd test/main // main function tests
mocha .
cd test/parser // parser tests
mocha .
Andrey Gershun MIT LICENSE