jsonql-totaljs
JsonQL NoSQL Embedded for Total.js Framework.
This will make you easier to use NoSQL Embedded in Total.js Framework.
Get Started
Install using NPM
$ npm install jsonql-totaljs
Usage
- Basic Query
const JsonQL = ;// create new object jsonqlconst jsonql = ; // build queryvar q = select: fields:'user_id''name' from:'user' where: 'name''==''budi' ; // with callbackjsonql; // on top promisejsonql;
- Multiple Query in Single Execution
var q = select: from:'user' where: 'name''==''wawan' select: from:'profile' where: 'address''==''jakarta' ; jsonql;
- Join Query
var q = select: from:'user' where: 'name''==''budi' join: name:'profile' from:'user_profile' on:'id''id' first:true ; jsonql;
- Join Nested
var q = select: from:'user' where: 'name''==''budi' join: name:'profile' from:'user_profile' on:'id''id' first:true join: name:'additional' from:'user_other' on:'id''id' first:false ; jsonql;
- Join Nested Manually
var q = select: from:'user' where: 'name''==''budi' join: name:'profile' from:'user_profile' on:'id''id' first:true name:'additional' from:'user_other' on:'id''id' first:false nested:'profile''additional' ; jsonql;
- Insert Single
var q = insert: into:'data_crud' values: id:'1' name:'aziz' ; jsonql;
- Insert Multiple
var q = insert: into:'data_crud' values: id:'1' name:'aziz' id:'2' name:'tika' ; jsonql;
- Update
var q = update: from:'data_crud' where: 'name''==''aziz' set: id:'1' name:'aziz alfian' ; jsonql;
- Modify
var q = modify: from:'data_crud' where: 'name''==''aziz' set: name:'M ABD AZIZ ALFIAN' ; jsonql;
- Delete
var q = delete: from:'data_crud' where: 'name''==''aziz' ; jsonql;
Documentation
For more detail in usage, please see the documentation in our Wiki.
Unit Test
All features has been tested, you also can learn how to use all features from unit test.
$ npm test