There was an error while loading. Please reload this page.
1 parent 896cd76 commit e33a8beCopy full SHA for e33a8be
index.d.ts
@@ -803,6 +803,13 @@ declare module 'mongoose' {
803
bulkWrite(writes: Array<any>, options?: mongodb.CollectionBulkWriteOptions): Promise<mongodb.BulkWriteOpResultObject>;
804
bulkWrite(writes: Array<any>, options?: mongodb.CollectionBulkWriteOptions, cb?: Callback<mongodb.BulkWriteOpResultObject>): void;
805
806
+ /**
807
+ * Sends multiple `save()` calls in a single `bulkWrite()`. This is faster than
808
+ * sending multiple `save()` calls because with `bulkSave()` there is only one
809
+ * network round trip to the MongoDB server.
810
+ */
811
+ bulkSave(documents: Array<Document>): Promise<mongodb.BulkWriteResult>;
812
+
813
/** Collection the model uses. */
814
collection: Collection;
815
0 commit comments