GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MONGOC_DATABASE_CREATE_COLLECTION(3) libmongoc MONGOC_DATABASE_CREATE_COLLECTION(3)

mongoc_collection_t *
mongoc_database_create_collection (mongoc_database_t *database,

const char *name,
const bson_t *opts,
bson_error_t *error);


  • 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.

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.

The encryptedFields document in opts may be used to create a collection used for Queryable Encryption.

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

2009-present, MongoDB, Inc.

July 3, 2025 1.30.4

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.