1MONGOC_DATABASE_CREATE_COLLECTION(3)libmongoMcONGOC_DATABASE_CREATE_COLLECTION(3)
2
3
4

NAME

6       mongoc_database_create_collection - mongoc_database_create_collection()
7

SYNOPSIS

9          mongoc_collection_t *
10          mongoc_database_create_collection (mongoc_database_t *database,
11                                             const char *name,
12                                             const bson_t *opts,
13                                             bson_error_t *error)
14             BSON_GNUC_WARN_UNUSED_RESULT;
15

PARAMETERS

17database: A mongoc_database_t.
18
19name: The name of the new collection.
20
21opts: An optional bson_t for opts to the create command.
22
23error: A location for a bson_error_t or NULL.
24

DESCRIPTION

26       This   function   creates   a   mongoc_collection_t   from   the  given
27       mongoc_database_t.
28
29       If no write concern is provided in opts, the database's  write  concern
30       is used.
31
32       The encryptedFields document in opts may be used to create a collection
33       used for Queryable Encryption.
34
35       For a list of all options, see the MongoDB Manual entry on  the  create
36       command.
37

ERRORS

39       Errors are propagated via the error parameter.
40

RETURNS

42       This  function  returns a newly allocated mongoc_collection_t upon suc‐
43       cess, NULL upon failure and error is set.
44

AUTHOR

46       MongoDB, Inc
47
49       2017-present, MongoDB, Inc
50
51
52
53
541.24.3                           Aug 17, 20M2O3NGOC_DATABASE_CREATE_COLLECTION(3)
Impressum