{"id":28164023,"url":"https://github.com/patrickpissurno/sql-to-jsdoc","last_synced_at":"2026-04-30T12:34:56.537Z","repository":{"id":57711549,"uuid":"394742157","full_name":"patrickpissurno/sql-to-jsdoc","owner":"patrickpissurno","description":"Generate JSDoc annotations from raw SQL queries","archived":false,"fork":false,"pushed_at":"2022-09-13T16:55:35.000Z","size":71,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-30T12:34:34.809Z","etag":null,"topics":["code-generation","javascript","jsdoc","nodejs","postgresql","raw","sql"],"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/patrickpissurno.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":"2021-08-10T18:12:25.000Z","updated_at":"2023-08-09T00:40:48.000Z","dependencies_parsed_at":"2022-09-04T17:42:20.859Z","dependency_job_id":null,"html_url":"https://github.com/patrickpissurno/sql-to-jsdoc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/patrickpissurno/sql-to-jsdoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickpissurno%2Fsql-to-jsdoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickpissurno%2Fsql-to-jsdoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickpissurno%2Fsql-to-jsdoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickpissurno%2Fsql-to-jsdoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patrickpissurno","download_url":"https://codeload.github.com/patrickpissurno/sql-to-jsdoc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patrickpissurno%2Fsql-to-jsdoc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32465009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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":["code-generation","javascript","jsdoc","nodejs","postgresql","raw","sql"],"created_at":"2025-05-15T11:14:59.382Z","updated_at":"2026-04-30T12:34:56.514Z","avatar_url":"https://github.com/patrickpissurno.png","language":"JavaScript","readme":"# sql-to-jsdoc\n[![npm-version](https://img.shields.io/npm/v/sql-to-jsdoc.svg)](https://www.npmjs.com/package/sql-to-jsdoc)\n[![known vulnerabilities](https://snyk.io/test/github/patrickpissurno/sql-to-jsdoc/badge.svg)](https://snyk.io/test/github/patrickpissurno/sql-to-jsdoc)\n[![downloads](https://img.shields.io/npm/dt/sql-to-jsdoc.svg)](https://www.npmjs.com/package/sql-to-jsdoc)\n[![license](https://img.shields.io/github/license/patrickpissurno/sql-to-jsdoc.svg?maxAge=1800)](https://github.com/patrickpissurno/sql-to-jsdoc/blob/master/LICENSE)\n\nGenerate JSDoc annotations from raw SQL queries\n\n## Install\n\n`npm i -g sql-to-jsdoc`\n\n## Usage\n\nYou'll need to have the following environment variables set:\n- `DB_NAME` (database name)\n- `DB_HOST` (database hostname)\n- `DB_PORT` (database port)\n- `DB_USER` (database username)\n- `DB_PASS` (database password)\n\nThen run:\n\n```\nsql-to-jsdoc query.sql\n```\n\nOr:\n\n```\nsql-to-jsdoc query.sql transform.json\n```\n\nReplacing *query.sql* for the name of a file containing the query, and\n*transform.json* for the name of a file containing the optional transformation.\n\nYou can check out some pretty good docs about the transformations [here](https://github.com/patrickpissurno/sqlutils/blob/master/docs/transformer.md).\n\n## Considerations\n\nAt the moment this tool only supports PostgreSQL databases. The generated\nJSDoc annotations are meant to be used with [node-postgres](https://github.com/brianc/node-postgres).\n\nI'll be revisiting this page soon to add more information and improve the documentation.\n\n## License\n\nMIT License\n\nCopyright (c) 2022 Patrick Pissurno\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickpissurno%2Fsql-to-jsdoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatrickpissurno%2Fsql-to-jsdoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatrickpissurno%2Fsql-to-jsdoc/lists"}