{"id":20769543,"url":"https://github.com/guesant/consulta-qb","last_synced_at":"2026-04-18T20:32:04.810Z","repository":{"id":163693720,"uuid":"639111628","full_name":"guesant/consulta-qb","owner":"guesant","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-26T14:38:03.000Z","size":138,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"dev","last_synced_at":"2025-10-25T03:47:58.837Z","etag":null,"topics":["json-schema","query","query-builder","specification","sql"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/guesant.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-10T19:34:58.000Z","updated_at":"2023-05-14T20:43:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"f0a5d2f9-5852-4452-b1f3-0fc24f473b56","html_url":"https://github.com/guesant/consulta-qb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/guesant/consulta-qb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guesant%2Fconsulta-qb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guesant%2Fconsulta-qb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guesant%2Fconsulta-qb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guesant%2Fconsulta-qb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guesant","download_url":"https://codeload.github.com/guesant/consulta-qb/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guesant%2Fconsulta-qb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31984125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"ssl_error","status_checked_at":"2026-04-18T20:23:29.375Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-schema","query","query-builder","specification","sql"],"created_at":"2024-11-17T11:44:12.422Z","updated_at":"2026-04-18T20:32:04.787Z","avatar_url":"https://github.com/guesant.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# consulta-qb\n\nThe goal of consulta-qb is allow to write relational database queries using a declarative language.\n\n## Examples\n\n```json\n{\n  \"select\": {\n    \"from\": \"post\",\n    \"columns\": [\n      {\n        \"column\": {\n          \"table\": \"post\",\n          \"name\": \"id\"\n        }\n      },\n      {\n        \"value\": {\n          \"column\": {\n            \"table\": \"\\\"user\\\"\",\n            \"name\": \"id\"\n          }\n        },\n        \"as\": \"Id of the author\"\n      }\n    ],\n    \"joins\": [\n      {\n        \"mode\": \"inner\",\n        \"table\": \"\\\"user\\\"\",\n        \"on\": {\n          \"==\": [\n            {\n              \"column\": {\n                \"table\": \"\\\"user\\\"\",\n                \"name\": \"id\"\n              }\n            },\n            {\n              \"column\": {\n                \"table\": \"post\",\n                \"name\": \"id_author\"\n              }\n            }\n          ]\n        }\n      }\n    ],\n    \"where\": {\n      \"\u003e\": [\n        {\n          \"column\": {\n            \"table\": \"post\",\n            \"name\": \"published_at\"\n          }\n        },\n        {\n          \"literal\": \"2023-01-01\"\n        }\n      ]\n    }\n  }\n}\n```\n\n### Why?\n\nIt's true that the declarative ways adds an overhead (larger size, too verbose etc).\n\nOn other hand, in the cases of when is needed to allow queries from user input in some way, it's trustworthy to specify what the query can do and not. This could prevent malicious and unintentional injections.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguesant%2Fconsulta-qb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguesant%2Fconsulta-qb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguesant%2Fconsulta-qb/lists"}