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

Method newClient

test/tools/runner/config.ts:554–569  ·  view source on GitHub ↗
(
    urlOrQueryOptions?: string | Record<string, any>,
    serverOptions?: MongoClientOptions
  )

Source from the content-addressed store, hash-verified

552 };
553 }
554 override newClient(
555 urlOrQueryOptions?: string | Record<string, any>,
556 serverOptions?: MongoClientOptions
557 ): MongoClient {
558 const options = serverOptions ?? {};
559
560 if (options.autoEncryption) {
561 const extraOptions: MongoClientOptions['autoEncryption']['extraOptions'] = {
562 ...options.autoEncryption.extraOptions,
563 ...this.encryptDefaultExtraOptions
564 };
565 options.autoEncryption.extraOptions = extraOptions;
566 }
567
568 return super.newClient(urlOrQueryOptions, options);
569 }
570}

Callers

nothing calls this directly

Calls 1

newClientMethod · 0.45

Tested by

no test coverage detected