FindOperation constructor
FindOperation(})
Implementation
FindOperation(DbCollection collection,
{this.filter,
this.sort,
this.projection,
this.hint,
this.hintDocument,
this.skip,
this.limit,
FindOptions? findOptions,
Map<String, Object>? rawOptions})
: super(collection.db,
<String, Object>{...?findOptions?.options, ...?rawOptions},
collection: collection, aspect: Aspect.readOperation) {
if (skip != null && skip! < 1) {
throw MongoDartError('Skip parameter must be a positive integer');
}
skip ??= 0;
if (limit != null && limit! < 0) {
throw MongoDartError('Limit parameter must be a non-negative integer');
}
limit ??= 0;
}