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

Function constructor

src/operations/operation.ts:79–93  ·  view source on GitHub ↗
(options: OperationOptions & Abortable = {})

Source from the content-addressed store, hash-verified

77 static aspects?: Set<symbol>;
78
79 constructor(options: OperationOptions & Abortable = {}) {
80 this.readPreference = this.hasAspect(Aspect.WRITE_OPERATION)
81 ? ReadPreference.primary
82 : (ReadPreference.fromOptions(options) ?? ReadPreference.primary);
83
84 // Pull the BSON serialize options from the already-resolved options
85 this.bsonOptions = resolveBSONOptions(options);
86
87 this._session = options.session != null ? options.session : undefined;
88
89 this.options = options;
90 this.bypassPinningCheck = !!options.bypassPinningCheck;
91
92 this.attemptsMade = 0;
93 }
94
95 /** Must match the first key of the command object sent to the server.
96 Command name should be stateless (should not use 'this' keyword) */

Callers

nothing calls this directly

Calls 2

resolveBSONOptionsFunction · 0.90
fromOptionsMethod · 0.45

Tested by

no test coverage detected