Skip to content

Commit aa1c1da

Browse files
committed
chore: comments
1 parent c7fc4e2 commit aa1c1da

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/cursor/client_bulk_write_cursor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515

1616
/** @public */
1717
export interface ClientBulkWriteCursorOptions
18-
extends AbstractCursorOptions,
18+
extends Omit<AbstractCursorOptions, 'maxAwaitTimeMS' | 'tailable' | 'awaitData'>,
1919
ClientBulkWriteOptions {}
2020

2121
/**

src/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ export class MongoGCPError extends MongoOIDCError {
617617
}
618618

619619
/**
620-
* An error generated when a ChangeStream operation fails to execute.
620+
* An error indicating that an error occurred when processing bulk write results.
621621
*
622622
* @public
623623
* @category Error

src/operations/client_bulk_write/results_merger.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,8 @@ export class ClientBulkWriteResultsMerger {
7474
const result: ClientUpdateResult = {
7575
matchedCount: document.n,
7676
modifiedCount: document.nModified ?? 0,
77-
// We do specifically want to check undefined here since a null _id is valid.
78-
// eslint-disable-next-line no-restricted-syntax
79-
didUpsert: document.upserted?._id !== undefined
77+
// Check if the bulk did actually upsert.
78+
didUpsert: document.upserted != null
8079
};
8180
if (document.upserted) {
8281
result.upsertedId = document.upserted._id;

0 commit comments

Comments
 (0)