initPool static method

Future<void> initPool(
  1. String uri, {
  2. int minConnections = 1,
  3. int maxConnections = 5,
})

Implementation

static Future<void> initPool(final String uri,
    {int minConnections = 1, int maxConnections = 5}) async {
  var pool = Pool(uri,
      minConnections: maxConnections, maxConnections: maxConnections);
  pool.messages.listen(print);
  await pool.start();
  connection = await pool.connect();
}