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

Method constructor

test/tools/cmap_spec_runner.ts:292–304  ·  view source on GitHub ↗

* * @param hostAddress - The address of the server to connect to * @param poolOptions - Allows the test to pass in extra options to the pool not specified by the spec test definition, such as the environment-dependent "loadBalanced"

(
    server: Server,
    hostAddress: HostAddress,
    poolOptions: Partial<ConnectionPoolOptions> = {},
    contextOptions: { injectPoolStats: boolean }
  )

Source from the content-addressed store, hash-verified

290 * @param poolOptions - Allows the test to pass in extra options to the pool not specified by the spec test definition, such as the environment-dependent "loadBalanced"
291 */
292 constructor(
293 server: Server,
294 hostAddress: HostAddress,
295 poolOptions: Partial<ConnectionPoolOptions> = {},
296 contextOptions: { injectPoolStats: boolean }
297 ) {
298 this.poolEventsEventEmitter.on('error', () => null);
299 this.#poolOptions = poolOptions;
300 this.#hostAddress = hostAddress;
301 this.#server = server;
302 this.#supportedOperations = getTestOpDefinitions(this);
303 this.#injectPoolStats = contextOptions.injectPoolStats;
304 }
305
306 get isLoadBalanced() {
307 return !!this.#poolOptions.loadBalanced;

Callers

nothing calls this directly

Calls 2

getTestOpDefinitionsFunction · 0.85
onMethod · 0.80

Tested by

no test coverage detected