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

Method hello

test/tools/runner/config.ts:200–216  ·  view source on GitHub ↗

* Returns a `hello`, executed against `uri`.

(uri = this.uri)

Source from the content-addressed store, hash-verified

198 * Returns a `hello`, executed against `uri`.
199 */
200 async hello(uri = this.uri) {
201 const client = this.newClient(uri);
202 try {
203 await client.connect();
204 const { maxBsonObjectSize, maxMessageSizeBytes, maxWriteBatchSize, ...rest } = await client
205 .db('admin')
206 .command({ hello: 1 });
207 return {
208 maxBsonObjectSize,
209 maxMessageSizeBytes,
210 maxWriteBatchSize,
211 ...rest
212 };
213 } finally {
214 await client.close();
215 }
216 }
217
218 isOIDC(uri: string, env: string): boolean {
219 if (!uri) return false;

Callers 2

makeMultiBatchWriteFunction · 0.45

Calls 5

newClientMethod · 0.95
connectMethod · 0.45
commandMethod · 0.45
dbMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected