File tree Expand file tree Collapse file tree 5 files changed +225
-0
lines changed Expand file tree Collapse file tree 5 files changed +225
-0
lines changed Original file line number Diff line number Diff line change 1+ mongoc_collection_find_and_modify(3)
2+ ====================================
3+
4+
5+ NAME
6+ ----
7+ mongoc_collection_find_and_modify - find a documents matching a selector and modify them
8+
9+
10+ SYNOPSIS
11+ --------
12+ [source,c]
13+ -----------------------
14+ bool mongoc_collection_find_and_modify (mongoc_collection_t *collection,
15+ const bson_t *query,
16+ const bson_t *sort,
17+ const bson_t *update,
18+ const bson_t *fields,
19+ bool remove,
20+ bool upsert,
21+ bool return_new,
22+ bson_t *reply,
23+ bson_error_t *error);
24+ -----------------------
25+
26+
27+ DESCRIPTION
28+ -----------
29+
30+ The _mongoc_collection_find_and_modify()_ function is a helper for the
31+ findAndModify command.
32+
33+ Documents matching _query_ and sorted with _sort_ will be updated using
34+ _update_ as the update specification. Only fields matching _fields_ will
35+ be returned.
36+
37+ If _remove_ is true, then matching documents will be removed.
38+
39+ If _upsert_ is true and no document matching _query_ is found, then
40+ a new document will be inserted.
41+
42+ If _return_new_ is true, then the new version of the document is returned.
43+ Otherwise, the previous version of the document is returned.
44+
45+ _reply_ is a location to store the resulting document. It will always be
46+ initialized even if the command is failed. Release this with _bson_destroy()_.
47+
48+
49+ RETURN VALUE
50+ ------------
51+ true if the command executed successfully.
52+ false if the command failed and _error_ is set.
53+
54+
55+ AUTHORS
56+ -------
57+ This page was written by MongoDB, Inc.
Original file line number Diff line number Diff line change 1+ mongoc_collection_rename(3)
2+ ===========================
3+
4+
5+ NAME
6+ ----
7+ mongoc_collection_rename - rename a MongoDB collection
8+
9+
10+ SYNOPSIS
11+ --------
12+ [source,c]
13+ -----------------------
14+ bool mongoc_collection_rename (mongoc_collection_t *collection,
15+ const char *new_db,
16+ const char *new_name,
17+ bool drop_target_before_rename,
18+ bson_error_t *error);
19+ -----------------------
20+
21+
22+ DESCRIPTION
23+ -----------
24+
25+ The _mongoc_collection_rename()_ function is a helper to rename an
26+ existing collection on the MongoDB server.
27+
28+ _new_db_ is the name of the new database to place the collection within.
29+
30+ _new_name_ is the name of the new collection within _new_db_.
31+
32+ If _drop_target_before_rename_ is true, than any collection matching
33+ _new_name_ will be dropped before renaming the collection.
34+
35+
36+ RETURN VALUE
37+ ------------
38+ true if the command executed successfully.
39+ false if the command failed and _error_ is set.
40+
41+
42+ AUTHORS
43+ -------
44+ This page was written by MongoDB, Inc.
Original file line number Diff line number Diff line change 1+ mongoc_collection_stats(3)
2+ ==========================
3+
4+
5+ NAME
6+ ----
7+ mongoc_collection_stats - fetch stats on a MongoDB collection
8+
9+
10+ SYNOPSIS
11+ --------
12+ [source,c]
13+ -----------------------
14+ bool mongoc_collection_stats (mongoc_collection_t *collection,
15+ const bson_t *options,
16+ bson_t *reply,
17+ bson_error_t *error);
18+ -----------------------
19+
20+
21+ DESCRIPTION
22+ -----------
23+
24+ The _mongoc_collection_stats()_ function is a helper to retrieve stats
25+ on a MongoDB collection.
26+
27+ _options_ is an optional bson document containing extra options to pass
28+ to the _collStats_ command.
29+
30+ If successful, the results are stored in _reply_.
31+
32+ _reply_ is initialized even in the case of failure. Release this
33+ with _bson_destroy()_.
34+
35+
36+ RETURN VALUE
37+ ------------
38+ true if the command executed successfully.
39+ false if the command failed and _error_ is set.
40+
41+
42+ AUTHORS
43+ -------
44+ This page was written by MongoDB, Inc.
Original file line number Diff line number Diff line change 1+ mongoc_collection_validate(3)
2+ =============================
3+
4+
5+ NAME
6+ ----
7+ mongoc_collection_validate - validate the contents of a MongoDB collection
8+
9+
10+ SYNOPSIS
11+ --------
12+ [source,c]
13+ -----------------------
14+ bool mongoc_collection_validate (mongoc_collection_t *collection,
15+ const bson_t *options,
16+ bson_t *reply,
17+ bson_error_t *error);
18+ -----------------------
19+
20+
21+ DESCRIPTION
22+ -----------
23+
24+ The _mongoc_collection_validate()_ function is a helper to validate a MongoDB
25+ collection.
26+
27+ _options_ is an optional bson document containing extra options to pass
28+ to the _validate_ command.
29+
30+ Currently supported options are::
31+
32+ - if _full_ is true, then a more thorough scan is performed.
33+ - if _scandata_ is false, then indexes are scanned but not data.
34+
35+ The results are stored in _reply_. _reply_ is initialized even in the case of
36+ failure. Release this with _bson_destroy()_.
37+
38+
39+ RETURN VALUE
40+ ------------
41+ true if the command executed successfully.
42+ false if the command failed and _error_ is set.
43+
44+
45+ AUTHORS
46+ -------
47+ This page was written by MongoDB, Inc.
Original file line number Diff line number Diff line change 1+ mongoc_cursor_current(3)
2+ ========================
3+
4+
5+ NAME
6+ ----
7+ mongoc_collection_current - fetch current document from MongoDB cursor
8+
9+
10+ SYNOPSIS
11+ --------
12+ [source,c]
13+ -----------------------
14+ const bson_t *mongoc_cursor_current (const mongoc_cursor_t *);
15+ -----------------------
16+
17+
18+ DESCRIPTION
19+ -----------
20+ This function returns the current document observed by a _mongoc_cursor_t_.
21+ This is the same as the result document from _mongoc_cursor_next()_.
22+
23+ This primarily useful to language bindings.
24+
25+
26+ RETURN VALUE
27+ ------------
28+ A document which should not be modified or freed.
29+
30+
31+ AUTHORS
32+ -------
33+ This page was written by MongoDB, Inc.
You can’t perform that action at this time.
0 commit comments