createConnectionPool method

ConnectionPool? createConnectionPool(
  1. String connectionString,
  2. int maxSize
)

Creates a new connection pool and returns a ConnectionPool wrapper.

The connectionString is used to establish connections in the pool. The maxSize specifies the maximum number of connections in the pool.

Returns a ConnectionPool on success, null on failure.

Implementation

ConnectionPool? createConnectionPool(String connectionString, int maxSize) {
  final poolId = poolCreate(connectionString, maxSize);
  if (poolId == 0) return null;
  return ConnectionPool(this, poolId);
}