1MONGOC_DATABASE_T(3)               libmongoc              MONGOC_DATABASE_T(3)
2
3
4
5MongoDB Database Abstraction
6

SYNOPSIS

8          typedef struct _mongoc_database_t mongoc_database_t;
9
10       mongoc_database_t provides access to a MongoDB database. This handle is
11       useful for actions a particular database object. It is not a  container
12       for mongoc_collection_t structures.
13
14       Read  preferences  and  write  concerns  are  inherited from the parent
15       client. They can be  overridden  with  mongoc_database_set_read_prefs()
16       and mongoc_database_set_write_concern().
17

EXAMPLES

19          #include <mongoc/mongoc.h>
20
21          int
22          main (int argc, char *argv[])
23          {
24             mongoc_database_t *database;
25             mongoc_client_t *client;
26
27             mongoc_init ();
28
29             client = mongoc_client_new ("mongodb://localhost/");
30             database = mongoc_client_get_database (client, "test");
31
32             mongoc_database_destroy (database);
33             mongoc_client_destroy (client);
34
35             mongoc_cleanup ();
36
37             return 0;
38          }
39

AUTHOR

41       MongoDB, Inc
42
44       2017-present, MongoDB, Inc
45
46
47
48
491.25.1                           Nov 08, 2023             MONGOC_DATABASE_T(3)
Impressum