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

FreeBSD Manual Pages

  
 
  

home | help
MONGOC_DATABASE_T(3)		   libmongoc		  MONGOC_DATABASE_T(3)

MongoDB	Database Abstraction

SYNOPSIS
	  typedef struct _mongoc_database_t mongoc_database_t;

       mongoc_database_t provides access to a MongoDB database.	This handle is
       useful  for actions a particular	database object. It is not a container
       for mongoc_collection_t structures.

       Read preferences	and write  concerns  are  inherited  from  the	parent
       client.	They  can  be overridden with mongoc_database_set_read_prefs()
       and mongoc_database_set_write_concern().

EXAMPLES
	  #include <mongoc/mongoc.h>

	  int
	  main (int argc, char *argv[])
	  {
	     mongoc_database_t *database;
	     mongoc_client_t *client;

	     mongoc_init ();

	     client = mongoc_client_new	("mongodb://localhost/");
	     database =	mongoc_client_get_database (client, "test");

	     mongoc_database_destroy (database);
	     mongoc_client_destroy (client);

	     mongoc_cleanup ();

	     return 0;
	  }

AUTHOR
       MongoDB,	Inc

COPYRIGHT
       2009-present, MongoDB, Inc.

1.30.2				 Apr 12, 2025		  MONGOC_DATABASE_T(3)

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

home | help