File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,11 @@ export const CursorTimeoutMode = Object.freeze({
73
73
* `cursor.next()`.
74
74
* When set to `'cursorLifetime'`, the deadline applies to the life of the entire cursor.
75
75
*
76
+ * Depending on the type of cursor being used, this option has different default values.
77
+ * For non-tailable cursors, this value defaults to `'cursorLifetime'`
78
+ * For tailable cursors, this value defaults to `'iteration'` since tailable cursors, by
79
+ * definition can have an arbitrarily long lifetime.
80
+ *
76
81
* @example
77
82
* # Example showing use of `'iteration'`
78
83
* ```ts
Original file line number Diff line number Diff line change @@ -19,9 +19,11 @@ import {
19
19
export type RunCursorCommandOptions = {
20
20
readPreference ?: ReadPreferenceLike ;
21
21
session ?: ClientSession ;
22
- /** @internal */
22
+ /** Specifies the time an operation will run until it throws a timeout error. Note that if
23
+ * `maxTimeMS` is provided in the command in addition to setting `timeoutMS` in the options, then
24
+ * the original value of `maxTimeMS` will be overwritten. */
23
25
timeoutMS ?: number ;
24
- /** @internal */
26
+ /** See { @link CursorTimeoutMode} */
25
27
timeoutMode ?: CursorTimeoutMode ;
26
28
tailable ?: boolean ;
27
29
awaitData ?: boolean ;
You can’t perform that action at this time.
0 commit comments