1MONGOC_COLLECTION_RENAME(3) libmongoc MONGOC_COLLECTION_RENAME(3)
2
3
4
6 bool
7 mongoc_collection_rename (mongoc_collection_t *collection,
8 const char *new_db,
9 const char *new_name,
10 bool drop_target_before_rename,
11 bson_error_t *error);
12
14 • collection: A mongoc_collection_t.
15
16 • new_db: The name of the new database.
17
18 • new_name: The new name for the collection.
19
20 • drop_target_before_rename: If an existing collection matches the new
21 name, drop it before the rename.
22
23 • error: An optional location for a bson_error_t or NULL.
24
26 For more information, see mongoc_collection_rename_with_opts(). This
27 function is a thin wrapper, passing NULL in as bson_t parameter.
28
30 MongoDB, Inc
31
33 2017-present, MongoDB, Inc
34
35
36
37
381.25.1 Nov 08, 2023 MONGOC_COLLECTION_RENAME(3)