All files / src/cursor list_search_indexes_cursor.ts

100% Statements 4/4
66.66% Branches 2/3
100% Functions 1/1
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21    396x           396x               621x 621x      
import type { Collection } from '../collection';
import type { AggregateOptions } from '../operations/aggregate';
import { AggregationCursor } from './aggregation_cursor';
 
/** @public */
export type ListSearchIndexesOptions = Omit<AggregateOptions, 'readConcern' | 'writeConcern'>;
 
/** @public */
export class ListSearchIndexesCursor extends AggregationCursor<{ name: string }> {
  /** @internal */
  constructor(
    { fullNamespace: ns, client }: Collection,
    name: string | null,
    options: ListSearchIndexesOptions = {}
  ) {
    const pipeline =
      name == null ? [{ $listSearchIndexes: {} }] : [{ $listSearchIndexes: { name } }];
    super(client, ns, pipeline, options);
  }
}