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

Method constructor

src/cursor/find_cursor.ts:43–57  ·  view source on GitHub ↗

@internal

(
    client: MongoClient,
    namespace: MongoDBNamespace,
    filter: Document = {},
    options: FindOptions & Abortable = {}
  )

Source from the content-addressed store, hash-verified

41
42 /** @internal */
43 constructor(
44 client: MongoClient,
45 namespace: MongoDBNamespace,
46 filter: Document = {},
47 options: FindOptions & Abortable = {}
48 ) {
49 super(client, namespace, options);
50
51 this.cursorFilter = filter;
52 this.findOptions = options;
53
54 if (options.sort != null) {
55 this.findOptions.sort = formatSort(options.sort);
56 }
57 }
58
59 clone(): FindCursor<TSchema> {
60 const clonedOptions = mergeOptions({}, this.findOptions);

Callers

nothing calls this directly

Calls 1

formatSortFunction · 0.90

Tested by

no test coverage detected