{"id":16246010,"url":"https://github.com/shiqimei/node-opengauss","last_synced_at":"2025-03-19T19:30:35.405Z","repository":{"id":84867978,"uuid":"371467865","full_name":"shiqimei/node-opengauss","owner":"shiqimei","description":"A simple OpenGauss client for Node.js based on node-postgres.","archived":false,"fork":false,"pushed_at":"2021-09-02T14:34:48.000Z","size":97,"stargazers_count":5,"open_issues_count":7,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-04T00:02:38.479Z","etag":null,"topics":["database","database-driver","nodejs","opengauss"],"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/shiqimei.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":"2021-05-27T18:26:28.000Z","updated_at":"2024-09-08T04:27:21.000Z","dependencies_parsed_at":"2023-03-13T03:08:44.542Z","dependency_job_id":null,"html_url":"https://github.com/shiqimei/node-opengauss","commit_stats":{"total_commits":39,"total_committers":2,"mean_commits":19.5,"dds":0.1282051282051282,"last_synced_commit":"625f2bb50da906c92a62e60c18aa06c38619564f"},"previous_names":["lolimay/node-opengauss"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiqimei%2Fnode-opengauss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiqimei%2Fnode-opengauss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiqimei%2Fnode-opengauss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shiqimei%2Fnode-opengauss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shiqimei","download_url":"https://codeload.github.com/shiqimei/node-opengauss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244014030,"owners_count":20383714,"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","database-driver","nodejs","opengauss"],"created_at":"2024-10-10T14:29:10.220Z","updated_at":"2025-03-19T19:30:35.398Z","avatar_url":"https://github.com/shiqimei.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-opengauss\n\nA simple [openGauss](https://opengauss.org) client for Node.js based on [node-postgres](https://github.com/brianc/node-postgres).\n\n## Install\n\n```\nnpm install node-opengauss --save\n```\n\n## Usage\n\n```javascript\nimport OpenGauss from 'node-opengauss'\n\nconst client = new OpenGauss()\nconst config = {\n  host: 'localhost',\n  port: 5432,\n  username: 'lolimay',\n  database: 'postgres',\n  password: 'Enmo@123'\n}\n\nclient.connect(config)\nclient.query('select current_date', result =\u003e {\n    console.log(result) // { rows: [ { date: 2021-05-26T16:00:00.000Z } ], affectedRows: 1 }\n    return client.disconnect()\n})\n```\n\n## Development\n\nDevelopment on MacOS/Linux is preferred :)\n\n1. Clone the repo `git clone git@github.com:lolimay/node-opengauss.git`\n2. Ensure you have a openGauss instance running, follow this [tutorial](https://www.lolimay.cn/2021/02/19/opengauss/%E4%BD%BF%E7%94%A8docker%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BAOpen%20Gauss%E7%8E%AF%E5%A2%83/) (Chinese Only/仅中文) to set up a local instance with docker\n\n### Run the project\n\nNavigate to `examples` and run following to test driver:\n\n```bash\ncd examples\nnode index.js\n```\n\n### For Debugging\n\nFor more verbose logs by setting the environment variable `DEBUG` to true:\n\n```bash\nDEBUG=true node index.mjs\n```\n\nIf you need to modify files inside `lib/protocol`, please run following commands to take effects:\n\n```bash\ncd lib/protocol\nnpm run build:watch\n```\n\n## Posts\n\n- [借助docker搭建openGauss测试环境 - Shiqi's Blog](https://www.lolimay.cn/2021/02/19/opengauss/%E4%BD%BF%E7%94%A8docker%E7%8E%AF%E5%A2%83%E6%90%AD%E5%BB%BAOpen%20Gauss%E7%8E%AF%E5%A2%83/)\n- [openGauss鉴权配置文件pg_hba.conf - Shiqi's Blog](https://www.lolimay.cn/2021/02/23/opengauss/openGauss%E9%89%B4%E6%9D%83%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6pg_hba.conf/)\n- [OpenGauss解锁Locked的账号](https://www.lolimay.cn/2021/05/28/opengauss/OpenGauss%E8%A7%A3%E9%94%81Locked%E7%9A%84%E8%B4%A6%E5%8F%B7/)\n- [openGauss用户管理](https://www.lolimay.cn/2021/02/25/opengauss/openGauss%E7%94%A8%E6%88%B7%E7%AE%A1%E7%90%86/)\n- [openGauss GUC参数配置](https://www.lolimay.cn/2021/02/25/opengauss/openGauss%20GUC%E5%8F%82%E6%95%B0%E9%85%8D%E7%BD%AE/)\n- [gsql命令行客户端工具](https://www.lolimay.cn/2021/02/25/opengauss/gsql%E5%91%BD%E4%BB%A4%E8%A1%8C%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%B7%A5%E5%85%B7/)\n\nCheck [here](https://www.lolimay.cn/categories/opengauss/) for more posts.\n\n## Notes\n\n- [OpenGauss配置客户端接入认证方式](https://opengauss.org/zh/docs/1.0.1/docs/Developerguide/%E9%85%8D%E7%BD%AE%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%8E%A5%E5%85%A5%E8%AE%A4%E8%AF%81.html)\n- [OpenGauss的SHA256加密认证的协议细节和PostgresSQL不一致，具体实现请参考此GO语言实现。](https://github.com/opengauss-mirror/openGauss-connector-go-pq/blob/5febca52b422690e85543fcbd56b88d695b8fc30/conn.go#L1298)\n- [OpenGauss 的用于SHA256认证鉴权的GO语言实现 - 官方开源代码](https://github.com/opengauss-mirror/openGauss-connector-go-pq/blob/5febca52b422690e85543fcbd56b88d695b8fc30/rfcdigest.go#L76)\n\n## License\n\nCopyright (c) 2021-2021 Shiqi Mei (shiqi.mei@lolimay.cn)\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\nall copies 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\nTHE SOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiqimei%2Fnode-opengauss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshiqimei%2Fnode-opengauss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshiqimei%2Fnode-opengauss/lists"}