Skip to content

Commit 3b6eb3d

Browse files
(DOCSP-33216): Document new binData subtype 8 (#4812)
* (DOCSP-26200): queryStats aggregation stage * WIP * WIP * WIP * Remove accidental file * add TODO * add missing ref * formatting * WIP * WIP * WIP * wording * WIP * edits * add examples * try to fix table format * add transformed example * remove TODO * more table formatting * add atlas data collection * table formatting * clarity * add more context for data collection * table formatting * wording tweaks * address review comments * formatting * use simplified examples * add input/output * edits * add link to transformed example * spacing * edits * address review comments * fix incomplete sentence * rework transformation section * edits * fix collation link formatting * change wording for output fields * edit glossary * more edits * remove glossary entry * formatting * edits * (DOCSP-33216): Document new binData subtype 8 * edits * Address review feedback * wording * review feedback * wording * tweaks * typo * clarification * review edit * address review comments * wording * formatting * WIP review edits * remove Atlas data collection info * (DOCSP-33347): Re-add Atlas data collection info * typo * minimalism * typo * clarity * remove Atlas data collection info * edits * (DOCSP-33347): Re-add Atlas data collection info * add find queryShape properties * change case * formatting * abstracted > normalized consistency * clarify privilege * address review comments * review edits
1 parent f7c8253 commit 3b6eb3d

File tree

3 files changed

+54
-73
lines changed

3 files changed

+54
-73
lines changed

source/includes/binary-subtypes.rst

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
.. list-table::
2+
:header-rows: 1
3+
4+
* - Number
5+
- Description
6+
7+
* - 0
8+
- Generic binary subtype
9+
10+
* - 1
11+
- Function data
12+
13+
* - 2
14+
- Binary (old)
15+
16+
* - 3
17+
- UUID (old)
18+
19+
* - 4
20+
- UUID
21+
22+
* - 5
23+
- MD5
24+
25+
* - 6
26+
- Encrypted BSON value
27+
28+
* - 7
29+
- Compressed time series data
30+
31+
.. versionadded:: 5.2
32+
33+
* - 8
34+
- Sensitive data, such as a key or secret. MongoDB does not log
35+
literal values for binary data with subtype 8. Instead, MongoDB
36+
logs a placeholder value of ``###``.
37+
38+
* - 128
39+
- Custom data

source/reference/bson-types.txt

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -48,42 +48,9 @@ Binary Data
4848

4949
A BSON binary ``binData`` value is a byte array. A ``binData`` value
5050
has a subtype that indicates how to interpret the binary data. The
51-
following table shows the subtypes.
51+
following table shows the subtypes:
5252

53-
.. list-table::
54-
:header-rows: 1
55-
56-
* - Number
57-
- Subtype
58-
59-
* - 0
60-
- Generic binary subtype
61-
62-
* - 1
63-
- Function data
64-
65-
* - 2
66-
- Binary (old)
67-
68-
* - 3
69-
- UUID (old)
70-
71-
* - 4
72-
- UUID
73-
74-
* - 5
75-
- MD5
76-
77-
* - 6
78-
- Encrypted BSON value
79-
80-
* - 7
81-
- Compressed time series data
82-
83-
.. versionadded:: 5.2
84-
85-
* - 128
86-
- Custom data
53+
.. include:: /includes/binary-subtypes.rst
8754

8855
.. _document-bson-type-object-id:
8956
.. _objectid:

source/reference/method/BinData.txt

Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -33,52 +33,27 @@ Creates a binary data object.
3333

3434
* - ``sub_type``
3535

36-
- string
37-
38-
- The binary type.
39-
40-
.. list-table::
41-
:header-rows: 1
42-
:widths: 40 60
43-
44-
* - Subtype
45-
- Description
46-
47-
* - 0
48-
49-
- Generic binary subtype
50-
51-
* - 1
52-
53-
- Function
54-
55-
* - 2
56-
57-
- Byte Array
36+
- integer
5837

59-
* - 3
38+
- The :ref:`binary subtype <binData-subtype>`
6039

61-
- OLD UUID
62-
63-
* - 4
64-
65-
- UUID
66-
67-
* - 5
40+
* - ``buffer``
6841

69-
- MD5
42+
- string
7043

71-
* - 128
44+
- The buffer object containing binary data. Must be a base 64
45+
encoded string value.
7246

73-
- User defined
47+
:returns: A binary data object.
7448

75-
* - ``buffer``
49+
.. _binData-subtype:
7650

77-
- string
51+
Binary Subtypes
52+
~~~~~~~~~~~~~~~
7853

79-
- The buffer object containing binary data, must be a base 64 encoded string value.
54+
Specify one of the following values for ``sub_type``:
8055

81-
:returns: A binary data object.
56+
.. include:: /includes/binary-subtypes.rst
8257

8358
Examples
8459
--------
@@ -136,4 +111,4 @@ The returned value is:
136111
.. code-block:: javascript
137112
:copyable: false
138113

139-
16
114+
16

0 commit comments

Comments
 (0)