XDevAPI implementation of a connection pool. Should be used via the Client API.
Example
const pool = mysqlx.getClient('mysqlx://root@localhost', { pooling: { enabled: true, maxSize: 10, maxIdleTime: 20000, queueTimeout: 5000 } }) pool.getSession() .then(session => { // A new session is created using a connection from the pool. })
Type Definitions
-
Properties
-
Connection pool configuration properties.
Type:
- Object
Properties:
Name Type Argument Default Description enabled
boolean <optional>
true use a connection pool maxSize
number <optional>
25 maximum number of connections in the pool maxIdleTime
number <optional>
0 maximum number of milliseconds to allow a connection to be idle (0 - infinite) queueTimeout
number <optional>
0 maximum number of milliseconds to wait for a connection to become available (0 - infinite)