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

Method get

src/cmap/wire_protocol/responses.ts:87–97  ·  view source on GitHub ↗
(
    name: string | number,
    as: T,
    required?: boolean
  )

Source from the content-addressed store, hash-verified

85 required: true
86 ): JSTypeOf[T];
87 public override get<const T extends keyof JSTypeOf>(
88 name: string | number,
89 as: T,
90 required?: boolean
91 ): JSTypeOf[T] | null {
92 try {
93 return super.get(name, as, required);
94 } catch (cause) {
95 throw new MongoUnexpectedServerResponseError(cause.message, { cause });
96 }
97 }
98
99 static is(value: unknown): value is MongoDBResponse {
100 return value instanceof MongoDBResponse;

Callers 15

isMaxTimeExpiredErrorMethod · 0.95
recoveryTokenMethod · 0.95
atClusterTimeMethod · 0.95
operationTimeMethod · 0.95
$errMethod · 0.95
errmsgMethod · 0.95
$clusterTimeMethod · 0.95
clearMethod · 0.45
connectionIsStaleMethod · 0.45
createConnectionMethod · 0.45
cursorMethod · 0.45
idMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected