Skip site navigation (1)Skip section navigation (2)

  
 
  

home | help
MONGOC_DATABA...ATE_COLLECTION(3)   libmongoc  MONGOC_DATABA...ATE_COLLECTION(3)

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.

     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  com-
     mand.

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
     2009-present, MongoDB, Inc.

1.30.8				  Aug 27, 2026 MONGOC_DATABA...ATE_COLLECTION(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=mongoc_database_create_collection&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help