# resource-pools-connection

> Extension of 'tedious' connection class to use as a pooled promised resource without need to wait for release

Latest version **2.0.3** (published 2020-03-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install resource-pools-connection
pnpm add resource-pools-connection
yarn add resource-pools-connection
bun add resource-pools-connection
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2020-03-03 |
| First published | 2019-08-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | bitwkit |
| Maintainers | bitwkit |
| Keywords | resource, pool, tedious, promised, connection |

## Links

- npm: https://www.npmjs.com/package/resource-pools-connection
- Repository: https://github.com/bitwkit/resource-pools-connection
- Homepage: https://github.com/bitwkit/resource-pools-connection#readme
- Issues: https://github.com/bitwkit/resource-pools-connection/issues
- npm.io page: https://npm.io/package/resource-pools-connection

## Alternatives

- [promise-throttle](https://npm.io/package/promise-throttle.md) — 44.2K weekly downloads
- [@commercetools/sync-actions](https://npm.io/package/@commercetools/sync-actions.md) — 25.1K weekly downloads
- [cwait](https://npm.io/package/cwait.md) — 21.4K weekly downloads
- [@ledgerhq/hw-app-cosmos](https://npm.io/package/@ledgerhq/hw-app-cosmos.md) — 4.2K weekly downloads
- [@financial-times/o-loading](https://npm.io/package/@financial-times/o-loading.md) — 2.8K weekly downloads

## Recent versions

- 2.0.3 (latest) — 2020-03-03
- 2.0.2 — 2020-03-03
- 2.0.1 — 2020-03-03
- 2.0.0 — 2020-03-03
- 1.0.3 — 2019-08-27
- 1.0.2 — 2019-08-27
- 1.0.1 — 2019-08-26
- 1.0.0 — 2019-08-26

## README

# resource-pools-connection
Extension of 'tedious' connection class for using as a pooled resource with [**resource-pools** package](https://www.npmjs.com/package/resource-pools), without blocking in busy state.

## usage

Setup connection pool:
```javascript
const {ResourcePool} = require('resource-pools');
const {ConnectionResource} = require('resource-pools-connection');

const config = {
    constructor: ConnectionResource,
    arguments: [/* your 'tedious' connection config object here */],
    maxCount: /* number of maximum pooled connections */
} ;
const dbConnections = new ResourcePool(config);
```

Run DB request:
```javascript
dbConnections.allocate().then( conn => {
    conn.execSql(request);
})
```

---
_Source: https://npm.io/package/resource-pools-connection · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
