Skip to content

Commit 7bff2f5

Browse files
qingyang-hualcaeus
andauthored
DRIVERS-3064 Add support for the rawData command option (#1814)
Co-authored-by: Andreas Braun <[email protected]>
1 parent 88b5284 commit 7bff2f5

File tree

57 files changed

+5496
-0
lines changed

Some content is hidden

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

57 files changed

+5496
-0
lines changed

source/collection-management/tests/listCollections-rawdata.json

Lines changed: 97 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
description: "listCollections-rawData"
2+
3+
schemaVersion: "1.4"
4+
5+
createEntities:
6+
- client:
7+
id: &client0 client0
8+
observeEvents: [ commandStartedEvent ]
9+
- database:
10+
id: &database0 database0
11+
client: *client0
12+
databaseName: &database0Name database0
13+
14+
tests:
15+
- description: "listCollections with rawData option"
16+
runOnRequirements:
17+
- minServerVersion: "8.2.0"
18+
auth: false
19+
operations:
20+
- name: listCollections
21+
object: *database0
22+
arguments:
23+
rawData: &rawdata true
24+
expectEvents:
25+
- client: *client0
26+
events:
27+
- commandStartedEvent:
28+
command:
29+
listCollections: 1
30+
filter: { $$unsetOrMatches: {} }
31+
rawData: *rawdata
32+
- description: "listCollections with rawData option on less than 8.2.0 - ignore argument"
33+
runOnRequirements:
34+
- maxServerVersion: "8.1.99"
35+
auth: false
36+
operations:
37+
- name: listCollections
38+
object: *database0
39+
arguments:
40+
rawData: true
41+
expectEvents:
42+
- client: *client0
43+
events:
44+
- commandStartedEvent:
45+
command:
46+
listCollections: 1
47+
filter: { $$unsetOrMatches: {} }
48+
rawData:
49+
$$exists: false

source/crud/bulk-write.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,16 @@ class BulkWriteOptions {
309309
*/
310310
comment: Optional<BSON value>;
311311

312+
/**
313+
* This option MAY be implemented by drivers that need to grant access to underlying namespaces
314+
* for time-series collections. Drivers SHOULD NOT implement this option unless asked to do so.
315+
*
316+
* @note This option MUST NOT be sent when connected to pre-8.2 servers.
317+
*
318+
* @since MongoDB 8.2
319+
*/
320+
rawData: Optional<Boolean>;
321+
312322
/**
313323
* Whether detailed results for each successful operation should be included in the returned
314324
* BulkWriteResult.
@@ -538,6 +548,7 @@ The `bulkWrite` server command has the following format:
538548
"bypassDocumentValidation": Optional<Boolean>,
539549
"comment": Optional<BSON value>,
540550
"let": Optional<Document>,
551+
"rawData": Optional<Boolean>,
541552
...additional operation-agnostic fields
542553
}
543554
```
@@ -917,6 +928,8 @@ error in this specific situation does not seem helpful enough to require size ch
917928

918929
## **Changelog**
919930

931+
- 2025-06-27: Added `rawData` option.
932+
920933
- 2024-11-05: Updated the requirements regarding the size validation.
921934

922935
- 2024-10-07: Error if `w:0` is used with `ordered=true` or `verboseResults=true`.

0 commit comments

Comments
 (0)