MCPcopy
hub / github.com/mongodb/node-mongodb-native / distinct

Method distinct

src/collection.ts:884–898  ·  view source on GitHub ↗
(
    key: Key,
    filter: Filter<TSchema> = {},
    options: DistinctOptions = {}
  )

Source from the content-addressed store, hash-verified

882 distinct(key: string, filter: Filter<TSchema>, options: DistinctOptions): Promise<any[]>;
883
884 async distinct<Key extends keyof WithId<TSchema>>(
885 key: Key,
886 filter: Filter<TSchema> = {},
887 options: DistinctOptions = {}
888 ): Promise<any[]> {
889 return await executeOperation(
890 this.client,
891 new DistinctOperation(
892 this as TODO_NODE_3286,
893 key as TODO_NODE_3286,
894 filter,
895 resolveOptions(this, options)
896 )
897 );
898 }
899
900 /**
901 * Retrieve all the indexes on the collection.

Calls 2

executeOperationFunction · 0.90
resolveOptionsFunction · 0.90

Tested by

no test coverage detected