Skip to content

Commit e8be2e9

Browse files
DRIVERS-3064 Clarify that rawData is for internal use only (#1839)
1 parent eb7f9a2 commit e8be2e9

File tree

3 files changed

+167
-36
lines changed

3 files changed

+167
-36
lines changed

source/crud/bulk-write.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,13 @@ class BulkWriteOptions {
313313
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
314314
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
315315
*
316+
* This option is intended for internal use by MongoDB teams and should be discouraged for
317+
* general application use. It may be changed or removed in any release without notice.
318+
*
319+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
320+
* - Marking it as deprecated, experimental, or internal in their language's idioms
321+
* - Excluding it from primary documentation
322+
*
316323
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
317324
*
318325
* @since MongoDB 8.2
@@ -940,6 +947,8 @@ error in this specific situation does not seem helpful enough to require size ch
940947

941948
## **Changelog**
942949

950+
- 2025-09-09: Clarify that `rawData` is for internal use only.
951+
943952
- 2025-08-13: Removed the requirement to error when QE is enabled.
944953

945954
- 2025-06-27: Added `rawData` option.

source/crud/crud.md

Lines changed: 114 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,13 @@ class AggregateOptions {
323323
/**
324324
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
325325
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
326+
327+
* This option is intended for internal use by MongoDB teams and should be discouraged for
328+
* general application use. It may be changed or removed in any release without notice.
329+
*
330+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
331+
* - Marking it as deprecated, experimental, or internal in their language's idioms
332+
* - Excluding it from primary documentation
326333
*
327334
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
328335
*
@@ -384,7 +391,13 @@ class CountOptions {
384391
385392
/**
386393
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
387-
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
394+
*
395+
* This option is intended for internal use by MongoDB teams and should be discouraged for
396+
* general application use. It may be changed or removed in any release without notice.
397+
*
398+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
399+
* - Marking it as deprecated, experimental, or internal in their language's idioms
400+
* - Excluding it from primary documentation
388401
*
389402
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
390403
*
@@ -415,11 +428,18 @@ class EstimatedDocumentCountOptions {
415428
* comment may result in a server-side error.
416429
*/
417430
comment: Optional<any>;
418-
431+
419432
/**
420433
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
421434
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
422435
*
436+
* This option is intended for internal use by MongoDB teams and should be discouraged for
437+
* general application use. It may be changed or removed in any release without notice.
438+
*
439+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
440+
* - Marking it as deprecated, experimental, or internal in their language's idioms
441+
* - Excluding it from primary documentation
442+
*
423443
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
424444
*
425445
* @since MongoDB 8.2
@@ -469,11 +489,18 @@ class DistinctOptions {
469489
* @see https://www.mongodb.com/docs/manual/reference/command/find/
470490
*/
471491
hint: Optional<(String | Document)>;
472-
492+
473493
/**
474494
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
475495
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
476496
*
497+
* This option is intended for internal use by MongoDB teams and should be discouraged for
498+
* general application use. It may be changed or removed in any release without notice.
499+
*
500+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
501+
* - Marking it as deprecated, experimental, or internal in their language's idioms
502+
* - Excluding it from primary documentation
503+
*
477504
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
478505
*
479506
* @since MongoDB 8.2
@@ -753,11 +780,18 @@ class FindOptions {
753780
* @see https://www.mongodb.com/docs/manual/reference/command/find/
754781
*/
755782
let: Optional<Document>;
756-
783+
757784
/**
758785
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
759786
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
760787
*
788+
* This option is intended for internal use by MongoDB teams and should be discouraged for
789+
* general application use. It may be changed or removed in any release without notice.
790+
*
791+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
792+
* - Marking it as deprecated, experimental, or internal in their language's idioms
793+
* - Excluding it from primary documentation
794+
*
761795
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
762796
*
763797
* @since MongoDB 8.2
@@ -1035,11 +1069,18 @@ class BulkWriteOptions {
10351069
* The value of let will be passed to all update and delete, but not insert, commands.
10361070
*/
10371071
let: Optional<Document>;
1038-
1072+
10391073
/**
10401074
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
10411075
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
10421076
*
1077+
* This option is intended for internal use by MongoDB teams and should be discouraged for
1078+
* general application use. It may be changed or removed in any release without notice.
1079+
*
1080+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
1081+
* - Marking it as deprecated, experimental, or internal in their language's idioms
1082+
* - Excluding it from primary documentation
1083+
*
10431084
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
10441085
*
10451086
* @since MongoDB 8.2
@@ -1067,11 +1108,18 @@ class InsertOneOptions {
10671108
* and providing one will result in a server-side error.
10681109
*/
10691110
comment: Optional<any>;
1070-
1111+
10711112
/**
10721113
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
10731114
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
10741115
*
1116+
* This option is intended for internal use by MongoDB teams and should be discouraged for
1117+
* general application use. It may be changed or removed in any release without notice.
1118+
*
1119+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
1120+
* - Marking it as deprecated, experimental, or internal in their language's idioms
1121+
* - Excluding it from primary documentation
1122+
*
10751123
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
10761124
*
10771125
* @since MongoDB 8.2
@@ -1106,11 +1154,18 @@ class InsertManyOptions {
11061154
* and providing one will result in a server-side error.
11071155
*/
11081156
comment: Optional<any>;
1109-
1157+
11101158
/**
11111159
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
11121160
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
11131161
*
1162+
* This option is intended for internal use by MongoDB teams and should be discouraged for
1163+
* general application use. It may be changed or removed in any release without notice.
1164+
*
1165+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
1166+
* - Marking it as deprecated, experimental, or internal in their language's idioms
1167+
* - Excluding it from primary documentation
1168+
*
11141169
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
11151170
*
11161171
* @since MongoDB 8.2
@@ -1207,11 +1262,18 @@ class UpdateOptions {
12071262
* @see https://www.mongodb.com/docs/manual/reference/command/update/
12081263
*/
12091264
sort: Optional<Document>;
1210-
1265+
12111266
/**
12121267
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
12131268
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
12141269
*
1270+
* This option is intended for internal use by MongoDB teams and should be discouraged for
1271+
* general application use. It may be changed or removed in any release without notice.
1272+
*
1273+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
1274+
* - Marking it as deprecated, experimental, or internal in their language's idioms
1275+
* - Excluding it from primary documentation
1276+
*
12151277
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
12161278
*
12171279
* @since MongoDB 8.2
@@ -1296,11 +1358,18 @@ class ReplaceOptions {
12961358
* @see https://www.mongodb.com/docs/manual/reference/command/update/
12971359
*/
12981360
sort: Optional<Document>;
1299-
1361+
13001362
/**
13011363
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
13021364
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
13031365
*
1366+
* This option is intended for internal use by MongoDB teams and should be discouraged for
1367+
* general application use. It may be changed or removed in any release without notice.
1368+
*
1369+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
1370+
* - Marking it as deprecated, experimental, or internal in their language's idioms
1371+
* - Excluding it from primary documentation
1372+
*
13041373
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
13051374
*
13061375
* @since MongoDB 8.2
@@ -1356,11 +1425,18 @@ class DeleteOptions {
13561425
* and providing one will result in a server-side error.
13571426
*/
13581427
comment: Optional<any>;
1359-
1428+
13601429
/**
13611430
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
13621431
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
13631432
*
1433+
* This option is intended for internal use by MongoDB teams and should be discouraged for
1434+
* general application use. It may be changed or removed in any release without notice.
1435+
*
1436+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
1437+
* - Marking it as deprecated, experimental, or internal in their language's idioms
1438+
* - Excluding it from primary documentation
1439+
*
13641440
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
13651441
*
13661442
* @since MongoDB 8.2
@@ -2119,11 +2195,18 @@ class FindOneAndDeleteOptions {
21192195
* and providing one will result in a server-side error.
21202196
*/
21212197
comment: Optional<any>;
2122-
2198+
21232199
/**
21242200
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
21252201
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
21262202
*
2203+
* This option is intended for internal use by MongoDB teams and should be discouraged for
2204+
* general application use. It may be changed or removed in any release without notice.
2205+
*
2206+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
2207+
* - Marking it as deprecated, experimental, or internal in their language's idioms
2208+
* - Excluding it from primary documentation
2209+
*
21272210
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
21282211
*
21292212
* @since MongoDB 8.2
@@ -2237,11 +2320,18 @@ class FindOneAndReplaceOptions {
22372320
* and providing one will result in a server-side error.
22382321
*/
22392322
comment: Optional<any>;
2240-
2323+
22412324
/**
22422325
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
22432326
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
22442327
*
2328+
* This option is intended for internal use by MongoDB teams and should be discouraged for
2329+
* general application use. It may be changed or removed in any release without notice.
2330+
*
2331+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
2332+
* - Marking it as deprecated, experimental, or internal in their language's idioms
2333+
* - Excluding it from primary documentation
2334+
*
22452335
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
22462336
*
22472337
* @since MongoDB 8.2
@@ -2364,11 +2454,18 @@ class FindOneAndUpdateOptions {
23642454
* and providing one will result in a server-side error.
23652455
*/
23662456
comment: Optional<any>;
2367-
2457+
23682458
/**
23692459
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
23702460
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
23712461
*
2462+
* This option is intended for internal use by MongoDB teams and should be discouraged for
2463+
* general application use. It may be changed or removed in any release without notice.
2464+
*
2465+
* Drivers SHOULD implement this option in a way that discourages customer use, such as:
2466+
* - Marking it as deprecated, experimental, or internal in their language's idioms
2467+
* - Excluding it from primary documentation
2468+
*
23722469
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
23732470
*
23742471
* @since MongoDB 8.2
@@ -2455,15 +2552,15 @@ specifically. An example, using Node, might look like:
24552552
collection.find({ name: 'john doe' }).explain({ maxTimeMS: 1000 });
24562553

24572554
// sends:
2458-
{
2555+
{
24592556
explain: { find: <collection>, query: { name: 'john doe' } },
24602557
maxTimeMS: 1000
24612558
}
24622559

24632560
collection.find({ name: 'john doe' }).explain({ timeoutMS: 1000 });
24642561

24652562
// sends:
2466-
{
2563+
{
24672564
explain: { find: <collection>, query: { name: 'john doe' } },
24682565
maxTimeMS: <1000 - min rtt>
24692566
}
@@ -2652,6 +2749,8 @@ aforementioned allowance in the SemVer spec.
26522749
26532750
## Changelog
26542751
2752+
- 2025-09-09: Clarify that `rawData` is for internal use only.
2753+
26552754
- 2025-06-27: Added `rawData` options.
26562755
26572756
- 2024-11-13: Define `findOne` operation as optional, and add guidance on `limit` and `batchSize` for `find` operations.

0 commit comments

Comments
 (0)