Skip to content

Commit be77873

Browse files
committed
docs: fixes
1 parent b4aa2bd commit be77873

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/collection.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,8 +1547,10 @@ export class Collection<TSchema extends Document = Document> {
15471547
/**
15481548
* Initiate an Out of order batch write operation. All operations will be buffered into insert/update/remove commands executed out of order.
15491549
*
1550+
* @throws MongoNotConnectedError
15501551
* @remarks
1551-
* **NOTE:** MongoClient must be connected prior to calling this API.
1552+
* **NOTE:** MongoClient must be connected prior to calling this method due to a known limitation in this legacy implemenation.
1553+
* However, `collection.bulkWrite()` provides an equivalent API that does not require prior connecting.
15521554
*/
15531555
initializeUnorderedBulkOp(options?: BulkWriteOptions): UnorderedBulkOperation {
15541556
return new UnorderedBulkOperation(this as TODO_NODE_3286, resolveOptions(this, options));
@@ -1557,8 +1559,10 @@ export class Collection<TSchema extends Document = Document> {
15571559
/**
15581560
* Initiate an In order bulk write operation. Operations will be serially executed in the order they are added, creating a new operation for each switch in types.
15591561
*
1562+
* @throws MongoNotConnectedError
15601563
* @remarks
1561-
* **NOTE:** MongoClient must be connected prior to calling this API.
1564+
* **NOTE:** MongoClient must be connected prior to calling this method due to a known limitation in this legacy implemenation.
1565+
* However, `collection.bulkWrite()` provides an equivalent API that does not require prior connecting.
15621566
*/
15631567
initializeOrderedBulkOp(options?: BulkWriteOptions): OrderedBulkOperation {
15641568
return new OrderedBulkOperation(this as TODO_NODE_3286, resolveOptions(this, options));

0 commit comments

Comments
 (0)