{"id":28936116,"url":"https://github.com/aalfiann/jsonql-totaljs","last_synced_at":"2025-10-03T12:02:50.922Z","repository":{"id":57285857,"uuid":"223692799","full_name":"aalfiann/jsonql-totaljs","owner":"aalfiann","description":"JsonQL NoSQL Embedded for Total.js Framework  ","archived":false,"fork":false,"pushed_at":"2020-09-04T12:46:04.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-09T04:31:59.471Z","etag":null,"topics":["json-query","jsonql","jsonql-nosql","jsonql-totaljs","totaljs"],"latest_commit_sha":null,"homepage":"https://nodei.co/npm/jsonql-totaljs/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aalfiann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-24T04:35:49.000Z","updated_at":"2023-05-15T12:59:14.000Z","dependencies_parsed_at":"2022-09-20T00:20:49.291Z","dependency_job_id":null,"html_url":"https://github.com/aalfiann/jsonql-totaljs","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/aalfiann/jsonql-totaljs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalfiann%2Fjsonql-totaljs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalfiann%2Fjsonql-totaljs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalfiann%2Fjsonql-totaljs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalfiann%2Fjsonql-totaljs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aalfiann","download_url":"https://codeload.github.com/aalfiann/jsonql-totaljs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalfiann%2Fjsonql-totaljs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261358639,"owners_count":23146671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["json-query","jsonql","jsonql-nosql","jsonql-totaljs","totaljs"],"created_at":"2025-06-22T20:07:43.476Z","updated_at":"2025-10-03T12:02:50.916Z","avatar_url":"https://github.com/aalfiann.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jsonql-totaljs\n[![NPM](https://nodei.co/npm/jsonql-totaljs.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/jsonql-totaljs/)  \n  \n[![npm version](https://img.shields.io/npm/v/jsonql-totaljs.svg?style=flat-square)](https://www.npmjs.org/package/jsonql-totaljs)\n[![Build Status](https://travis-ci.com/aalfiann/jsonql-totaljs.svg?branch=master)](https://travis-ci.com/aalfiann/jsonql-totaljs)\n[![Coverage Status](https://coveralls.io/repos/github/aalfiann/jsonql-totaljs/badge.svg?branch=master)](https://coveralls.io/github/aalfiann/jsonql-totaljs?branch=master)\n[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n[![Known Vulnerabilities](https://snyk.io//test/github/aalfiann/jsonql-totaljs/badge.svg?targetFile=package.json)](https://snyk.io//test/github/aalfiann/jsonql-totaljs?targetFile=package.json)\n[![dependencies Status](https://david-dm.org/aalfiann/jsonql-totaljs/status.svg)](https://david-dm.org/aalfiann/jsonql-totaljs)\n![License](https://img.shields.io/npm/l/jsonql-totaljs)\n![NPM download/month](https://img.shields.io/npm/dm/jsonql-totaljs.svg)\n![NPM download total](https://img.shields.io/npm/dt/jsonql-totaljs.svg)  \nJsonQL NoSQL Embedded for Total.js Framework.\n\nThis will make you easier to use [NoSQL Embedded](https://docs.totaljs.com/latest/en.html#api~DatabaseBuilder) in [Total.js Framework](https://totaljs.com).\n\n## Get Started\n\n### Install using NPM\n```bash\n$ npm install jsonql-totaljs\n```\n\n### Usage\n- Basic Query\n```javascript\nconst JsonQL = require('jsonql-totaljs');\n// create new object jsonql\nconst jsonql = new JsonQL();\n\n// build query\nvar q = [\n    {\n        select: {\n            fields:['user_id','name'],\n            from:'user',\n            where:[\n                ['name','==','budi']\n            ]\n        }\n    }\n];\n\n// with callback\njsonql.query(q).exec(function(err,data) {\n    console.log(data);        \n});\n\n// on top promise\njsonql.query(q).promise().then((data) =\u003e {\n    console.log(data);        \n});\n```\n\n- Multiple Query in Single Execution\n```javascript\nvar q = [\n    {\n        select: {\n            from:'user',\n            where:[\n                ['name','==','wawan']\n            ]\n        }\n    },\n    {\n        select: {\n            from:'profile',\n            where:[\n                ['address','==','jakarta']\n            ]\n        }\n    }\n];\n    \njsonql.query(q).exec(function(err,data) {\n    console.log(data);\n});\n```\n\n- Join Query\n ```javascript\nvar q = [\n    {\n        select: {\n            from:'user',\n            where:[\n                ['name','==','budi']\n            ],\n            join:[\n                {\n                    name:'profile',\n                    from:'user_profile',\n                    on:['id','id'],\n                    first:true\n                }\n            ]\n        }\n    }\n];\n\njsonql.query(q).exec(function(err,data) {\n    console.log(data);        \n});\n ```\n\n- Join Nested\n```javascript\nvar q = [\n    {\n        select: {\n            from:'user',\n            where:[\n                ['name','==','budi']\n            ],\n            join:[\n                {\n                    name:'profile',\n                    from:'user_profile',\n                    on:['id','id'],\n                    first:true,\n                    join:[\n                        {\n                            name:'additional',\n                            from:'user_other',\n                            on:['id','id'],\n                            first:false\n                        }\n                    ]\n                }\n            ]\n        }\n    }\n];\n\njsonql.query(q).exec(function(err,data) {\n    console.log(data);        \n});\n```\n\n- Join Nested Manually\n```javascript\nvar q = [\n    {\n        select: {\n            from:'user',\n            where:[\n                ['name','==','budi']\n            ],\n            join:[\n                {\n                    name:'profile',\n                    from:'user_profile',\n                    on:['id','id'],\n                    first:true\n                },\n                {\n                    name:'additional',\n                    from:'user_other',\n                    on:['id','id'],\n                    first:false\n                }\n            ],\n            nested:['profile','additional']\n        }\n    }\n];\n\njsonql.query(q).exec(function(err,data) {\n    console.log(data);        \n});\n```\n\n- Insert Single\n```javascript\nvar q = [\n    {\n        insert: {\n            into:'data_crud',\n            values:[\n                {\n                    id:'1',\n                    name:'aziz'\n                }\n            ]\n        }\n    }\n];\n    \njsonql.query(q).exec(function(err,data) {\n    console.log(data);\n});\n```\n\n- Insert Multiple\n```javascript\nvar q = [\n    {\n        insert: {\n            into:'data_crud',\n            values:[\n                {\n                    id:'1',\n                    name:'aziz'\n                },\n                {\n                    id:'2',\n                    name:'tika'\n                }\n            ]\n        }\n    }\n];\n    \njsonql.query(q).exec(function(err,data) {\n    console.log(data);\n});\n```\n\n- Update\n```javascript\nvar q = [\n    {\n        update: {\n            from:'data_crud',\n            where:[\n                ['name','==','aziz']\n            ],\n            set:{\n                id:'1',\n                name:'aziz alfian'\n            }\n        }\n    }\n];\n    \njsonql.query(q).exec(function(err,data) {\n    console.log(data);\n});\n```\n\n- Modify\n```javascript\nvar q = [\n    {\n        modify: {\n            from:'data_crud',\n            where:[\n                ['name','==','aziz']\n            ],\n            set:{\n                name:'M ABD AZIZ ALFIAN'\n            }\n        }\n    }\n];\n    \njsonql.query(q).exec(function(err,data) {\n    console.log(data);\n});\n```\n\n- Delete\n```javascript\nvar q = [\n    {\n        delete: {\n            from:'data_crud',\n            where:[\n                ['name','==','aziz']\n            ]\n        }\n    }\n];\n    \njsonql.query(q).exec(function(err,data) {\n    console.log(data);\n});\n```\n\n### Documentation\nFor more detail in usage, please see the documentation in our [Wiki](https://github.com/aalfiann/jsonql-totaljs/wiki).\n\n## Unit Test\nAll features has been tested, you also can learn how to use all features from unit test. \n```bash\n$ npm test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faalfiann%2Fjsonql-totaljs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faalfiann%2Fjsonql-totaljs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faalfiann%2Fjsonql-totaljs/lists"}