@@ -218,9 +218,8 @@ class client {
218
218
bsoncxx::v_noabi::string::view_or_value name) const &;
219
219
MONGOCXX_INLINE mongocxx::v_noabi::database operator [](
220
220
bsoncxx::v_noabi::string::view_or_value name) const && = delete ;
221
-
222
221
// /
223
- // / @brief Enumerates the databases in the client.
222
+ // / Enumerates the databases in the client.
224
223
// /
225
224
// / @return A mongocxx::v_noabi::cursor containing a BSON document for each
226
225
// / database. Each document contains a name field with the database
@@ -233,37 +232,104 @@ class client {
233
232
// /
234
233
// / @see https://www.mongodb.com/docs/manual/reference/command/listDatabases
235
234
// /
236
- // / @{
237
-
238
235
cursor list_databases () const ;
239
236
237
+ // /
238
+ // / Enumerates the databases in the client.
240
239
// /
241
240
// / @param session
242
241
// / The mongocxx::v_noabi::client_session with which to perform the aggregation.
243
242
// /
243
+ // / @return A mongocxx::v_noabi::cursor containing a BSON document for each
244
+ // / database. Each document contains a name field with the database
245
+ // / name, a sizeOnDisk field with the total size of the database file on
246
+ // / disk in bytes, and an empty field specifying whether the database
247
+ // / has any data.
248
+ // /
249
+ // / @throws mongocxx::v_noabi::operation_exception if the underlying 'listDatabases' command
250
+ // / fails.
251
+ // /
252
+ // / @see https://www.mongodb.com/docs/manual/reference/command/listDatabases
253
+ // /
244
254
cursor list_databases (const client_session& session) const ;
245
255
256
+ // /
257
+ // / Enumerates the databases in the client.
246
258
// /
247
259
// / @param opts
248
260
// / Options passed directly to the 'listDatabases' command.
249
261
// /
262
+ // / @return A mongocxx::v_noabi::cursor containing a BSON document for each
263
+ // / database. Each document contains a name field with the database
264
+ // / name, a sizeOnDisk field with the total size of the database file on
265
+ // / disk in bytes, and an empty field specifying whether the database
266
+ // / has any data.
267
+ // /
268
+ // / @throws mongocxx::v_noabi::operation_exception if the underlying 'listDatabases' command
269
+ // / fails.
270
+ // /
271
+ // / @see https://www.mongodb.com/docs/manual/reference/command/listDatabases
272
+ // /
250
273
cursor list_databases (const bsoncxx::v_noabi::document::view_or_value opts) const ;
251
274
275
+ // /
276
+ // / Enumerates the databases in the client.
252
277
// /
253
278
// / @param session
254
279
// / The mongocxx::v_noabi::client_session with which to perform the aggregation.
255
280
// /
256
281
// / @param opts
257
282
// / Options passed directly to the 'listDatabases' command.
258
283
// /
284
+ // / @return A mongocxx::v_noabi::cursor containing a BSON document for each
285
+ // / database. Each document contains a name field with the database
286
+ // / name, a sizeOnDisk field with the total size of the database file on
287
+ // / disk in bytes, and an empty field specifying whether the database
288
+ // / has any data.
289
+ // /
290
+ // / @throws mongocxx::v_noabi::operation_exception if the underlying 'listDatabases' command
291
+ // / fails.
292
+ // /
293
+ // / @see https://www.mongodb.com/docs/manual/reference/command/listDatabases
294
+ // /
259
295
cursor list_databases (const client_session& session,
260
296
const bsoncxx::v_noabi::document::view_or_value opts) const ;
261
297
262
- // / @}
263
298
// /
299
+ // / Queries the MongoDB server for a list of known databases.
300
+ // /
301
+ // / @param filter
302
+ // / An optional query expression to filter the returned database names.
303
+ // /
304
+ // / @return std::vector<std::string> containing the database names.
305
+ // /
306
+ // / @throws mongocxx::v_noabi::operation_exception if the underlying 'listDatabases'
307
+ // / command fails.
308
+ // /
309
+ // / @see https://www.mongodb.com/docs/manual/reference/command/listDatabases
310
+ // /
311
+ std::vector<std::string> list_database_names (
312
+ const bsoncxx::v_noabi::document::view_or_value filter = {}) const ;
264
313
265
314
// /
266
- // / @{
315
+ // / Queries the MongoDB server for a list of known databases.
316
+ // /
317
+ // / @param session
318
+ // / The mongocxx::v_noabi::client_session with which to perform the aggregation.
319
+ // /
320
+ // / @param filter
321
+ // / An optional query expression to filter the returned database names.
322
+ // /
323
+ // / @return std::vector<std::string> containing the database names.
324
+ // /
325
+ // / @throws mongocxx::v_noabi::operation_exception if the underlying 'listDatabases'
326
+ // / command fails.
327
+ // /
328
+ // / @see https://www.mongodb.com/docs/manual/reference/command/listDatabases
329
+ // /
330
+ std::vector<std::string> list_database_names (
331
+ const client_session& session,
332
+ const bsoncxx::v_noabi::document::view_or_value filter = {}) const ;
267
333
268
334
// /
269
335
// / Queries the MongoDB server for a list of known databases.
@@ -301,9 +367,6 @@ class client {
301
367
const client_session& session,
302
368
const bsoncxx::v_noabi::document::view_or_value filter = {}) const ;
303
369
304
- // / @}
305
- // /
306
-
307
370
// /
308
371
// / Create a client session for a sequence of operations.
309
372
// /
@@ -316,9 +379,6 @@ class client {
316
379
// /
317
380
client_session start_session (const options::client_session& options = {});
318
381
319
- // /
320
- // / @{
321
-
322
382
// /
323
383
// / Get a change stream on this client with an empty pipeline.
324
384
// /
@@ -391,9 +451,6 @@ class client {
391
451
const pipeline& pipe,
392
452
const options::change_stream& options = {});
393
453
394
- // / @}
395
- // /
396
-
397
454
// /
398
455
// / Prevents resource cleanup in the child process from interfering
399
456
// / with the parent process after forking.
0 commit comments