mongoc_database_create_collection(3)
| MONGOC_DATABASE_CREATE_COLLECTION(3) | MongoDB C Driver | MONGOC_DATABASE_CREATE_COLLECTION(3) |
NAME
mongoc_database_create_collection - mongoc_database_create_collection()
SYNOPSIS
mongoc_collection_t * mongoc_database_create_collection (mongoc_database_t *database,
const char *name,
const bson_t *opts,
bson_error_t *error);
PARAMETERS
- database: A mongoc_database_t.
- name: The name of the new collection.
- opts: An optional bson_t for opts to the create command.
- error: A location for a bson_error_t or NULL.
DESCRIPTION
This function creates a mongoc_collection_t from the given mongoc_database_t.
If no write concern is provided in opts, the database’s write concern is used.
ERRORS
Errors are propagated via the error parameter.
RETURNS
This function returns a newly allocated mongoc_collection_t upon success, NULL upon failure and error is set.
AUTHOR
MongoDB, Inc
COPYRIGHT
2017-present, MongoDB, Inc
| June 1, 2021 | 1.14.0 |
