Interface PoolOptions<Dialect>

Connection Pool options.

Used in SequelizeCoreOptions.pool

interface PoolOptions<Dialect> {
    acquire?: number;
    evict?: number;
    idle?: number;
    max?: number;
    maxUses?: number;
    min?: number;
    validate?: ((connection?) => boolean);
}

Type Parameters

Hierarchy (view full)

Properties

acquire?: number

The maximum time, in milliseconds, that pool will try to get connection before throwing error

evict?: number

The time interval, in milliseconds, after which sequelize-pool will remove idle connections.

idle?: number

The maximum time, in milliseconds, that a connection can be idle before being released

max?: number

Maximum number of connections in pool. Default is 5

maxUses?: number

The number of times to use a connection before closing and replacing it. Default is Infinity

min?: number

Minimum number of connections in pool. Default is 0

validate?: ((connection?) => boolean)

A function that validates a connection.

If provided, this overrides the default connection validation built in to sequelize.

Type declaration

    • (connection?): boolean
    • Parameters

      Returns boolean