Skip to content

Commit 282f110

Browse files
committed
CDRIVER-3807 make "See Also" sections consistent in docs
1 parent d0d511f commit 282f110

File tree

198 files changed

+696
-761
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+696
-761
lines changed

src/libbson/doc/bson_copy_to_excluding_noinit_va.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The :symbol:`bson_copy_to_excluding_noinit_va()` function shall copy all fields
2929

3030
This method works the same way as :symbol:`bson_copy_to_excluding_noinit`, except it takes a va_list. This method does not call :symbol:`bson_init` on ``dst``.
3131

32-
See Also
33-
--------
32+
.. seealso::
33+
34+
| :symbol:`bson_copy_to_excluding_noinit`
3435
35-
:symbol:`bson_copy_to_excluding_noinit`

src/libbson/doc/bson_destroy_with_steal.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ Description
2323

2424
The :symbol:`bson_destroy_with_steal()` function shall destroy a :symbol:`bson_t` structure but return the underlying buffer instead of freeing it. If steal is false, this is equivalent to calling bson_destroy(). It is a programming error to call this function on a :symbol:`bson_t` that is not a top-level :symbol:`bson_t`, such as those initialized with :symbol:`bson_append_document_begin()`, :symbol:`bson_append_array_begin()`, and :symbol:`bson_writer_begin()`.
2525

26-
See also :symbol:`bson_steal`, a higher-level function that efficiently transfers the contents of one :symbol:`bson_t` to another.
27-
2826
Returns
2927
-------
3028

3129
:symbol:`bson_destroy_with_steal()` shall return a buffer containing the contents of the :symbol:`bson_t` if ``steal`` is non-zero. This should be freed with :symbol:`bson_free()` when no longer in use. ``length`` will be set to the length of the bson document if non-NULL.
3230

31+
.. seealso::
32+
33+
| :symbol:`bson_steal`, a higher-level function that efficiently transfers the contents of one :symbol:`bson_t` to another.
34+

src/libbson/doc/bson_iter_init_from_data_at_offset.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,16 @@ Then later, these saved values can be passed to
4444
:symbol:`bson_iter_init_from_data_at_offset()` to reconstruct the
4545
:symbol:`bson_iter_t` in constant time.
4646

47-
See Also
48-
--------
49-
50-
* :symbol:`bson_iter_key_len()`
51-
* :symbol:`bson_iter_offset()`
52-
* :symbol:`bson_get_data()`
53-
5447
Returns
5548
-------
5649

57-
Returns true if the iter was successfully initialized.
50+
Returns true if the iter was successfully initialized.
51+
52+
.. seealso::
53+
54+
| :symbol:`bson_iter_key_len()`
55+
56+
| :symbol:`bson_iter_offset()`
57+
58+
| :symbol:`bson_get_data()`
59+

src/libbson/doc/bson_iter_key.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ Description
2121

2222
Fetches the key for the current element observed by ``iter``.
2323

24-
See Also
25-
--------
26-
27-
:symbol:`bson_iter_key_len()` to retrieve the length of the key in constant time.
28-
2924
Returns
3025
-------
3126

3227
A string which should not be modified or freed.
3328

29+
.. seealso::
30+
31+
| :symbol:`bson_iter_key_len()` to retrieve the length of the key in constant time.
32+

src/libbson/doc/bson_iter_key_len.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ Description
2121

2222
Fetches the length of the key for the current element observed by ``iter``. This is a constant time computation, and therefore faster than calling ``strlen()`` on a key returned by :symbol:`bson_iter_key()`.
2323

24-
See Also
25-
--------
26-
27-
:symbol:`bson_iter_key()` to retrieve current key.
28-
2924
Returns
3025
-------
3126

3227
An integer representing the key length.
3328

29+
.. seealso::
30+
31+
| :symbol:`bson_iter_key()` to retrieve current key.
32+

src/libbson/doc/bson_iter_offset.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ Description
2121

2222
Fetches the offset for the current element observed by ``iter``.
2323

24-
See Also
25-
--------
26-
27-
:symbol:`bson_iter_init_from_data_at_offset()` to use this offset to reconstruct a :symbol:`bson_iter_t` in constant time.
28-
2924
Returns
3025
-------
3126

3227
An unsigned integer representing the offset in the BSON data of the current element.
3328

29+
.. seealso::
30+
31+
| :symbol:`bson_iter_init_from_data_at_offset()` to use this offset to reconstruct a :symbol:`bson_iter_t` in constant time.
32+

src/libbson/doc/bson_md5_t.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Synopsis
2323
Description
2424
-----------
2525

26-
bson_md5_t encapsulates an implementation of the MD5 algorithm.
26+
:symbol:`bson_md5_t` encapsulates an implementation of the MD5 algorithm.
2727

2828
.. only:: html
2929

