poolCreate method

int poolCreate(
  1. String connectionString,
  2. int maxSize
)

Creates a new connection pool.

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

Returns a pool ID on success, 0 on failure.

Implementation

int poolCreate(String connectionString, int maxSize) {
  final connStrPtr = connectionString.toNativeUtf8();
  try {
    return _bindings.odbc_pool_create(
      connStrPtr.cast<bindings.Utf8>(),
      maxSize,
    );
  } finally {
    malloc.free(connStrPtr);
  }
}