{"id":25600603,"url":"https://github.com/vasyas/interpolated-sql","last_synced_at":"2026-05-07T02:31:17.324Z","repository":{"id":31269266,"uuid":"127414071","full_name":"vasyas/interpolated-sql","owner":"vasyas","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-11T00:34:15.000Z","size":132,"stargazers_count":0,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-09T08:45:19.386Z","etag":null,"topics":["javascript","mysql","nodejs","orm","sql","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/vasyas.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":"2018-03-30T10:13:43.000Z","updated_at":"2020-02-27T16:34:18.000Z","dependencies_parsed_at":"2022-08-07T16:15:40.604Z","dependency_job_id":null,"html_url":"https://github.com/vasyas/interpolated-sql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vasyas/interpolated-sql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasyas%2Finterpolated-sql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasyas%2Finterpolated-sql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasyas%2Finterpolated-sql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasyas%2Finterpolated-sql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vasyas","download_url":"https://codeload.github.com/vasyas/interpolated-sql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vasyas%2Finterpolated-sql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32720109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["javascript","mysql","nodejs","orm","sql","typescript"],"created_at":"2025-02-21T15:27:07.305Z","updated_at":"2026-05-07T02:31:17.301Z","avatar_url":"https://github.com/vasyas.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Make SQL queries using JavaScript tagged literals for parameters.\n\n## Example\n\n```\nconst id = 5\nconst user = await sql`select * from user where id = ${id}`\n```\n\nBest used with MySQL, where you can do\n```\nconst id = await sql`\n    insert into user\n    set ${{ email: \"my@domain.com\", role: Role.ADMIN }}\n`.insert()\n```\n\n## Getting started\n\nGet package\n```\nyarn install interpolated-sql\n```\n\nCreate your own exec function, that will bind sql creation and connection handling \n\n```\nimport {Sql} from \"interpolated-sql\"\nimport mysql from \"mysql2/promise\"\n\nconst connection = await mysql.createConnection({\n  host: \"localhost\",\n  user: \"root\",\n  database: \"test\",\n})\n\nfunction exec(parts, ...params) {\n  return new Sql(parts, params, () =\u003e connection)\n}\n\nasync function getUsers() {\n    return await exec`select * from users`.all()\n}\n```\n\n## API\n\nsee src/sql.ts\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasyas%2Finterpolated-sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvasyas%2Finterpolated-sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvasyas%2Finterpolated-sql/lists"}