src/libbson/doc/bson_steal.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,12 @@ For example, if you have a higher-level structure that wraps a :symbol:`bson_t`,
7070
bson_wrapper_destroy (wrapper);
7171
}
7272
73-
See also :symbol:`bson_destroy_with_steal`, a lower-level function that returns the raw contents of a :symbol:`bson_t`.
74-
7573
Returns
7674
-------
7775

7876
Returns ``true`` if ``src`` was successfully moved to ``dst``, ``false`` if ``src`` is invalid, or was statically initialized, or another error occurred.
7977

78+
.. seealso::
79+
80+
| :symbol:`bson_destroy_with_steal`, a lower-level function that returns the raw contents of a :symbol:`bson_t`.
81+

src/libbson/doc/bson_validate.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ Validates a BSON document by walking through the document and inspecting the key
2525

2626
You can modify how the validation occurs through the use of the ``flags`` parameter, see :symbol:`bson_validate_with_error()` for details.
2727

28-
See Also
29-
--------
30-
:symbol:`bson_validate_with_error()`.
31-
32-
:symbol:`bson_visitor_t` can be used for custom validation, :ref:`example_custom_validation`.
33-
3428
Returns
3529
-------
3630

3731
Returns true if ``bson`` is valid; otherwise false and ``offset`` is set to the byte offset where the error was detected.
3832

33+
.. seealso::
34+
35+
| :symbol:`bson_validate_with_error()`.
36+
37+
| :symbol:`bson_visitor_t` can be used for custom validation, :ref:`example_custom_validation`.
38+

src/libbson/doc/bson_validate_with_error.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,16 @@ You can modify how the validation occurs through the use of the ``flags`` parame
4343
* ``BSON_VALIDATE_DOT_KEYS`` Prohibit keys that contain ``.`` anywhere in the string.
4444
* ``BSON_VALIDATE_EMPTY_KEYS`` Prohibit zero-length keys.
4545

46-
See Also
47-
--------
48-
49-
:symbol:`bson_validate()`.
50-
51-
:symbol:`bson_visitor_t` can be used for custom validation, :ref:`example_custom_validation`.
52-
5346
Returns
5447
-------
5548

5649
Returns true if ``bson`` is valid; otherwise false and ``error`` is filled out.
5750

5851
The :symbol:`bson_error_t` domain is set to ``BSON_ERROR_INVALID``. Its code is set to one of the ``bson_validate_flags_t`` flags indicating which validation failed; for example, if a key contains invalid UTF-8, then the code is set to ``BSON_VALIDATE_UTF8``, but if the basic structure of the BSON document is corrupt, the code is set to ``BSON_VALIDATE_NONE``. The error message is filled out, and gives more detail if possible.
52+
53+
.. seealso::
54+
55+
| :symbol:`bson_validate()`.
56+
57+
| :symbol:`bson_visitor_t` can be used for custom validation, :ref:`example_custom_validation`.
58+

src/libmongoc/doc/cursors.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,7 @@ Let's compile and run this example against a replica set to see updates as they
8686
8787
The line of output is a sample from performing ``db.test.insert({})`` from the mongo shell on the replica set.
8888

89-
See also :symbol:`mongoc_cursor_set_max_await_time_ms`.
89+
.. seealso::
90+
91+
| :symbol:`mongoc_cursor_set_max_await_time_ms`.
9092

src/libmongoc/doc/errors.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ Description
1010

1111
Many C Driver functions report errors by returning ``false`` or -1 and filling out a :symbol:`bson:bson_error_t` structure with an error domain, error code, and message. Use ``domain`` to determine which subsystem generated the error, and ``code`` for the specific error. ``message`` is a human-readable error description.
1212

13-
See also: :doc:`Handling Errors in libbson <bson:errors>`.
13+
.. seealso::
14+
15+
| :doc:`Handling Errors in libbson <bson:errors>`.
1416
1517
+-----------------------------------------+---------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1618
|Domain | Code | Description |
@@ -163,10 +165,9 @@ To fix this flaw while preserving backward compatibility, the C Driver 1.4 intro
163165

164166
The Error API Versions are defined with ``MONGOC_ERROR_API_VERSION_LEGACY`` and ``MONGOC_ERROR_API_VERSION_2``. Set the version with :symbol:`mongoc_client_set_error_api` or :symbol:`mongoc_client_pool_set_error_api`.
165167

166-
See Also
167-
--------
168+
.. seealso::
168169

169-
`MongoDB Server Error Codes <https://github.com/mongodb/mongo/blob/master/src/mongo/base/error_codes.err>`_
170+
| `MongoDB Server Error Codes <https://github.com/mongodb/mongo/blob/master/src/mongo/base/error_codes.err>`_
170171
171172
.. only:: html
172173

src/libmongoc/doc/mongoc_apm_callbacks_destroy.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ Synopsis
1313
1414
Free a :symbol:`mongoc_apm_callbacks_t`. Does nothing if ``callbacks`` is NULL.
1515

