copyWith method

QueryOptions copyWith({
  1. Object? parameters,
  2. QueryScanConsistency? scanConsistency,
  3. MutationState? consistentWith,
  4. bool? adhoc,
  5. bool? flexIndex,
  6. bool? preserveExpiry,
  7. String? clientContextId,
  8. int? maxParallelism,
  9. int? pipelineBatch,
  10. int? pipelineCap,
  11. Duration? scanWait,
  12. int? scanCap,
  13. bool? readOnly,
  14. QueryProfileMode? profile,
  15. bool? metrics,
  16. String? queryContext,
  17. Map<String, Object?>? raw,
  18. Duration? timeout,
})

Creates a copy of this QueryOptions with the specified options updated.

Implementation

QueryOptions copyWith({
  Object? parameters,
  QueryScanConsistency? scanConsistency,
  MutationState? consistentWith,
  bool? adhoc,
  bool? flexIndex,
  bool? preserveExpiry,
  String? clientContextId,
  int? maxParallelism,
  int? pipelineBatch,
  int? pipelineCap,
  Duration? scanWait,
  int? scanCap,
  bool? readOnly,
  QueryProfileMode? profile,
  bool? metrics,
  String? queryContext,
  Map<String, Object?>? raw,
  Duration? timeout,
}) {
  return QueryOptions(
    parameters: parameters ?? this.parameters,
    scanConsistency: scanConsistency ?? this.scanConsistency,
    consistentWith: consistentWith ?? this.consistentWith,
    adhoc: adhoc ?? this.adhoc,
    flexIndex: flexIndex ?? this.flexIndex,
    preserveExpiry: preserveExpiry ?? this.preserveExpiry,
    clientContextId: clientContextId ?? this.clientContextId,
    maxParallelism: maxParallelism ?? this.maxParallelism,
    pipelineBatch: pipelineBatch ?? this.pipelineBatch,
    pipelineCap: pipelineCap ?? this.pipelineCap,
    scanWait: scanWait ?? this.scanWait,
    scanCap: scanCap ?? this.scanCap,
    readOnly: readOnly ?? this.readOnly,
    profile: profile ?? this.profile,
    metrics: metrics ?? this.metrics,
    queryContext: queryContext ?? this.queryContext,
    raw: raw ?? this.raw,
    timeout: timeout ?? this.timeout,
  );
}