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

SYNOPSIS

6          mongoc_collection_t *
7          mongoc_collection_copy (mongoc_collection_t *collection)
8             BSON_GNUC_WARN_UNUSED_RESULT;
9

PARAMETERS

11collection: A mongoc_collection_t.
12

DESCRIPTION

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

RETURNS

24       A  newly  allocated  mongoc_collection_t  that  should  be  freed  with
25       mongoc_collection_destroy() when no longer in use.
26

AUTHOR

28       MongoDB, Inc
29
31       2017-present, MongoDB, Inc
32
33
34
35
361.25.1                           Nov 08, 2023        MONGOC_COLLECTION_COPY(3)
Impressum