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

PARAMETERS

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

DESCRIPTION

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

ERRORS

32       Errors are propagated via the error parameter.
33

RETURNS

35       This  function  returns a newly allocated mongoc_collection_t upon suc‐
36       cess, NULL upon failure and error is set.
37

AUTHOR

39       MongoDB, Inc
40
42       2017-present, MongoDB, Inc
43
44
45
46
471.17.6                           Jun 03, 20M2O1NGOC_DATABASE_CREATE_COLLECTION(3)
Impressum