createConnectionPool method
ConnectionPool?
createConnectionPool(
- String connectionString,
- int maxSize, {
- PoolOptions? options,
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, {
PoolOptions? options,
}) {
final poolId = poolCreate(connectionString, maxSize, options: options);
if (poolId == 0) return null;
return ConnectionPool(this, poolId);
}