poolCreate method

Future<int> poolCreate(
  1. String connectionString,
  2. int maxSize, {
  3. PoolOptions? options,
})

Creates a connection pool in the worker. Returns pool ID on success.

Implementation

Future<int> poolCreate(
  String connectionString,
  int maxSize, {
  PoolOptions? options,
}) async {
  final r = await _sendRequest<IntResponse>(
    PoolCreateRequest(
      _nextRequestId(),
      connectionString,
      maxSize,
      optionsJson: options?.toJson(),
    ),
  );
  return r.value;
}