mongoc_database_create_collection
mongoc_database_create_collection()
- Provided by: libmongoc-doc (Version: 1.21.0-1build1)
- Source: mongo-c-driver
- Report a bug
mongoc_database_create_collection()
mongoc_collection_t *
mongoc_database_create_collection (mongoc_database_t *database,
const char *name,
const bson_t *opts,
bson_error_t *error)
BSON_GNUC_WARN_UNUSED_RESULT;
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.
For a list of all options, see the MongoDB Manual entry on the create command.
Errors are propagated via the error parameter.
This function returns a newly allocated mongoc_collection_t upon success, NULL upon failure and error is set.
MongoDB, Inc
2017-present, MongoDB, Inc