{"id":21689697,"url":"https://github.com/cesiumlabs/json-sql-query","last_synced_at":"2025-04-12T09:35:16.146Z","repository":{"id":57285293,"uuid":"364766542","full_name":"CesiumLabs/json-sql-query","owner":"CesiumLabs","description":"Use CRUD operations on JSON with SQL queries.","archived":false,"fork":false,"pushed_at":"2021-05-06T16:09:19.000Z","size":18,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-06T18:17:03.184Z","etag":null,"topics":["database","json","json-sql","sql"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/json-sql-query","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CesiumLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-06T02:52:44.000Z","updated_at":"2025-03-12T11:44:13.000Z","dependencies_parsed_at":"2022-09-08T21:40:35.199Z","dependency_job_id":null,"html_url":"https://github.com/CesiumLabs/json-sql-query","commit_stats":null,"previous_names":["devsnowflake/json-sql-query"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesiumLabs%2Fjson-sql-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesiumLabs%2Fjson-sql-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesiumLabs%2Fjson-sql-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CesiumLabs%2Fjson-sql-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CesiumLabs","download_url":"https://codeload.github.com/CesiumLabs/json-sql-query/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248546739,"owners_count":21122372,"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":["database","json","json-sql","sql"],"created_at":"2024-11-25T17:27:15.470Z","updated_at":"2025-04-12T09:35:16.124Z","avatar_url":"https://github.com/CesiumLabs.png","language":"JavaScript","readme":"# JSON SQL Query\nUse **CRUD** operations on **JSON** with **SQL** queries.\n\n# Installing\n\n```sh\n$ npm i --save json-sql-query\n```\n\n\u003e Note: This library is very new and does not support most of the statements\n\n# Example\n\n```js\nconst { Database } = require(\"json-sql-query\");\n\n// file based\nconst db = new Database(\"./database.json\");\n\n// in-memory\nconst db = new Database(\":memory:\");\n\n// creating a table\ndb.prepare(`CREATE TABLE IF NOT EXISTS \"DEMO\" (\"key\" TEXT, \"value\" TEXT)`).run();\n\n// inserting data\ndb.prepare(`INSERT INTO \"DEMO\" (\"key\",\"value\") VALUES (\"test_key\", \"test_value\")`).run();\n\n// fetching data\ndb.prepare(`SELECT * FROM \"DEMO\"`).run().parse();\n\n// fetching data in limit\ndb.prepare(`SELECT * FROM \"DEMO\" LIMIT 3`).run().parse(); // returns 3 items if available\n\n// update existing data\ndb.prepare(`UPDATE \"DEMO\" SET \"value\" = \"test data\" WHERE \"key\" = \"test_key\"`).run()\n\n// delete specific item\ndb.prepare(`DELETE FROM \"DEMO\" WHERE \"key\" = \"test_key\"`).run();\n\n// drop a table\ndb.prepare(`DROP TABLE \"DEMO\"`).run();\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesiumlabs%2Fjson-sql-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcesiumlabs%2Fjson-sql-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcesiumlabs%2Fjson-sql-query/lists"}