mongodb 6.9.0-dev.20240917.sha.20396e1b → 6.9.0-dev.20240926.sha.3d3da407
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/beta.d.ts +247 -1
- package/lib/cmap/command_monitoring_events.js +10 -1
- package/lib/cmap/command_monitoring_events.js.map +1 -1
- package/lib/cmap/commands.js +7 -5
- package/lib/cmap/commands.js.map +1 -1
- package/lib/cmap/connection.js +6 -2
- package/lib/cmap/connection.js.map +1 -1
- package/lib/cmap/wire_protocol/responses.js +23 -1
- package/lib/cmap/wire_protocol/responses.js.map +1 -1
- package/lib/cursor/client_bulk_write_cursor.js +50 -0
- package/lib/cursor/client_bulk_write_cursor.js.map +1 -0
- package/lib/error.js +27 -1
- package/lib/error.js.map +1 -1
- package/lib/index.js +4 -3
- package/lib/index.js.map +1 -1
- package/lib/mongo_client.js +10 -0
- package/lib/mongo_client.js.map +1 -1
- package/lib/operations/client_bulk_write/client_bulk_write.js +35 -0
- package/lib/operations/client_bulk_write/client_bulk_write.js.map +1 -0
- package/lib/operations/client_bulk_write/command_builder.js +20 -6
- package/lib/operations/client_bulk_write/command_builder.js.map +1 -1
- package/lib/operations/client_bulk_write/executor.js +71 -0
- package/lib/operations/client_bulk_write/executor.js.map +1 -0
- package/lib/operations/client_bulk_write/results_merger.js +79 -0
- package/lib/operations/client_bulk_write/results_merger.js.map +1 -0
- package/lib/write_concern.js.map +1 -1
- package/mongodb.d.ts +247 -1
- package/package.json +1 -1
- package/src/cmap/command_monitoring_events.ts +16 -2
- package/src/cmap/commands.ts +22 -12
- package/src/cmap/connection.ts +6 -2
- package/src/cmap/wire_protocol/responses.ts +26 -0
- package/src/cursor/client_bulk_write_cursor.ts +73 -0
- package/src/error.ts +27 -0
- package/src/index.ts +16 -0
- package/src/mongo_client.ts +19 -0
- package/src/operations/client_bulk_write/client_bulk_write.ts +45 -0
- package/src/operations/client_bulk_write/command_builder.ts +35 -6
- package/src/operations/client_bulk_write/common.ts +79 -0
- package/src/operations/client_bulk_write/executor.ts +99 -0
- package/src/operations/client_bulk_write/results_merger.ts +95 -0
- package/src/write_concern.ts +4 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClientBulkWriteResultsMerger = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Merges client bulk write cursor responses together into a single result.
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
class ClientBulkWriteResultsMerger {
|
|
9
|
+
/**
|
|
10
|
+
* Instantiate the merger.
|
|
11
|
+
* @param options - The options.
|
|
12
|
+
*/
|
|
13
|
+
constructor(options) {
|
|
14
|
+
this.options = options;
|
|
15
|
+
this.result = {
|
|
16
|
+
insertedCount: 0,
|
|
17
|
+
upsertedCount: 0,
|
|
18
|
+
matchedCount: 0,
|
|
19
|
+
modifiedCount: 0,
|
|
20
|
+
deletedCount: 0,
|
|
21
|
+
insertResults: undefined,
|
|
22
|
+
updateResults: undefined,
|
|
23
|
+
deleteResults: undefined
|
|
24
|
+
};
|
|
25
|
+
if (options.verboseResults) {
|
|
26
|
+
this.result.insertResults = new Map();
|
|
27
|
+
this.result.updateResults = new Map();
|
|
28
|
+
this.result.deleteResults = new Map();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Merge the results in the cursor to the existing result.
|
|
33
|
+
* @param response - The cursor response.
|
|
34
|
+
* @param documents - The documents in the cursor.
|
|
35
|
+
* @returns The current result.
|
|
36
|
+
*/
|
|
37
|
+
merge(operations, response, documents) {
|
|
38
|
+
// Update the counts from the cursor response.
|
|
39
|
+
this.result.insertedCount += response.insertedCount;
|
|
40
|
+
this.result.upsertedCount += response.upsertedCount;
|
|
41
|
+
this.result.matchedCount += response.matchedCount;
|
|
42
|
+
this.result.modifiedCount += response.modifiedCount;
|
|
43
|
+
this.result.deletedCount += response.deletedCount;
|
|
44
|
+
if (this.options.verboseResults) {
|
|
45
|
+
// Iterate all the documents in the cursor and update the result.
|
|
46
|
+
for (const document of documents) {
|
|
47
|
+
// Only add to maps if ok: 1
|
|
48
|
+
if (document.ok === 1) {
|
|
49
|
+
// Get the corresponding operation from the command.
|
|
50
|
+
const operation = operations[document.idx];
|
|
51
|
+
// Handle insert results.
|
|
52
|
+
if ('insert' in operation) {
|
|
53
|
+
this.result.insertResults?.set(document.idx, { insertedId: operation.document._id });
|
|
54
|
+
}
|
|
55
|
+
// Handle update results.
|
|
56
|
+
if ('update' in operation) {
|
|
57
|
+
const result = {
|
|
58
|
+
matchedCount: document.n,
|
|
59
|
+
modifiedCount: document.nModified ?? 0,
|
|
60
|
+
// Check if the bulk did actually upsert.
|
|
61
|
+
didUpsert: document.upserted != null
|
|
62
|
+
};
|
|
63
|
+
if (document.upserted) {
|
|
64
|
+
result.upsertedId = document.upserted._id;
|
|
65
|
+
}
|
|
66
|
+
this.result.updateResults?.set(document.idx, result);
|
|
67
|
+
}
|
|
68
|
+
// Handle delete results.
|
|
69
|
+
if ('delete' in operation) {
|
|
70
|
+
this.result.deleteResults?.set(document.idx, { deletedCount: document.n });
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return this.result;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.ClientBulkWriteResultsMerger = ClientBulkWriteResultsMerger;
|
|
79
|
+
//# sourceMappingURL=results_merger.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"results_merger.js","sourceRoot":"","sources":["../../../src/operations/client_bulk_write/results_merger.ts"],"names":[],"mappings":";;;AAUA;;;GAGG;AACH,MAAa,4BAA4B;IAIvC;;;OAGG;IACH,YAAY,OAA+B;QACzC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,MAAM,GAAG;YACZ,aAAa,EAAE,CAAC;YAChB,aAAa,EAA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AG,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,UAAU,EAAE,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC;oBACvF,CAAC;oBACD,yBAAyB;oBACzB,IAAI,QAAQ,IAAI,SAAS,EAAE,CAAC;wBAC1B,MAAM,MAAM,GAAuB;4BACjC,YAAY,EAAE,QAAQ,CAAC,CAAC;4BACxB,aAAa,EAAE,QAAQ,CAAC,SAAS,IAAI,CAAC;4BACtC,yCAAyC;4BACzC,SAAS,EAAE,QAAQ,CAAC,QAAQ,IAAI,IAAI;yBACrC,CAAC;wBACF,IAAI,QAAQ,CAAC,QAAQ,EAAE,CAAC;4BACtB,MAAM,CAAC,UAAU,GAAG,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC;wBAC5C,CAAC;wBACD,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;oBACvD,CAAC;oBACD,yBAAyB;oBACzB,IAAI,QAAQ,IAAI,SAAS,EAAE,CAAC;wBAC1B,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;oBAC7E,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF;AAhFD,oEAgFC"}
|
package/lib/write_concern.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"write_concern.js","sourceRoot":"","sources":["../src/write_concern.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"write_concern.js","sourceRoot":"","sources":["../src/write_concern.ts"],"names":[],"mappings":";;;AAwKA,4DAaC;AApLD,8DAAiE;AACjE,mCAAiD;AAsCpC,QAAA,kBAAkB,GAAG,CAAC,GAAG,EAAE,UAAU,EAAE,G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GD,oCA0GC;AAED,2DAA2D;AAC3D,SAAgB,wBAAwB,CAAC,QAAiB;IACxD,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,IAAI,IAAI,EAAE,CAAC;QACrD,MAAM,iBAAiB,GACrB,2BAAe,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,GAAG,CAAC,mBAAmB,CAAC;YAC/D,CAAC,CAAC,QAAQ,CAAC,QAAQ,EAAE;YACrB,CAAC,CAAC,CAAC,2BAAe,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,mBAAmB,IAAI,QAAQ;gBAChE,CAAC,CAAC,QAAQ;gBACV,CAAC,CAAC,IAAI,CAAC;QAEb,IAAI,iBAAiB,IAAI,IAAI,EAAE,CAAC;YAC9B,MAAM,IAAI,8BAAsB,CAAC,iBAAwB,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/mongodb.d.ts
CHANGED
|
@@ -514,6 +514,13 @@ export declare type AnyBulkWriteOperation<TSchema extends Document = Document> =
|
|
|
514
514
|
deleteMany: DeleteManyModel<TSchema>;
|
|
515
515
|
};
|
|
516
516
|
|
|
517
|
+
/**
|
|
518
|
+
* Used to represent any of the client bulk write models that can be passed as an array
|
|
519
|
+
* to MongoClient#bulkWrite.
|
|
520
|
+
* @public
|
|
521
|
+
*/
|
|
522
|
+
export declare type AnyClientBulkWriteModel = ClientInsertOneModel | ClientReplaceOneModel | ClientUpdateOneModel | ClientUpdateManyModel | ClientDeleteOneModel | ClientDeleteManyModel;
|
|
523
|
+
|
|
517
524
|
/** @public */
|
|
518
525
|
export declare type AnyError = MongoError | Error;
|
|
519
526
|
|
|
@@ -1480,6 +1487,100 @@ export declare interface ChangeStreamUpdateDocument<TSchema extends Document = D
|
|
|
1480
1487
|
fullDocumentBeforeChange?: TSchema;
|
|
1481
1488
|
}
|
|
1482
1489
|
|
|
1490
|
+
/** @public */
|
|
1491
|
+
export declare interface ClientBulkWriteOptions extends CommandOperationOptions {
|
|
1492
|
+
/**
|
|
1493
|
+
* If true, when an insert fails, don't execute the remaining writes.
|
|
1494
|
+
* If false, continue with remaining inserts when one fails.
|
|
1495
|
+
* @defaultValue `true` - inserts are ordered by default
|
|
1496
|
+
*/
|
|
1497
|
+
ordered?: boolean;
|
|
1498
|
+
/**
|
|
1499
|
+
* Allow driver to bypass schema validation.
|
|
1500
|
+
* @defaultValue `false` - documents will be validated by default
|
|
1501
|
+
**/
|
|
1502
|
+
bypassDocumentValidation?: boolean;
|
|
1503
|
+
/** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */
|
|
1504
|
+
let?: Document;
|
|
1505
|
+
/**
|
|
1506
|
+
* Whether detailed results for each successful operation should be included in the returned
|
|
1507
|
+
* BulkWriteResult.
|
|
1508
|
+
*/
|
|
1509
|
+
verboseResults?: boolean;
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
/** @public */
|
|
1513
|
+
export declare interface ClientBulkWriteResult {
|
|
1514
|
+
/**
|
|
1515
|
+
* The total number of documents inserted across all insert operations.
|
|
1516
|
+
*/
|
|
1517
|
+
insertedCount: number;
|
|
1518
|
+
/**
|
|
1519
|
+
* The total number of documents upserted across all update operations.
|
|
1520
|
+
*/
|
|
1521
|
+
upsertedCount: number;
|
|
1522
|
+
/**
|
|
1523
|
+
* The total number of documents matched across all update operations.
|
|
1524
|
+
*/
|
|
1525
|
+
matchedCount: number;
|
|
1526
|
+
/**
|
|
1527
|
+
* The total number of documents modified across all update operations.
|
|
1528
|
+
*/
|
|
1529
|
+
modifiedCount: number;
|
|
1530
|
+
/**
|
|
1531
|
+
* The total number of documents deleted across all delete operations.
|
|
1532
|
+
*/
|
|
1533
|
+
deletedCount: number;
|
|
1534
|
+
/**
|
|
1535
|
+
* The results of each individual insert operation that was successfully performed.
|
|
1536
|
+
*/
|
|
1537
|
+
insertResults?: Map<number, ClientInsertOneResult>;
|
|
1538
|
+
/**
|
|
1539
|
+
* The results of each individual update operation that was successfully performed.
|
|
1540
|
+
*/
|
|
1541
|
+
updateResults?: Map<number, ClientUpdateResult>;
|
|
1542
|
+
/**
|
|
1543
|
+
* The results of each individual delete operation that was successfully performed.
|
|
1544
|
+
*/
|
|
1545
|
+
deleteResults?: Map<number, ClientDeleteResult>;
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
/** @public */
|
|
1549
|
+
export declare interface ClientDeleteManyModel extends ClientWriteModel {
|
|
1550
|
+
name: 'deleteMany';
|
|
1551
|
+
/**
|
|
1552
|
+
* The filter used to determine if a document should be deleted.
|
|
1553
|
+
* For a deleteMany operation, all matches are removed.
|
|
1554
|
+
*/
|
|
1555
|
+
filter: Filter<Document>;
|
|
1556
|
+
/** Specifies a collation. */
|
|
1557
|
+
collation?: CollationOptions;
|
|
1558
|
+
/** The index to use. If specified, then the query system will only consider plans using the hinted index. */
|
|
1559
|
+
hint?: Hint;
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
/** @public */
|
|
1563
|
+
export declare interface ClientDeleteOneModel extends ClientWriteModel {
|
|
1564
|
+
name: 'deleteOne';
|
|
1565
|
+
/**
|
|
1566
|
+
* The filter used to determine if a document should be deleted.
|
|
1567
|
+
* For a deleteOne operation, the first match is removed.
|
|
1568
|
+
*/
|
|
1569
|
+
filter: Filter<Document>;
|
|
1570
|
+
/** Specifies a collation. */
|
|
1571
|
+
collation?: CollationOptions;
|
|
1572
|
+
/** The index to use. If specified, then the query system will only consider plans using the hinted index. */
|
|
1573
|
+
hint?: Hint;
|
|
1574
|
+
}
|
|
1575
|
+
|
|
1576
|
+
/** @public */
|
|
1577
|
+
export declare interface ClientDeleteResult {
|
|
1578
|
+
/**
|
|
1579
|
+
* The number of documents that were deleted.
|
|
1580
|
+
*/
|
|
1581
|
+
deletedCount: number;
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1483
1584
|
/**
|
|
1484
1585
|
* @public
|
|
1485
1586
|
* The public interface for explicit in-use encryption
|
|
@@ -1901,6 +2002,21 @@ export declare type ClientEncryptionSocketOptions = Pick<MongoClientOptions, 'au
|
|
|
1901
2002
|
*/
|
|
1902
2003
|
export declare type ClientEncryptionTlsOptions = Pick<MongoClientOptions, 'tlsCAFile' | 'tlsCertificateKeyFile' | 'tlsCertificateKeyFilePassword'>;
|
|
1903
2004
|
|
|
2005
|
+
/** @public */
|
|
2006
|
+
export declare interface ClientInsertOneModel extends ClientWriteModel {
|
|
2007
|
+
name: 'insertOne';
|
|
2008
|
+
/** The document to insert. */
|
|
2009
|
+
document: OptionalId<Document>;
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
/** @public */
|
|
2013
|
+
export declare interface ClientInsertOneResult {
|
|
2014
|
+
/**
|
|
2015
|
+
* The _id of the inserted document.
|
|
2016
|
+
*/
|
|
2017
|
+
insertedId: any;
|
|
2018
|
+
}
|
|
2019
|
+
|
|
1904
2020
|
/**
|
|
1905
2021
|
* @public
|
|
1906
2022
|
* @see https://github.com/mongodb/specifications/blob/master/source/mongodb-handshake/handshake.rst#hello-command
|
|
@@ -1940,6 +2056,24 @@ export declare interface ClientMetadataOptions {
|
|
|
1940
2056
|
appName?: string;
|
|
1941
2057
|
}
|
|
1942
2058
|
|
|
2059
|
+
/** @public */
|
|
2060
|
+
export declare interface ClientReplaceOneModel extends ClientWriteModel {
|
|
2061
|
+
name: 'replaceOne';
|
|
2062
|
+
/**
|
|
2063
|
+
* The filter used to determine if a document should be replaced.
|
|
2064
|
+
* For a replaceOne operation, the first match is replaced.
|
|
2065
|
+
*/
|
|
2066
|
+
filter: Filter<Document>;
|
|
2067
|
+
/** The document with which to replace the matched document. */
|
|
2068
|
+
replacement: WithoutId<Document>;
|
|
2069
|
+
/** Specifies a collation. */
|
|
2070
|
+
collation?: CollationOptions;
|
|
2071
|
+
/** The index to use. If specified, then the query system will only consider plans using the hinted index. */
|
|
2072
|
+
hint?: Hint;
|
|
2073
|
+
/** When true, creates a new document if no document matches the query. */
|
|
2074
|
+
upsert?: boolean;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
1943
2077
|
/**
|
|
1944
2078
|
* A class representing a client session on the server
|
|
1945
2079
|
*
|
|
@@ -2094,6 +2228,84 @@ export declare interface ClientSessionOptions {
|
|
|
2094
2228
|
/* Excluded from this release type: initialClusterTime */
|
|
2095
2229
|
}
|
|
2096
2230
|
|
|
2231
|
+
/** @public */
|
|
2232
|
+
export declare interface ClientUpdateManyModel extends ClientWriteModel {
|
|
2233
|
+
name: 'updateMany';
|
|
2234
|
+
/**
|
|
2235
|
+
* The filter used to determine if a document should be updated.
|
|
2236
|
+
* For an updateMany operation, all matches are updated.
|
|
2237
|
+
*/
|
|
2238
|
+
filter: Filter<Document>;
|
|
2239
|
+
/**
|
|
2240
|
+
* The modifications to apply. The value can be either:
|
|
2241
|
+
* UpdateFilter<Document> - A document that contains update operator expressions,
|
|
2242
|
+
* Document[] - an aggregation pipeline.
|
|
2243
|
+
*/
|
|
2244
|
+
update: UpdateFilter<Document> | Document[];
|
|
2245
|
+
/** A set of filters specifying to which array elements an update should apply. */
|
|
2246
|
+
arrayFilters?: Document[];
|
|
2247
|
+
/** Specifies a collation. */
|
|
2248
|
+
collation?: CollationOptions;
|
|
2249
|
+
/** The index to use. If specified, then the query system will only consider plans using the hinted index. */
|
|
2250
|
+
hint?: Hint;
|
|
2251
|
+
/** When true, creates a new document if no document matches the query. */
|
|
2252
|
+
upsert?: boolean;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
/** @public */
|
|
2256
|
+
export declare interface ClientUpdateOneModel extends ClientWriteModel {
|
|
2257
|
+
name: 'updateOne';
|
|
2258
|
+
/**
|
|
2259
|
+
* The filter used to determine if a document should be updated.
|
|
2260
|
+
* For an updateOne operation, the first match is updated.
|
|
2261
|
+
*/
|
|
2262
|
+
filter: Filter<Document>;
|
|
2263
|
+
/**
|
|
2264
|
+
* The modifications to apply. The value can be either:
|
|
2265
|
+
* UpdateFilter<Document> - A document that contains update operator expressions,
|
|
2266
|
+
* Document[] - an aggregation pipeline.
|
|
2267
|
+
*/
|
|
2268
|
+
update: UpdateFilter<Document> | Document[];
|
|
2269
|
+
/** A set of filters specifying to which array elements an update should apply. */
|
|
2270
|
+
arrayFilters?: Document[];
|
|
2271
|
+
/** Specifies a collation. */
|
|
2272
|
+
collation?: CollationOptions;
|
|
2273
|
+
/** The index to use. If specified, then the query system will only consider plans using the hinted index. */
|
|
2274
|
+
hint?: Hint;
|
|
2275
|
+
/** When true, creates a new document if no document matches the query. */
|
|
2276
|
+
upsert?: boolean;
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
/** @public */
|
|
2280
|
+
export declare interface ClientUpdateResult {
|
|
2281
|
+
/**
|
|
2282
|
+
* The number of documents that matched the filter.
|
|
2283
|
+
*/
|
|
2284
|
+
matchedCount: number;
|
|
2285
|
+
/**
|
|
2286
|
+
* The number of documents that were modified.
|
|
2287
|
+
*/
|
|
2288
|
+
modifiedCount: number;
|
|
2289
|
+
/**
|
|
2290
|
+
* The _id field of the upserted document if an upsert occurred.
|
|
2291
|
+
*
|
|
2292
|
+
* It MUST be possible to discern between a BSON Null upserted ID value and this field being
|
|
2293
|
+
* unset. If necessary, drivers MAY add a didUpsert boolean field to differentiate between
|
|
2294
|
+
* these two cases.
|
|
2295
|
+
*/
|
|
2296
|
+
upsertedId?: any;
|
|
2297
|
+
/**
|
|
2298
|
+
* Determines if the upsert did include an _id, which includes the case of the _id being null.
|
|
2299
|
+
*/
|
|
2300
|
+
didUpsert: boolean;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
/** @public */
|
|
2304
|
+
export declare interface ClientWriteModel {
|
|
2305
|
+
/** The namespace for the write. */
|
|
2306
|
+
namespace: string;
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2097
2309
|
/**
|
|
2098
2310
|
* @public
|
|
2099
2311
|
* @deprecated This interface is deprecated and will be removed in a future release as it is not used
|
|
@@ -4894,6 +5106,28 @@ export declare class MongoBatchReExecutionError extends MongoAPIError {
|
|
|
4894
5106
|
get name(): string;
|
|
4895
5107
|
}
|
|
4896
5108
|
|
|
5109
|
+
/**
|
|
5110
|
+
* An error indicating that an error occurred when processing bulk write results.
|
|
5111
|
+
*
|
|
5112
|
+
* @public
|
|
5113
|
+
* @category Error
|
|
5114
|
+
*/
|
|
5115
|
+
export declare class MongoBulkWriteCursorError extends MongoRuntimeError {
|
|
5116
|
+
/**
|
|
5117
|
+
* **Do not use this constructor!**
|
|
5118
|
+
*
|
|
5119
|
+
* Meant for internal use only.
|
|
5120
|
+
*
|
|
5121
|
+
* @remarks
|
|
5122
|
+
* This class is only meant to be constructed within the driver. This constructor is
|
|
5123
|
+
* not subject to semantic versioning compatibility guarantees and may change at any time.
|
|
5124
|
+
*
|
|
5125
|
+
* @public
|
|
5126
|
+
**/
|
|
5127
|
+
constructor(message: string);
|
|
5128
|
+
get name(): string;
|
|
5129
|
+
}
|
|
5130
|
+
|
|
4897
5131
|
/**
|
|
4898
5132
|
* An error indicating an unsuccessful Bulk Write
|
|
4899
5133
|
* @public
|
|
@@ -5001,6 +5235,15 @@ export declare class MongoClient extends TypedEventEmitter<MongoClientEvents> im
|
|
|
5001
5235
|
get writeConcern(): WriteConcern | undefined;
|
|
5002
5236
|
get readPreference(): ReadPreference;
|
|
5003
5237
|
get bsonOptions(): BSONSerializeOptions;
|
|
5238
|
+
/**
|
|
5239
|
+
* Executes a client bulk write operation, available on server 8.0+.
|
|
5240
|
+
* @param models - The client bulk write models.
|
|
5241
|
+
* @param options - The client bulk write options.
|
|
5242
|
+
* @returns A ClientBulkWriteResult for acknowledged writes and ok: 1 for unacknowledged writes.
|
|
5243
|
+
*/
|
|
5244
|
+
bulkWrite(models: AnyClientBulkWriteModel[], options?: ClientBulkWriteOptions): Promise<ClientBulkWriteResult | {
|
|
5245
|
+
ok: 1;
|
|
5246
|
+
}>;
|
|
5004
5247
|
/**
|
|
5005
5248
|
* Connect to MongoDB using a url
|
|
5006
5249
|
*
|
|
@@ -7751,7 +7994,10 @@ export declare type WithTransactionCallback<T = any> = (session: ClientSession)
|
|
|
7751
7994
|
* @see https://www.mongodb.com/docs/manual/reference/write-concern/
|
|
7752
7995
|
*/
|
|
7753
7996
|
export declare class WriteConcern {
|
|
7754
|
-
/**
|
|
7997
|
+
/**
|
|
7998
|
+
* Request acknowledgment that the write operation has propagated to a specified number of mongod instances or to mongod instances with specified tags.
|
|
7999
|
+
* If w is 0 and is set on a write operation, the server will not send a response.
|
|
8000
|
+
*/
|
|
7755
8001
|
readonly w?: W;
|
|
7756
8002
|
/** Request acknowledgment that the write operation has been written to the on-disk journal */
|
|
7757
8003
|
readonly journal?: boolean;
|
package/package.json
CHANGED
|
@@ -7,7 +7,12 @@ import {
|
|
|
7
7
|
LEGACY_HELLO_COMMAND_CAMEL_CASE
|
|
8
8
|
} from '../constants';
|
|
9
9
|
import { calculateDurationInMs, deepCopy } from '../utils';
|
|
10
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
DocumentSequence,
|
|
12
|
+
OpMsgRequest,
|
|
13
|
+
type OpQueryRequest,
|
|
14
|
+
type WriteProtocolMessageType
|
|
15
|
+
} from './commands';
|
|
11
16
|
import type { Connection } from './connection';
|
|
12
17
|
|
|
13
18
|
/**
|
|
@@ -249,7 +254,16 @@ const OP_QUERY_KEYS = [
|
|
|
249
254
|
/** Extract the actual command from the query, possibly up-converting if it's a legacy format */
|
|
250
255
|
function extractCommand(command: WriteProtocolMessageType): Document {
|
|
251
256
|
if (command instanceof OpMsgRequest) {
|
|
252
|
-
|
|
257
|
+
const cmd = deepCopy(command.command);
|
|
258
|
+
// For OP_MSG with payload type 1 we need to pull the documents
|
|
259
|
+
// array out of the document sequence for monitoring.
|
|
260
|
+
if (cmd.ops instanceof DocumentSequence) {
|
|
261
|
+
cmd.ops = cmd.ops.documents;
|
|
262
|
+
}
|
|
263
|
+
if (cmd.nsInfo instanceof DocumentSequence) {
|
|
264
|
+
cmd.nsInfo = cmd.nsInfo.documents;
|
|
265
|
+
}
|
|
266
|
+
return cmd;
|
|
253
267
|
}
|
|
254
268
|
|
|
255
269
|
if (command.query?.$query) {
|
package/src/cmap/commands.ts
CHANGED
|
@@ -74,6 +74,8 @@ export class OpQueryRequest {
|
|
|
74
74
|
awaitData: boolean;
|
|
75
75
|
exhaust: boolean;
|
|
76
76
|
partial: boolean;
|
|
77
|
+
/** moreToCome is an OP_MSG only concept */
|
|
78
|
+
moreToCome = false;
|
|
77
79
|
|
|
78
80
|
constructor(
|
|
79
81
|
public databaseName: string,
|
|
@@ -407,13 +409,21 @@ const OPTS_EXHAUST_ALLOWED = 1 << 16;
|
|
|
407
409
|
|
|
408
410
|
/** @internal */
|
|
409
411
|
export interface OpMsgOptions {
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
412
|
+
socketTimeoutMS?: number;
|
|
413
|
+
session?: ClientSession;
|
|
414
|
+
numberToSkip?: number;
|
|
415
|
+
numberToReturn?: number;
|
|
416
|
+
returnFieldSelector?: Document;
|
|
417
|
+
pre32Limit?: number;
|
|
418
|
+
serializeFunctions?: boolean;
|
|
419
|
+
ignoreUndefined?: boolean;
|
|
420
|
+
maxBsonSize?: number;
|
|
421
|
+
checkKeys?: boolean;
|
|
422
|
+
secondaryOk?: boolean;
|
|
423
|
+
|
|
424
|
+
requestId?: number;
|
|
425
|
+
moreToCome?: boolean;
|
|
426
|
+
exhaustAllowed?: boolean;
|
|
417
427
|
readPreference: ReadPreference;
|
|
418
428
|
}
|
|
419
429
|
|
|
@@ -465,7 +475,7 @@ export class OpMsgRequest {
|
|
|
465
475
|
|
|
466
476
|
// flags
|
|
467
477
|
this.checksumPresent = false;
|
|
468
|
-
this.moreToCome = options.moreToCome
|
|
478
|
+
this.moreToCome = options.moreToCome ?? command.writeConcern?.w === 0;
|
|
469
479
|
this.exhaustAllowed =
|
|
470
480
|
typeof options.exhaustAllowed === 'boolean' ? options.exhaustAllowed : false;
|
|
471
481
|
}
|
|
@@ -534,10 +544,10 @@ export class OpMsgRequest {
|
|
|
534
544
|
for (const [key, value] of Object.entries(document)) {
|
|
535
545
|
if (value instanceof DocumentSequence) {
|
|
536
546
|
// Document sequences starts with type 1 at the first byte.
|
|
537
|
-
const buffer = Buffer.allocUnsafe(1 + 4 + key.length);
|
|
547
|
+
const buffer = Buffer.allocUnsafe(1 + 4 + key.length + 1);
|
|
538
548
|
buffer[0] = 1;
|
|
539
|
-
// Third part is the field name at offset 5.
|
|
540
|
-
encodeUTF8Into(buffer, key
|
|
549
|
+
// Third part is the field name at offset 5 with trailing null byte.
|
|
550
|
+
encodeUTF8Into(buffer, `${key}\0`, 5);
|
|
541
551
|
chunks.push(buffer);
|
|
542
552
|
// Fourth part are the documents' bytes.
|
|
543
553
|
let docsLength = 0;
|
|
@@ -547,7 +557,7 @@ export class OpMsgRequest {
|
|
|
547
557
|
chunks.push(docBson);
|
|
548
558
|
}
|
|
549
559
|
// Second part of the sequence is the length at offset 1;
|
|
550
|
-
buffer.writeInt32LE(key.length + docsLength, 1);
|
|
560
|
+
buffer.writeInt32LE(4 + key.length + 1 + docsLength, 1);
|
|
551
561
|
// Why are we removing the field from the command? This is because it needs to be
|
|
552
562
|
// removed in the OP_MSG request first section, and DocumentSequence is not a
|
|
553
563
|
// BSON type and is specific to the MongoDB wire protocol so there's nothing
|
package/src/cmap/connection.ts
CHANGED
|
@@ -439,7 +439,7 @@ export class Connection extends TypedEventEmitter<ConnectionEvents> {
|
|
|
439
439
|
zlibCompressionLevel: this.description.zlibCompressionLevel
|
|
440
440
|
});
|
|
441
441
|
|
|
442
|
-
if (options.noResponse) {
|
|
442
|
+
if (options.noResponse || message.moreToCome) {
|
|
443
443
|
yield MongoDBResponse.empty;
|
|
444
444
|
return;
|
|
445
445
|
}
|
|
@@ -527,7 +527,11 @@ export class Connection extends TypedEventEmitter<ConnectionEvents> {
|
|
|
527
527
|
new CommandSucceededEvent(
|
|
528
528
|
this,
|
|
529
529
|
message,
|
|
530
|
-
options.noResponse
|
|
530
|
+
options.noResponse
|
|
531
|
+
? undefined
|
|
532
|
+
: message.moreToCome
|
|
533
|
+
? { ok: 1 }
|
|
534
|
+
: (object ??= document.toObject(bsonOptions)),
|
|
531
535
|
started,
|
|
532
536
|
this.description.serverConnectionId
|
|
533
537
|
)
|
|
@@ -329,3 +329,29 @@ export class ExplainedCursorResponse extends CursorResponse {
|
|
|
329
329
|
return this.toObject(options);
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Client bulk writes have some extra metadata at the top level that needs to be
|
|
335
|
+
* included in the result returned to the user.
|
|
336
|
+
*/
|
|
337
|
+
export class ClientBulkWriteCursorResponse extends CursorResponse {
|
|
338
|
+
get insertedCount() {
|
|
339
|
+
return this.get('nInserted', BSONType.int, true);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
get upsertedCount() {
|
|
343
|
+
return this.get('nUpserted', BSONType.int, true);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
get matchedCount() {
|
|
347
|
+
return this.get('nMatched', BSONType.int, true);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
get modifiedCount() {
|
|
351
|
+
return this.get('nModified', BSONType.int, true);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
get deletedCount() {
|
|
355
|
+
return this.get('nDeleted', BSONType.int, true);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Document } from '../bson';
|
|
2
|
+
import { type ClientBulkWriteCursorResponse } from '../cmap/wire_protocol/responses';
|
|
3
|
+
import { MongoBulkWriteCursorError } from '../error';
|
|
4
|
+
import type { MongoClient } from '../mongo_client';
|
|
5
|
+
import { ClientBulkWriteOperation } from '../operations/client_bulk_write/client_bulk_write';
|
|
6
|
+
import { type ClientBulkWriteOptions } from '../operations/client_bulk_write/common';
|
|
7
|
+
import { executeOperation } from '../operations/execute_operation';
|
|
8
|
+
import type { ClientSession } from '../sessions';
|
|
9
|
+
import { mergeOptions, MongoDBNamespace } from '../utils';
|
|
10
|
+
import {
|
|
11
|
+
AbstractCursor,
|
|
12
|
+
type AbstractCursorOptions,
|
|
13
|
+
type InitialCursorResponse
|
|
14
|
+
} from './abstract_cursor';
|
|
15
|
+
|
|
16
|
+
/** @public */
|
|
17
|
+
export interface ClientBulkWriteCursorOptions
|
|
18
|
+
extends Omit<AbstractCursorOptions, 'maxAwaitTimeMS' | 'tailable' | 'awaitData'>,
|
|
19
|
+
ClientBulkWriteOptions {}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* This is the cursor that handles client bulk write operations. Note this is never
|
|
23
|
+
* exposed directly to the user and is always immediately exhausted.
|
|
24
|
+
* @internal
|
|
25
|
+
*/
|
|
26
|
+
export class ClientBulkWriteCursor extends AbstractCursor {
|
|
27
|
+
public readonly command: Document;
|
|
28
|
+
/** @internal */
|
|
29
|
+
private cursorResponse?: ClientBulkWriteCursorResponse;
|
|
30
|
+
/** @internal */
|
|
31
|
+
private clientBulkWriteOptions: ClientBulkWriteOptions;
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
constructor(client: MongoClient, command: Document, options: ClientBulkWriteOptions = {}) {
|
|
35
|
+
super(client, new MongoDBNamespace('admin', '$cmd'), options);
|
|
36
|
+
|
|
37
|
+
this.command = command;
|
|
38
|
+
this.clientBulkWriteOptions = options;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* We need a way to get the top level cursor response fields for
|
|
43
|
+
* generating the bulk write result, so we expose this here.
|
|
44
|
+
*/
|
|
45
|
+
get response(): ClientBulkWriteCursorResponse {
|
|
46
|
+
if (this.cursorResponse) return this.cursorResponse;
|
|
47
|
+
throw new MongoBulkWriteCursorError(
|
|
48
|
+
'No client bulk write cursor response returned from the server.'
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
clone(): ClientBulkWriteCursor {
|
|
53
|
+
const clonedOptions = mergeOptions({}, this.clientBulkWriteOptions);
|
|
54
|
+
delete clonedOptions.session;
|
|
55
|
+
return new ClientBulkWriteCursor(this.client, this.command, {
|
|
56
|
+
...clonedOptions
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
async _initialize(session: ClientSession): Promise<InitialCursorResponse> {
|
|
62
|
+
const clientBulkWriteOperation = new ClientBulkWriteOperation(this.command, {
|
|
63
|
+
...this.clientBulkWriteOptions,
|
|
64
|
+
...this.cursorOptions,
|
|
65
|
+
session
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const response = await executeOperation(this.client, clientBulkWriteOperation);
|
|
69
|
+
this.cursorResponse = response;
|
|
70
|
+
|
|
71
|
+
return { server: clientBulkWriteOperation.server, session, response };
|
|
72
|
+
}
|
|
73
|
+
}
|
package/src/error.ts
CHANGED
|
@@ -616,6 +616,33 @@ export class MongoGCPError extends MongoOIDCError {
|
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
618
|
|
|
619
|
+
/**
|
|
620
|
+
* An error indicating that an error occurred when processing bulk write results.
|
|
621
|
+
*
|
|
622
|
+
* @public
|
|
623
|
+
* @category Error
|
|
624
|
+
*/
|
|
625
|
+
export class MongoBulkWriteCursorError extends MongoRuntimeError {
|
|
626
|
+
/**
|
|
627
|
+
* **Do not use this constructor!**
|
|
628
|
+
*
|
|
629
|
+
* Meant for internal use only.
|
|
630
|
+
*
|
|
631
|
+
* @remarks
|
|
632
|
+
* This class is only meant to be constructed within the driver. This constructor is
|
|
633
|
+
* not subject to semantic versioning compatibility guarantees and may change at any time.
|
|
634
|
+
*
|
|
635
|
+
* @public
|
|
636
|
+
**/
|
|
637
|
+
constructor(message: string) {
|
|
638
|
+
super(message);
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
override get name(): string {
|
|
642
|
+
return 'MongoBulkWriteCursorError';
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
|
|
619
646
|
/**
|
|
620
647
|
* An error generated when a ChangeStream operation fails to execute.
|
|
621
648
|
*
|