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

Method secondaryOk

src/db.ts:194–196  ·  view source on GitHub ↗

* Check if a secondary can be used (because the read preference is *not* set to primary)

()

Source from the content-addressed store, hash-verified

192 * Check if a secondary can be used (because the read preference is *not* set to primary)
193 */
194 get secondaryOk(): boolean {
195 return this.s.readPreference?.preference !== 'primary' || false;
196 }
197
198 get readConcern(): ReadConcern | undefined {
199 return this.s.readConcern;

Callers 2

prepareCommandMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected