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 mongoc_data‐
27       base_t.
28
29       If no write concern is provided in opts, the database's  write  concern
30       is used.
31
32       For  a  list of all options, see the MongoDB Manual entry on the create
33       command.
34

ERRORS

36       Errors are propagated via the error parameter.
37

RETURNS

39       This function returns a newly allocated mongoc_collection_t  upon  suc‐
40       cess, NULL upon failure and error is set.
41

AUTHOR

43       MongoDB, Inc
44
46       2017-present, MongoDB, Inc
47
48
49
50
511.21.1                           Mar 02, 20M2O2NGOC_DATABASE_CREATE_COLLECTION(3)
Impressum