Skip to content

Commit a953109

Browse files
committed
docs: update comments
1 parent b521d50 commit a953109

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

src/operations/client_bulk_write/common.ts

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ export interface ClientInsertOneModel<TSchema extends Document = Document>
4343
export interface ClientDeleteOneModel<TSchema extends Document = Document>
4444
extends ClientWriteModel {
4545
name: 'deleteOne';
46-
/** The filter to limit the deleted documents. */
46+
/**
47+
* The filter used to determine if a document should be deleted.
48+
* For a deleteOne operation, the first match is removed.
49+
*/
4750
filter: Filter<TSchema>;
4851
/** Specifies a collation. */
4952
collation?: CollationOptions;
@@ -55,7 +58,10 @@ export interface ClientDeleteOneModel<TSchema extends Document = Document>
5558
export interface ClientDeleteManyModel<TSchema extends Document = Document>
5659
extends ClientWriteModel {
5760
name: 'deleteMany';
58-
/** The filter to limit the deleted documents. */
61+
/**
62+
* The filter used to determine if a document should be deleted.
63+
* For a deleteOne operation, all matches are removed.
64+
*/
5965
filter: Filter<TSchema>;
6066
/** Specifies a collation. */
6167
collation?: CollationOptions;
@@ -67,7 +73,10 @@ export interface ClientDeleteManyModel<TSchema extends Document = Document>
6773
export interface ClientReplaceOneModel<TSchema extends Document = Document>
6874
extends ClientWriteModel {
6975
name: 'replaceOne';
70-
/** The filter to limit the replaced document. */
76+
/**
77+
* The filter used to determine if a document should be replaced.
78+
* For a replaceOne operation, the first match is replaced.
79+
*/
7180
filter: Filter<TSchema>;
7281
/** The document with which to replace the matched document. */
7382
replacement: WithoutId<TSchema>;
@@ -83,7 +92,10 @@ export interface ClientReplaceOneModel<TSchema extends Document = Document>
8392
export interface ClientUpdateOneModel<TSchema extends Document = Document>
8493
extends ClientWriteModel {
8594
name: 'updateOne';
86-
/** The filter to limit the updated documents. */
95+
/**
96+
* The filter used to determine if a document should be updated.
97+
* For an updateOne operation, the first match is updated.
98+
*/
8799
filter: Filter<TSchema>;
88100
/**
89101
* The modifications to apply. The value can be either:
@@ -105,7 +117,10 @@ export interface ClientUpdateOneModel<TSchema extends Document = Document>
105117
export interface ClientUpdateManyModel<TSchema extends Document = Document>
106118
extends ClientWriteModel {
107119
name: 'updateMany';
108-
/** The filter to limit the updated documents. */
120+
/**
121+
* The filter used to determine if a document should be updated.
122+
* For an updateMany operation, all matches are updated.
123+
*/
109124
filter: Filter<TSchema>;
110125
/**
111126
* The modifications to apply. The value can be either:

0 commit comments

Comments
 (0)