modernCount method

Future<CountResult> modernCount({
  1. SelectorBuilder? selector,
  2. Map<String, dynamic>? filter,
  3. int? limit,
  4. int? skip,
  5. CollationOptions? collation,
  6. String? hint,
  7. Map<String, Object>? hintDocument,
  8. CountOptions? countOptions,
  9. Map<String, Object>? rawOptions,
})

Implementation

Future<CountResult> modernCount(
    {SelectorBuilder? selector,
    Map<String, dynamic>? filter,
    int? limit,
    int? skip,
    CollationOptions? collation,
    String? hint,
    Map<String, Object>? hintDocument,
    CountOptions? countOptions,
    Map<String, Object>? rawOptions}) async {
  var countOperation = CountOperation(this,
      query:
          filter ?? (selector?.map == null ? null : selector!.map[key$Query]),
      skip: skip,
      limit: limit,
      hint: hint,
      hintDocument: hintDocument,
      countOptions: countOptions,
      rawOptions: rawOptions);
  return countOperation.executeDocument();
}