16-
See Also
17-
--------
16+
.. seealso::
1817

19-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
18+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
2019

src/libmongoc/doc/mongoc_apm_callbacks_new.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ Returns
1818

1919
A new ``mongoc_apm_callbacks_t`` you must free with :symbol:`mongoc_apm_callbacks_destroy`.
2020

21-
See Also
22-
--------
21+
.. seealso::
2322

24-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
23+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
2524

src/libmongoc/doc/mongoc_apm_callbacks_t.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,9 @@ Used to receive notification of events, such as when a MongoDB command begins, s
1212

1313
Create a ``mongoc_apm_callbacks_t`` with :symbol:`mongoc_apm_callbacks_new`, set callbacks on it, then pass it to :symbol:`mongoc_client_set_apm_callbacks` or :symbol:`mongoc_client_pool_set_apm_callbacks`.
1414

15-
See Also
16-
--------
15+
.. seealso::
1716

18-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
17+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
1918
2019
.. only:: html
2120

src/libmongoc/doc/mongoc_apm_command_failed_get_command_name.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Returns
2424

2525
A string that should not be modified or freed.
2626

27-
See Also
28-
--------
27+
.. seealso::
2928

30-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
29+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
3130

src/libmongoc/doc/mongoc_apm_command_failed_get_context.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Returns
2424

2525
The pointer passed with :symbol:`mongoc_client_set_apm_callbacks` or :symbol:`mongoc_client_pool_set_apm_callbacks`.
2626

27-
See Also
28-
--------
27+
.. seealso::
2928

30-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
29+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
3130

src/libmongoc/doc/mongoc_apm_command_failed_get_duration.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Returns
2424

2525
The event's duration.
2626

27-
See Also
28-
--------
27+
.. seealso::
2928

30-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
29+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
3130

src/libmongoc/doc/mongoc_apm_command_failed_get_error.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ Parameters
2020
* ``event``: A :symbol:`mongoc_apm_command_failed_t`.
2121
* ``error``: A :symbol:`bson:bson_error_t` to receive the event's error info.
2222

23-
See Also
24-
--------
23+
.. seealso::
2524

26-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
25+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
2726

src/libmongoc/doc/mongoc_apm_command_failed_get_host.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ Returns
2323

2424
A :symbol:`mongoc_host_list_t` that should not be modified or freed.
2525

26-
See Also
27-
--------
26+
.. seealso::
2827

29-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
28+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
3029

src/libmongoc/doc/mongoc_apm_command_failed_get_operation_id.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Returns
2424

2525
The event's operation id.
2626

27-
See Also
28-
--------
27+
.. seealso::
2928

30-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
29+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
3130

src/libmongoc/doc/mongoc_apm_command_failed_get_reply.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Returns
2424

2525
A :symbol:`bson:bson_t` that should not be modified or freed.
2626

27-
See Also
28-
--------
27+
.. seealso::
2928

30-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
29+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
3130

src/libmongoc/doc/mongoc_apm_command_failed_get_request_id.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Returns
2424

2525
The event's request id.
2626

27-
See Also
28-
--------
27+
.. seealso::
2928

30-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
29+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
3130

src/libmongoc/doc/mongoc_apm_command_failed_get_server_id.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Returns
2424

2525
The event's server id.
2626

27-
See Also
28-
--------
27+
.. seealso::
2928

30-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
29+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
3130

src/libmongoc/doc/mongoc_apm_command_failed_t.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ An event notification sent when the driver fails to execute a MongoDB command.
2929
mongoc_apm_command_failed_get_request_id
3030
mongoc_apm_command_failed_get_server_id
3131

32-
See Also
33-
--------
32+
.. seealso::
3433

35-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
34+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
3635

src/libmongoc/doc/mongoc_apm_command_started_get_command.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Returns
2424

2525
A :symbol:`bson:bson_t` that should not be modified or freed.
2626

27-
See Also
28-
--------
27+
.. seealso::
2928

30-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
29+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
3130

src/libmongoc/doc/mongoc_apm_command_started_get_command_name.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Returns
2424

2525
A string that should not be modified or freed.
2626

27-
See Also
28-
--------
27+
.. seealso::
2928

30-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
29+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
3130

src/libmongoc/doc/mongoc_apm_command_started_get_context.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Returns
2424

2525
The pointer passed with :symbol:`mongoc_client_set_apm_callbacks` or :symbol:`mongoc_client_pool_set_apm_callbacks`.
2626

27-
See Also
28-
--------
27+
.. seealso::
2928

30-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
29+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
3130

src/libmongoc/doc/mongoc_apm_command_started_get_database_name.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ Returns
2424

2525
A string that should not be modified or freed.
2626

27-
See Also
28-
--------
27+
.. seealso::
2928

30-
:doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
29+
| :doc:`Introduction to Application Performance Monitoring <application-performance-monitoring>`
3130

0 commit comments

Comments
 (0)