1MONGOC_DATABASE_CREATE_COLLECTION(3)libmongoMcONGOC_DATABASE_CREATE_COLLECTION(3)
2
3
4
6 mongoc_database_create_collection - mongoc_database_create_collection()
7
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
16 · database: A mongoc_database_t.
17
18 · name: The name of the new collection.
19
20 · opts: An optional bson_t for opts to the create command.
21
22 · error: A location for a bson_error_t or NULL.
23
25 This function creates a mongoc_collection_t from the given mongoc_data‐
26 base_t.
27
28 If no write concern is provided in opts, the database's write concern
29 is used.
30
32 Errors are propagated via the error parameter.
33
35 This function returns a newly allocated mongoc_collection_t upon suc‐
36 cess, NULL upon failure and error is set.
37
39 MongoDB, Inc
40
42 2017-present, MongoDB, Inc
43
44
45
46
471.17.4 Feb 04, 20M2O1NGOC_DATABASE_CREATE_COLLECTION(3)