Skip to content

Commit be6df17

Browse files
committed
feat(NODE-5186)!: remove duplicate BulkWriteResult accessors
1 parent de158b2 commit be6df17

File tree

1 file changed

+13
-59
lines changed

1 file changed

+13
-59
lines changed

src/bulk/common.ts

+13-59
Original file line numberDiff line numberDiff line change
@@ -212,62 +212,6 @@ export class BulkWriteResult {
212212
return this.result.ok;
213213
}
214214

215-
/**
216-
* The number of inserted documents
217-
* @deprecated Use insertedCount instead.
218-
*/
219-
get nInserted(): number {
220-
return this.result.nInserted;
221-
}
222-
223-
/**
224-
* Number of upserted documents
225-
* @deprecated User upsertedCount instead.
226-
*/
227-
get nUpserted(): number {
228-
return this.result.nUpserted;
229-
}
230-
231-
/**
232-
* Number of matched documents
233-
* @deprecated Use matchedCount instead.
234-
*/
235-
get nMatched(): number {
236-
return this.result.nMatched;
237-
}
238-
239-
/**
240-
* Number of documents updated physically on disk
241-
* @deprecated Use modifiedCount instead.
242-
*/
243-
get nModified(): number {
244-
return this.result.nModified;
245-
}
246-
247-
/**
248-
* Number of removed documents
249-
* @deprecated Use deletedCount instead.
250-
*/
251-
get nRemoved(): number {
252-
return this.result.nRemoved;
253-
}
254-
255-
/**
256-
* Returns an array of all inserted ids
257-
* @deprecated Use insertedIds instead.
258-
*/
259-
getInsertedIds(): Document[] {
260-
return this.result.insertedIds;
261-
}
262-
263-
/**
264-
* Returns an array of all upserted ids
265-
* @deprecated Use upsertedIds instead.
266-
*/
267-
getUpsertedIds(): Document[] {
268-
return this.result.upserted;
269-
}
270-
271215
/** Returns the upserted id at the given index */
272216
getUpsertedIdAt(index: number): Document | undefined {
273217
return this.result.upserted[index];
@@ -864,11 +808,21 @@ export interface BulkOperationPrivate {
864808

865809
/** @public */
866810
export interface BulkWriteOptions extends CommandOperationOptions {
867-
/** Allow driver to bypass schema validation in MongoDB 3.2 or higher. */
811+
/**
812+
* Allow driver to bypass schema validation in MongoDB 3.2 or higher.
813+
* @defaultValue `false` - documents will be validated by default
814+
**/
868815
bypassDocumentValidation?: boolean;
869-
/** If true, when an insert fails, don't execute the remaining writes. If false, continue with remaining inserts when one fails. */
816+
/**
817+
* If true, when an insert fails, don't execute the remaining writes.
818+
* If false, continue with remaining inserts when one fails.
819+
* @defaultValue `true` - inserts are ordered by default
820+
*/
870821
ordered?: boolean;
871-
/** Force server to assign _id values instead of driver. */
822+
/**
823+
* Force server to assign _id values instead of driver.
824+
* @defaultValue `false` - the driver generates `_id` fields by default
825+
**/
872826
forceServerObjectId?: boolean;
873827
/** Map of parameter names and values that can be accessed using $$var (requires MongoDB 5.0). */
874828
let?: Document;

0 commit comments

Comments
 (0)