AsyncNativeOdbcConnection constructor

AsyncNativeOdbcConnection({
  1. Duration? requestTimeout,
  2. void isolateEntry(
    1. SendPort
    )?,
  3. bool autoRecoverOnWorkerCrash = false,
  4. int workerCount = 1,
  5. int? maxPendingRequests,
  6. AsyncBackpressureMode backpressureMode = AsyncBackpressureMode.failFast,
  7. Duration? backpressureTimeout,
})

Implementation

AsyncNativeOdbcConnection({
  super.requestTimeout,
  super.isolateEntry,
  super.autoRecoverOnWorkerCrash = false,
  super.workerCount = 1,
  super.maxPendingRequests,
  super.backpressureMode = AsyncBackpressureMode.failFast,
  super.backpressureTimeout,
}) {
  if (workerCount < 1) {
    throw ArgumentError.value(
      workerCount,
      'workerCount',
      'must be greater than or equal to 1',
    );
  }
  final pendingLimit = maxPendingRequests;
  if (pendingLimit != null && pendingLimit < 1) {
    throw ArgumentError.value(
      pendingLimit,
      'maxPendingRequests',
      'must be null or greater than or equal to 1',
    );
  }
  final pendingTimeout = backpressureTimeout;
  if (pendingTimeout != null && pendingTimeout < Duration.zero) {
    throw ArgumentError.value(
      pendingTimeout,
      'backpressureTimeout',
      'must be null, zero, or greater than zero',
    );
  }
}