{"id":23081230,"url":"https://github.com/lagden/mysql-pool","last_synced_at":"2025-03-23T01:25:20.488Z","repository":{"id":27668895,"uuid":"113244685","full_name":"lagden/mysql-pool","owner":"lagden","description":"Make pooling connections with MySQL","archived":false,"fork":false,"pushed_at":"2025-03-11T20:00:18.000Z","size":709,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T20:35:13.643Z","etag":null,"topics":["connection-pool","mysql","nodejs","pool","query"],"latest_commit_sha":null,"homepage":"https://lagden.github.io/mysql-pool","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/lagden.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":"2017-12-05T23:34:53.000Z","updated_at":"2025-03-11T19:57:53.000Z","dependencies_parsed_at":"2023-12-14T04:31:41.267Z","dependency_job_id":"7b6ada0b-b907-483f-a79a-5ecee5be91c6","html_url":"https://github.com/lagden/mysql-pool","commit_stats":{"total_commits":47,"total_committers":2,"mean_commits":23.5,"dds":"0.21276595744680848","last_synced_commit":"7c0bd5d1b1e0ce0d39e4a14dabdba0fefc252360"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagden%2Fmysql-pool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagden%2Fmysql-pool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagden%2Fmysql-pool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lagden%2Fmysql-pool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lagden","download_url":"https://codeload.github.com/lagden/mysql-pool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245042572,"owners_count":20551619,"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":["connection-pool","mysql","nodejs","pool","query"],"created_at":"2024-12-16T13:49:54.379Z","updated_at":"2025-03-23T01:25:20.483Z","avatar_url":"https://github.com/lagden.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mysql-pool\n\n[![NPM version][npm-img]][npm] [![Build Status][ci-img]][ci] [![Coverage Status][coveralls-img]][coveralls]\n\n[npm-img]: https://img.shields.io/npm/v/@tadashi/mysql-pool.svg\n[npm]: https://www.npmjs.com/package/@tadashi/mysql-pool\n[ci-img]: https://github.com/lagden/mysql-pool/actions/workflows/nodejs.yml/badge.svg\n[ci]: https://github.com/lagden/mysql-pool/actions/workflows/nodejs.yml\n[coveralls-img]: https://coveralls.io/repos/github/lagden/mysql-pool/badge.svg?branch=master\n[coveralls]: https://coveralls.io/github/lagden/mysql-pool?branch=master\n\nMake pooling connections with [MySQL](https://sidorares.github.io/node-mysql2/docs/examples/connections/create-pool#pooloptions)\n\n## Install\n\n```\n$ npm i @tadashi/mysql-pool\n```\n\n## Environment variable\n\n| Variable             | Type    | Required | Default   | Description                         |\n| -------------------- | ------- | -------- | --------- | ----------------------------------- |\n| MYHOST               | string  | no       | localhost | Hostname or server address          |\n| MYPORT               | number  | no       | 3306      | Port number for the connection      |\n| MYUSER               | string  | no       | root      | User authentication                 |\n| MYPASS               | string  | no       |           | Authentication password             |\n| MYLIMIT              | number  | no       | 5         | Limit or threshold value            |\n| MYCONNECTTIMEOUT     | number  | no       | 30000     | Connection timeout in milliseconds  |\n| MYMULTIPLE           | boolean | no       | true      | Allowing multiple statements        |\n| MYWAITFORCONNECTIONS | boolean | no       | true      | Waiting for available connections   |\n| MYENCODE             | number  | no       | 0         | MYUSER and MYPASS encoded in base64 |\n\n## Usage\n\n```js\nimport MysqlPool from '@tadashi/mysql-pool'\n\nconst pool = new MysqlPool() // =\u003e https://sidorares.github.io/node-mysql2/docs/examples/connections/create-pool\nconst { results: [{ total }] } = await pool.query('SELECT 1 + ? as total', [1])\n// =\u003e 2\n\n// Closing all the connections in a pool\nawait pool.end()\n```\n\n## Team\n\n[\u003cimg src=\"https://avatars.githubusercontent.com/u/130963?s=390\" alt=\"Lagden\" width=\"90\"\u003e](https://github.com/lagden)\n\n---\n\n\u003e [!IMPORTANT]\\\n\u003e Buy me a coffee!\\\n\u003e BTC: `bc1q7famhuj5f25n6qvlm3sssnymk2qpxrfwpyq7g4`\n\n## License\n\nMIT © [Thiago Lagden](https://github.com/lagden)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flagden%2Fmysql-pool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flagden%2Fmysql-pool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flagden%2Fmysql-pool/lists"}