File tree Expand file tree Collapse file tree 3 files changed +72
-5
lines changed Expand file tree Collapse file tree 3 files changed +72
-5
lines changed Original file line number Diff line number Diff line change @@ -14,12 +14,13 @@ SYNOPSIS
14
14
---------------
15
15
#include <mongoc.h>
16
16
17
- mongoc_client_t * client;
18
- mongoc_database_t * database;
17
+ {
18
+ mongoc_database_t *database;
19
+ mongoc_client_t *client;
19
20
20
- client = mongoc_client_new(uri_string);
21
-
22
- database = mongoc_client_get_database(client, "db_name");
21
+ client = mongoc_client_new (uri_string);
22
+ database = mongoc_client_get_database (client, "db_name");
23
+ }
23
24
---------------
24
25
25
26
@@ -57,6 +58,8 @@ linkmongoc:mongoc_database_command[3]
57
58
linkmongoc:mongoc_database_command_simple[3]
58
59
linkmongoc:mongoc_database_drop[3]
59
60
linkmongoc:mongoc_database_has_collection[3]
61
+ linkmongoc:mongoc_database_get_collection[3]
62
+ linkmongoc:mongoc_database_get_name[3]
60
63
linkmongoc:mongoc_database_get_read_prefs[3]
61
64
linkmongoc:mongoc_database_set_read_prefs[3]
62
65
linkmongoc:mongoc_database_get_write_concern[3]
Original file line number Diff line number Diff line change
1
+ mongoc_database_get_collection(3)
2
+ =================================
3
+
4
+
5
+ NAME
6
+ ----
7
+
8
+ mongoc_database_get_collection - Fetch a collection within a database
9
+
10
+
11
+ SYNOPSIS
12
+ --------
13
+ [source,c]
14
+ -----------------------
15
+ mongoc_collection_t *
16
+ mongoc_database_get_collection (mongoc_database_t *database,
17
+ const char *name);
18
+ -----------------------
19
+
20
+
21
+ DESCRIPTION
22
+ -----------
23
+ The _mongoc_database_get_collection()_ function shall return a newly
24
+ allocated mongoc_collection_t for the collection named by _name_.
25
+
26
+ RETURN VALUE
27
+ ------------
28
+ A _mongoc_collection_t_ that should be freed with mongoc_collection_destroy().
29
+
30
+
31
+ AUTHORS
32
+ -------
33
+ This page was written by MongoDB, Inc.
Original file line number Diff line number Diff line change
1
+ mongoc_database_get_name(3)
2
+ ===========================
3
+
4
+
5
+ NAME
6
+ ----
7
+
8
+ mongoc_database_get_name - Fetch the name of database
9
+
10
+
11
+ SYNOPSIS
12
+ --------
13
+ [source,c]
14
+ -----------------------
15
+ const char *mongoc_database_get_name (mongoc_database_t *database);
16
+ -----------------------
17
+
18
+
19
+ DESCRIPTION
20
+ -----------
21
+ The _mongoc_database_get_name()_ function shall return a string containing
22
+ the database name. This value should not be modified or freed.
23
+
24
+ RETURN VALUE
25
+ ------------
26
+ A string which should not be modified or freed.
27
+
28
+
29
+ AUTHORS
30
+ -------
31
+ This page was written by MongoDB, Inc.
You can’t perform that action at this time.
0 commit comments