FindOptions constructor

FindOptions({
  1. int? batchSize,
  2. bool singleBatch = false,
  3. String? comment,
  4. int? maxTimeMS,
  5. ReadConcern? readConcern,
  6. Map<String, Object>? max,
  7. Map<String, Object>? min,
  8. bool returnKey = false,
  9. bool showRecordId = false,
  10. bool tailable = false,
  11. bool oplogReplay = false,
  12. bool noCursorTimeout = false,
  13. bool awaitData = false,
  14. bool allowPartialResult = false,
  15. CollationOptions? collation,
  16. bool allowDiskUse = false,
})

Implementation

FindOptions(
    {this.batchSize,
    this.singleBatch = false,
    this.comment,
    this.maxTimeMS,
    this.readConcern,
    this.max,
    this.min,
    this.returnKey = false,
    this.showRecordId = false,
    this.tailable = false,
    this.oplogReplay = false,
    this.noCursorTimeout = false,
    this.awaitData = false,
    this.allowPartialResult = false,
    this.collation,
    this.allowDiskUse = false}) {
  if (batchSize != null && batchSize! < 0) {
    throw MongoDartError('Batch size parameter must be a non negative value');
  }
  if (maxTimeMS != null && maxTimeMS! < 1) {
    throw MongoDartError('MaxTimeMS parameter must be a positive value');
  }
}