getConnection method

  1. @override
FutureOr<C> getConnection()
override

Returns a DBConnection to execute commands.

Implementation

@override
FutureOr<C> getConnection() {
  if (_pool.isEmpty) {
    return createConnection();
  }
  var c = _pool.removeFirst();
  return c;
}