db-conn-pool
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Generic Pool Support for db-conn

Example

const dbConfig = {

}
const poolConfig = {
    min: 2,
    max: 5
}
const driver = new XXXDriver();
const pool: DataSource = new GenericPool(driver, dbConfig, poolConfig);
const conn1 = await pool.getConnection();
const conn2 = await pool.getConnection();
await conn1.close();
await conn2.close();
await pool.close();

Test on Borrow

const dbConfig = {}
const poolConfig = {
    min: 2,
    max: 5
    testOnBorrow: true;
    testOnBorrowSql: "select 1";
}
const driver = new XXXDriver();
const pool: DataSource = new GenericPool(driver, dbConfig, poolConfig);

Package Sidebar

Install

npm i db-conn-pool

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

11.2 kB

Total Files

17

Last publish

Collaborators

  • sunxufei