ConnectionPool constructor

ConnectionPool(
  1. int maxConnections,
  2. DbFactory dbFactory
)

Initializes a connection pool.

  • maxConnections: The maximum amount of connections to keep open simultaneously.
  • `dbFactory*: a parameterless function that returns a Db. The function can be asynchronous if necessary.

Implementation

ConnectionPool(this.maxConnections, this.dbFactory)
    : _pool = Pool(maxConnections);