You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/mongo_client.ts
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -510,6 +510,13 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> implements
510
510
/**
511
511
* Connect to MongoDB using a url
512
512
*
513
+
* @remarks
514
+
* Calling connect is optional as the first operation you preform will call connect if it's needed.
515
+
* `timeoutMS` specified at the client-level will bound the time any operation can take before throwing a timeout error.
516
+
* However, when the operation being run is automatically connecting your MongoClient the timeoutMS will only be used for the operation portion of task.
517
+
* This means the time to setup the MongoClient does not count against timeoutMS.
518
+
* If you are using timeoutMS we recommend connecting your client explicitly in advance of any operation to avoid this inconsistent execution time.
@@ -713,6 +720,13 @@ export class MongoClient extends TypedEventEmitter<MongoClientEvents> implements
713
720
* Connect to MongoDB using a url
714
721
*
715
722
* @remarks
723
+
* Calling connect is optional as the first operation you preform will call connect if it's needed.
724
+
* `timeoutMS` specified at the client-level will bound the time any operation can take before throwing a timeout error.
725
+
* However, when the operation being run is automatically connecting your MongoClient the timeoutMS will only be used for the operation portion of task.
726
+
* This means the time to setup the MongoClient does not count against timeoutMS.
727
+
* If you are using timeoutMS we recommend connecting your client explicitly in advance of any operation to avoid this inconsistent execution time.
728
+
*
729
+
* @remarks
716
730
* The programmatically provided options take precedence over the URI options.
0 commit comments