{"id":47589531,"url":"https://github.com/pomgui/database","last_synced_at":"2026-04-01T17:08:14.310Z","repository":{"id":57137619,"uuid":"278247340","full_name":"pomgui/database","owner":"pomgui","description":"Generic typescript library that provides an interface to execute normal operations with a database driver as connect, start transaction, commit, etc. for different database client drivers. (Currently it supports node-firebird and mysql drivers)","archived":false,"fork":false,"pushed_at":"2022-09-23T13:48:29.000Z","size":597,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-06T15:11:19.999Z","etag":null,"topics":["database-driver","firebird","mysql"],"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/pomgui.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-07-09T02:55:54.000Z","updated_at":"2021-12-06T16:44:52.000Z","dependencies_parsed_at":"2022-09-01T04:01:09.091Z","dependency_job_id":null,"html_url":"https://github.com/pomgui/database","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/pomgui/database","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomgui%2Fdatabase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomgui%2Fdatabase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomgui%2Fdatabase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomgui%2Fdatabase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pomgui","download_url":"https://codeload.github.com/pomgui/database/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pomgui%2Fdatabase/sbom","scorecard":{"id":740670,"data":{"date":"2025-08-11","repo":{"name":"github.com/pomgui/database","commit":"9d9624819c38440bf44c0ca7661746a154accb85"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T17:20:16.131Z","repository_id":57137619,"created_at":"2025-08-22T17:20:16.131Z","updated_at":"2025-08-22T17:20:16.131Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"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":["database-driver","firebird","mysql"],"created_at":"2026-04-01T17:08:12.031Z","updated_at":"2026-04-01T17:08:14.300Z","avatar_url":"https://github.com/pomgui.png","language":"TypeScript","readme":"# Database generic library\n\n[![Package Version][package-image]][package-url]\n[![Open Issues][issues-image]][issues-url]\n\nPiDatabase is a generic typescript library that provides an interface to execute the normal operations\nwith a client database driver as connect, start transaction, commit, etc. for different database client drivers. (Currently it supports [node-firebird](https://www.npmjs.com/package/node-firebird) and [mysql](https://www.npmjs.com/package/mysql) drivers)\n\n## Advantages:\n\n- All methods return promises.\n- It uses query parameters like `:id` instead of `?`.\n- The parameters understand object's hierarchy, so it understands parameters like `:entry.id`.\n- The returned rows also are preprocessed to return objects if needed (See Usage Example section).\n- It maintains the same interface no matter the database, so it helps with the migration from different databases E.g. MySQL to Firebird or vice versa.\n\n## Installation\n\nUse npm to install the library.\n\n```bash\nnpm install @pomgui/database --save\n```\n\n## Usage Example\n\n### Firebird usage example (using @pomgui/database-mysql)\n\n```typescript\nconst options = {\n    host: 'localhost',\n    port: 3050,\n    user: 'sysdba',\n    password: 'masterkey',\n    database: 'test.fdb'\n};\n\nasync work(){\n    const pool = new PiFirebirdPool(options, 10);\n    const db = await pool.get();\n    await db.beginTransaction();\n    try{\n        const param = {entry: {id: 3}};\n        const data = await db.query(`\n            SELECT \n                e.entry_id \"id\", e.entry_date, \n                b.benef_id \"benef.id\", b.name \"benef.name\"\n            FROM ENTRIES e JOIN BENEFICIARIES db ON b.benef_id = e.benef_id\n            WHERE entry_id \u003e= :entry.id\n            LIMIT 0,10`, param);\n        console.log(data);\n        await db.commit();\n    }catch(err){\n        console.error(err);\n        await db.rollback();\n    }finally{\n        await db.close();\n    }\n}\n```\n\nThis will print something like:\n\n```javascript\n[{  id: 3, \n    entryDate: 2020-08-01T00:00:00.000Z,\n    benef: {\n        id: 1,\n        name: 'John Doe'\n    }\n},{  id: 4, \n    date: 2020-08-02T00:00:00.000Z,\n    benef: {\n        id: 1,\n        name: 'Jane Doe'\n    }\n}, ...\n]\n```\n\n### MySQL usage example\n\n```typescript\nconst options = {\n    host: 'localhost',\n    user: 'user',\n    password: 'secret',\n    database: 'test'\n};\n\nasync work(){\n    const pool = new PiMySqlPool(options, 10);\n    const db = await pool.get();\n    await db.beginTransaction();\n    try{\n        const param = {entry: {id: 3}};\n        const data = await db.query(`\n            SELECT \n                e.entry_id \"id\", e.entry_date, \n                b.benef_id \"benef.id\", b.name \"benef.name\"\n            FROM ENTRIES e JOIN BENEFICIARIES db ON b.benef_id = e.benef_id\n            WHERE entry_id \u003e= :entry.id\n            LIMIT 0,10`, param);\n        console.log(data);\n        await db.commit();\n    }catch(err){\n        console.error(err);\n        await db.rollback();\n    }finally{\n        await db.close();\n    }\n}\n```\nThis will print something like:\n\n```javascript\n[{  id: 3, \n    entryDate: 2020-08-01T00:00:00.000Z,\n    benef: {\n        id: 1,\n        name: 'John Doe'\n    }\n},{  id: 4, \n    date: 2020-08-02T00:00:00.000Z,\n    benef: {\n        id: 1,\n        name: 'Jane Doe'\n    }\n}, ...\n]\n```\n\n\n\n\n[project-url]: https://github.com/pomgui/database\n[package-image]: https://badge.fury.io/js/@pomgui%2Fdatabase.svg\n[package-url]: https://www.npmjs.com/package/@pomgui/database\n[issues-image]: https://img.shields.io/github/issues/pomgui/database.svg?style=popout\n[issues-url]: https://github.com/pomgui/database/issues\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomgui%2Fdatabase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpomgui%2Fdatabase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpomgui%2Fdatabase/lists"}