Skip to content

Commit e2619bc

Browse files
committed
Revert use of groups in mongocxx::v_noabi::client
1 parent 6194542 commit e2619bc

File tree

1 file changed

+72
-15
lines changed
  • src/mongocxx/include/mongocxx/v_noabi/mongocxx

1 file changed

+72
-15
lines changed

src/mongocxx/include/mongocxx/v_noabi/mongocxx/client.hpp

Lines changed: 72 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,8 @@ class client {
218218
bsoncxx::v_noabi::string::view_or_value name) const&;
219219
MONGOCXX_INLINE mongocxx::v_noabi::database operator[](
220220
bsoncxx::v_noabi::string::view_or_value name) const&& = delete;
221-
222221
///
223-
/// @brief Enumerates the databases in the client.
222+
/// Enumerates the databases in the client.
224223
///
225224
/// @return A mongocxx::v_noabi::cursor containing a BSON document for each
226225
/// database. Each document contains a name field with the database
@@ -233,37 +232,104 @@ class client {
233232
///
234233
/// @see https://www.mongodb.com/docs/manual/reference/command/listDatabases
235234
///
236-
/// @{
237-
238235
cursor list_databases() const;
239236

237+
///
238+
/// Enumerates the databases in the client.
240239
///
241240
/// @param session
242241
/// The mongocxx::v_noabi::client_session with which to perform the aggregation.
243242
///
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+
///
244254
cursor list_databases(const client_session& session) const;
245255

256+
///
257+
/// Enumerates the databases in the client.
246258
///
247259
/// @param opts
248260
/// Options passed directly to the 'listDatabases' command.
249261
///
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+
///
250273
cursor list_databases(const bsoncxx::v_noabi::document::view_or_value opts) const;
251274

275+
///
276+
/// Enumerates the databases in the client.
252277
///
253278
/// @param session
254279
/// The mongocxx::v_noabi::client_session with which to perform the aggregation.
255280
///
256281
/// @param opts
257282
/// Options passed directly to the 'listDatabases' command.
258283
///
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+
///
259295
cursor list_databases(const client_session& session,
260296
const bsoncxx::v_noabi::document::view_or_value opts) const;
261297

262-
/// @}
263298
///
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;
264313

265314
///
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;
267333

268334
///
269335
/// Queries the MongoDB server for a list of known databases.
@@ -301,9 +367,6 @@ class client {
301367
const client_session& session,
302368
const bsoncxx::v_noabi::document::view_or_value filter = {}) const;
303369

304-
/// @}
305-
///
306-
307370
///
308371
/// Create a client session for a sequence of operations.
309372
///
@@ -316,9 +379,6 @@ class client {
316379
///
317380
client_session start_session(const options::client_session& options = {});
318381

319-
///
320-
/// @{
321-
322382
///
323383
/// Get a change stream on this client with an empty pipeline.
324384
///
@@ -391,9 +451,6 @@ class client {
391451
const pipeline& pipe,
392452
const options::change_stream& options = {});
393453

394-
/// @}
395-
///
396-
397454
///
398455
/// Prevents resource cleanup in the child process from interfering
399456
/// with the parent process after forking.

0 commit comments

Comments
 (0)