1MONGOC_COLLECTION_COPY(3)          libmongoc         MONGOC_COLLECTION_COPY(3)
2
3
4

NAME

6       mongoc_collection_copy - mongoc_collection_copy()
7

SYNOPSIS

9          mongoc_collection_t *
10          mongoc_collection_copy (mongoc_collection_t *collection)
11             BSON_GNUC_WARN_UNUSED_RESULT;
12

PARAMETERS

14collection: A mongoc_collection_t.
15

DESCRIPTION

17       Performs  a  deep  copy of the collection struct and its configuration.
18       Useful if you intend to call mongoc_collection_set_write_concern,  mon‐
19       goc_collection_set_read_prefs,  or  mongoc_collection_set_read_concern,
20       and want to preserve an unaltered copy of the struct.
21
22       This function does not copy the contents of the collection on the  Mon‐
23       goDB server.
24

RETURNS

26       A  newly  allocated  mongoc_collection_t that should be freed with mon‐
27       goc_collection_destroy() when no longer in use.
28

AUTHOR

30       MongoDB, Inc
31
33       2017-present, MongoDB, Inc
34
35
36
37
381.20.0                           Nov 18, 2021        MONGOC_COLLECTION_COPY(3)
Impressum