MySQLConnectionPool constructor

MySQLConnectionPool({
  1. required String host,
  2. required int port,
  3. required String userName,
  4. required dynamic password,
  5. required int maxConnections,
  6. String? databaseName,
  7. bool secure = true,
  8. String collation = 'utf8_general_ci',
  9. int timeoutMs = 10000,
})

Creates new pool

Almost all parameters are identical to MySQLConnection.createConnection Pass maxConnections to tell pool maximum number of connections it can use You can specify timeoutMs, it will be passed to MySQLConnection.connect method when creating new connections

Implementation

MySQLConnectionPool({
  required this.host,
  required this.port,
  required this.userName,
  required password,
  required this.maxConnections,
  this.databaseName,
  this.secure = true,
  this.collation = 'utf8_general_ci',
  this.timeoutMs = 10000,
}) : _password = password;