{"id":28187735,"url":"https://github.com/bsahd/sql-builder","last_synced_at":"2025-10-19T22:17:30.872Z","repository":{"id":292321498,"uuid":"980522028","full_name":"bsahd/sql-builder","owner":"bsahd","description":"A simple tool for building safe and readable SQL Querys","archived":false,"fork":false,"pushed_at":"2025-07-18T04:10:56.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-18T08:02:04.693Z","etag":null,"topics":["sql","sql-query"],"latest_commit_sha":null,"homepage":"","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/bsahd.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,"zenodo":null}},"created_at":"2025-05-09T09:10:47.000Z","updated_at":"2025-07-18T04:10:59.000Z","dependencies_parsed_at":"2025-05-09T10:24:13.115Z","dependency_job_id":"c6f401e8-eb96-40ad-842e-a41f07ea4356","html_url":"https://github.com/bsahd/sql-builder","commit_stats":null,"previous_names":["bsahd/sql-builder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bsahd/sql-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsahd%2Fsql-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsahd%2Fsql-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsahd%2Fsql-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsahd%2Fsql-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsahd","download_url":"https://codeload.github.com/bsahd/sql-builder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsahd%2Fsql-builder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270913715,"owners_count":24667005,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["sql","sql-query"],"created_at":"2025-05-16T08:10:36.223Z","updated_at":"2025-10-19T22:17:30.779Z","avatar_url":"https://github.com/bsahd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A simple tool for building safe and readable SQL Querys\n\n## Features\n\n- Safe SQL building\n- No additional dependencies\n\n## Example\n\n```js\nimport SQL from \"@bsahd/sql-builder\";\nimport { DatabaseSync } from \"node:sqlite\";\nconst dbsq = new DatabaseSync(\":memory:\");\nconst db = new SQL(\n  (q) =\u003e dbsq.exec(q),\n  (q) =\u003e dbsq.prepare(q),\n);\ndb.run(\"CREATE TABLE users(name VARCHAR, age INTEGER)\");\ndb.insert(\"users\")\n  .values({ name: \"john' doe\", age: 25 })\n  .values({ name: \"alice\", age: 29 })\n  .values({ name: \"bob\", age: 31 })\n  .run();\nconsole.log(db.select(\"users\").run().all());\ndb.update(\"users\")\n  .set(\"name\", \"charry\")\n  .set(\"age\", 26)\n  .where(SQL.and(SQL.eq(\"name\", \"alice\"), SQL.eq(\"age\", 29)))\n  .run();\nconsole.log(db.select(\"users\").run().all());\ndb.delete(\"users\")\n  .where(SQL.and(SQL.eq(\"name\", \"john' doe\"), SQL.eq(\"age\", 25)))\n  .run();\nconsole.log(db.select(\"users\").run().all());\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsahd%2Fsql-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsahd%2Fsql-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsahd%2Fsql-builder/lists"}