-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathFindCursor.html
223 lines (223 loc) · 250 KB
/
FindCursor.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>FindCursor | mongodb</title><meta name="description" content="Documentation for mongodb"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">mongodb</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">mongodb</a></li><li><a href="FindCursor.html">FindCursor</a></li></ul><h1>Class FindCursor<TSchema></h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-type-parameters"><h3>Type parameters</h3><ul class="tsd-type-parameters"><li><h4>TSchema = <span class="tsd-signature-type">any</span></h4></li></ul></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><a href="AbstractCursor.html" class="tsd-signature-type" data-tsd-kind="Class">AbstractCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span><ul class="tsd-hierarchy"><li><span class="target">FindCursor</span></li></ul></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Events</h3><ul class="tsd-index-list"><li class="tsd-kind-event tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="FindCursor.html#CLOSE" class="tsd-kind-icon">CLOSE</a></li></ul></section><section class="tsd-index-section tsd-is-inherited tsd-is-external"><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#captureRejectionSymbol" class="tsd-kind-icon">capture<wbr/>Rejection<wbr/>Symbol</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#captureRejections" class="tsd-kind-icon">capture<wbr/>Rejections</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#defaultMaxListeners" class="tsd-kind-icon">default<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#errorMonitor" class="tsd-kind-icon">error<wbr/>Monitor</a></li></ul></section><section class="tsd-index-section tsd-is-inherited"><h3>Accessors</h3><ul class="tsd-index-list"><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#closed" class="tsd-kind-icon">closed</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#killed" class="tsd-kind-icon">killed</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#loadBalanced" class="tsd-kind-icon">load<wbr/>Balanced</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#namespace" class="tsd-kind-icon">namespace</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#readConcern" class="tsd-kind-icon">read<wbr/>Concern</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#readPreference" class="tsd-kind-icon">read<wbr/>Preference</a></li></ul></section><section class="tsd-index-section "><h3>Methods</h3><ul class="tsd-index-list"><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#_asyncIterator_" class="tsd-kind-icon">[async<wbr/>Iterator]</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#addCursorFlag" class="tsd-kind-icon">add<wbr/>Cursor<wbr/>Flag</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#addListener" class="tsd-kind-icon">add<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#addQueryModifier" class="tsd-kind-icon">add<wbr/>Query<wbr/>Modifier</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#allowDiskUse" class="tsd-kind-icon">allow<wbr/>Disk<wbr/>Use</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#batchSize" class="tsd-kind-icon">batch<wbr/>Size</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#bufferedCount" class="tsd-kind-icon">buffered<wbr/>Count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="FindCursor.html#clone" class="tsd-kind-icon">clone</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#close" class="tsd-kind-icon">close</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#collation" class="tsd-kind-icon">collation</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#comment" class="tsd-kind-icon">comment</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#count" class="tsd-kind-icon">count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#emit" class="tsd-kind-icon">emit</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#eventNames" class="tsd-kind-icon">event<wbr/>Names</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#explain" class="tsd-kind-icon">explain</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#filter" class="tsd-kind-icon">filter</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#forEach" class="tsd-kind-icon">for<wbr/>Each</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#getMaxListeners" class="tsd-kind-icon">get<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#hasNext" class="tsd-kind-icon">has<wbr/>Next</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#hint" class="tsd-kind-icon">hint</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#limit" class="tsd-kind-icon">limit</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#listenerCount" class="tsd-kind-icon">listener<wbr/>Count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#listeners" class="tsd-kind-icon">listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-overwrite"><a href="FindCursor.html#map" class="tsd-kind-icon">map</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#max" class="tsd-kind-icon">max</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#maxAwaitTimeMS" class="tsd-kind-icon">max<wbr/>Await<wbr/>TimeMS</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="FindCursor.html#maxTimeMS" class="tsd-kind-icon">max<wbr/>TimeMS</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#min" class="tsd-kind-icon">min</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#next" class="tsd-kind-icon">next</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#off" class="tsd-kind-icon">off</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#on" class="tsd-kind-icon">on</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#once" class="tsd-kind-icon">once</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#prependListener" class="tsd-kind-icon">prepend<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#prependOnceListener" class="tsd-kind-icon">prepend<wbr/>Once<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="FindCursor.html#project" class="tsd-kind-icon">project</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#rawListeners" class="tsd-kind-icon">raw<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#readBufferedDocuments" class="tsd-kind-icon">read<wbr/>Buffered<wbr/>Documents</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#removeAllListeners" class="tsd-kind-icon">remove<wbr/>All<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#removeListener" class="tsd-kind-icon">remove<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#returnKey" class="tsd-kind-icon">return<wbr/>Key</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#rewind" class="tsd-kind-icon">rewind</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#setMaxListeners" class="tsd-kind-icon">set<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#showRecordId" class="tsd-kind-icon">show<wbr/>Record<wbr/>Id</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#skip" class="tsd-kind-icon">skip</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#sort" class="tsd-kind-icon">sort</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#stream" class="tsd-kind-icon">stream</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#toArray" class="tsd-kind-icon">to<wbr/>Array</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#tryNext" class="tsd-kind-icon">try<wbr/>Next</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#withReadConcern" class="tsd-kind-icon">with<wbr/>Read<wbr/>Concern</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#withReadPreference" class="tsd-kind-icon">with<wbr/>Read<wbr/>Preference</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#getEventListeners" class="tsd-kind-icon">get<wbr/>Event<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#listenerCount-1" class="tsd-kind-icon">listener<wbr/>Count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#on-1" class="tsd-kind-icon">on</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#once-1" class="tsd-kind-icon">once</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#setMaxListeners-1" class="tsd-kind-icon">set<wbr/>Max<wbr/>Listeners</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Events</h2><section class="tsd-panel tsd-member tsd-kind-event tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a id="CLOSE" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> CLOSE<a href="#CLOSE" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">CLOSE<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"close"</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#CLOSE">CLOSE</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L161">src/cursor/abstract_cursor.ts:161</a></li></ul></aside></section></section><section class="tsd-panel-group tsd-member-group tsd-is-inherited tsd-is-external"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="captureRejectionSymbol" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> capture<wbr/>Rejection<wbr/>Symbol<a href="#captureRejectionSymbol" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">capture<wbr/>Rejection<wbr/>Symbol<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">typeof </span><a class="tsd-signature-type" data-tsd-kind="Property">captureRejectionSymbol</a></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#captureRejectionSymbol">captureRejectionSymbol</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:328</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="captureRejections" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> capture<wbr/>Rejections<a href="#captureRejections" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">capture<wbr/>Rejections<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#captureRejections">captureRejections</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:333</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets or gets the default captureRejection value for all emitters.</p>
</div></div></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="defaultMaxListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> default<wbr/>Max<wbr/>Listeners<a href="#defaultMaxListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">default<wbr/>Max<wbr/>Listeners<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#defaultMaxListeners">defaultMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:334</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="errorMonitor" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> <span class="tsd-flag ts-flagReadonly">Readonly</span> error<wbr/>Monitor<a href="#errorMonitor" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">error<wbr/>Monitor<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">typeof </span><span class="tsd-signature-type">errorMonitor</span></div><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#errorMonitor">errorMonitor</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:327</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>This symbol shall be used to install a listener for only monitoring <code>'error'</code>
events. Listeners installed using this symbol are called before the regular
<code>'error'</code> listeners are called.</p>
</div><div><p>Installing a listener using this symbol does not change the behavior once an
<code>'error'</code> event is emitted, therefore the process will still crash if no
regular <code>'error'</code> listener is installed.</p>
</div></div></section></section><section class="tsd-panel-group tsd-member-group tsd-is-inherited"><h2>Accessors</h2><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="closed" class="tsd-anchor"></a><h3 class="tsd-anchor-link">closed<a href="#closed" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> closed<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.closed</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L259">src/cursor/abstract_cursor.ts:259</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="id" class="tsd-anchor"></a><h3 class="tsd-anchor-link">id<a href="#id" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> id<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="BSON.Long.html" class="tsd-signature-type" data-tsd-kind="Class">Long</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.id</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L219">src/cursor/abstract_cursor.ts:219</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="BSON.Long.html" class="tsd-signature-type" data-tsd-kind="Class">Long</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="killed" class="tsd-anchor"></a><h3 class="tsd-anchor-link">killed<a href="#killed" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> killed<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.killed</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L263">src/cursor/abstract_cursor.ts:263</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="loadBalanced" class="tsd-anchor"></a><h3 class="tsd-anchor-link">load<wbr/>Balanced<a href="#loadBalanced" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> loadBalanced<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.loadBalanced</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L267">src/cursor/abstract_cursor.ts:267</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="namespace" class="tsd-anchor"></a><h3 class="tsd-anchor-link">namespace<a href="#namespace" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> namespace<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="MongoDBNamespace.html" class="tsd-signature-type" data-tsd-kind="Class">MongoDBNamespace</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.namespace</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L233">src/cursor/abstract_cursor.ts:233</a></li></ul></aside><h4 class="tsd-returns-title">Returns <a href="MongoDBNamespace.html" class="tsd-signature-type" data-tsd-kind="Class">MongoDBNamespace</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="readConcern" class="tsd-anchor"></a><h3 class="tsd-anchor-link">read<wbr/>Concern<a href="#readConcern" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> readConcern<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="ReadConcern.html" class="tsd-signature-type" data-tsd-kind="Class">ReadConcern</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.readConcern</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L241">src/cursor/abstract_cursor.ts:241</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><a href="ReadConcern.html" class="tsd-signature-type" data-tsd-kind="Class">ReadConcern</a></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a id="readPreference" class="tsd-anchor"></a><h3 class="tsd-anchor-link">read<wbr/>Preference<a href="#readPreference" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> readPreference<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="ReadPreference.html" class="tsd-signature-type" data-tsd-kind="Class">ReadPreference</a></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from AbstractCursor.readPreference</p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L237">src/cursor/abstract_cursor.ts:237</a></li></ul></aside><h4 class="tsd-returns-title">Returns <a href="ReadPreference.html" class="tsd-signature-type" data-tsd-kind="Class">ReadPreference</a></h4></li></ul></section></section><section class="tsd-panel-group tsd-member-group "><h2>Methods</h2><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="_asyncIterator_" class="tsd-anchor"></a><h3 class="tsd-anchor-link">[async<wbr/>Iterator]<a href="#_asyncIterator_" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">[async<wbr/>Iterator]<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#_asyncIterator_">[asyncIterator]</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L291">src/cursor/abstract_cursor.ts:291</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncGenerator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="addCursorFlag" class="tsd-anchor"></a><h3 class="tsd-anchor-link">add<wbr/>Cursor<wbr/>Flag<a href="#addCursorFlag" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">add<wbr/>Cursor<wbr/>Flag<span class="tsd-signature-symbol">(</span>flag<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"tailable"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"oplogReplay"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"noCursorTimeout"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"awaitData"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"exhaust"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"partial"</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#addCursorFlag">addCursorFlag</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L440">src/cursor/abstract_cursor.ts:440</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Add a cursor flag to the cursor</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>flag: <span class="tsd-signature-type">"tailable"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"oplogReplay"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"noCursorTimeout"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"awaitData"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"exhaust"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"partial"</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The flag to set, must be one of following ['tailable', 'oplogReplay', 'noCursorTimeout', 'awaitData', 'partial' -.</p>
</div></div></li><li><h5>value: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The flag boolean value.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="addListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link">add<wbr/>Listener<a href="#addListener" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">add<wbr/>Listener<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">add<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">add<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#addListener">addListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L318">src/mongo_types.ts:318</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#addListener">addListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L319">src/mongo_types.ts:319</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#addListener">addListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L323">src/mongo_types.ts:323</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="addQueryModifier" class="tsd-anchor"></a><h3 class="tsd-anchor-link">add<wbr/>Query<wbr/>Modifier<a href="#addQueryModifier" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">add<wbr/>Query<wbr/>Modifier<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L224">src/cursor/find_cursor.ts:224</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Add a query modifier to the cursor query</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The query modifier (must start with $, such as $orderby etc)</p>
</div></div></li><li><h5>value: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The modifier value.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="allowDiskUse" class="tsd-anchor"></a><h3 class="tsd-anchor-link">allow<wbr/>Disk<wbr/>Use<a href="#allowDiskUse" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">allow<wbr/>Disk<wbr/>Use<span class="tsd-signature-symbol">(</span>allow<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L391">src/cursor/find_cursor.ts:391</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Allows disk use for blocking sort operations exceeding 100MB memory. (MongoDB 3.2 or higher)</p>
</div><dl class="tsd-comment-tags"><dt>remarks</dt><dd><p><a href="https://www.mongodb.com/docs/manual/reference/command/find/#find-cmd-allowdiskuse" class="external">find command allowDiskUse documentation</a></p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>allow: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="batchSize" class="tsd-anchor"></a><h3 class="tsd-anchor-link">batch<wbr/>Size<a href="#batchSize" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">batch<wbr/>Size<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#batchSize">batchSize</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L563">src/cursor/abstract_cursor.ts:563</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the batch size for the cursor.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The number of documents to return per batch. See <a href="https://www.mongodb.com/docs/manual/reference/command/find/" class="external">find command documentation</a>.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="bufferedCount" class="tsd-anchor"></a><h3 class="tsd-anchor-link">buffered<wbr/>Count<a href="#bufferedCount" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">buffered<wbr/>Count<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#bufferedCount">bufferedCount</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L272">src/cursor/abstract_cursor.ts:272</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns current buffered documents length</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="clone" class="tsd-anchor"></a><h3 class="tsd-anchor-link">clone<a href="#clone" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">clone<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#clone">clone</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L58">src/cursor/find_cursor.ts:58</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns a new uninitialized copy of this cursor, with options matching those that have been set on the current instance</p>
</div></div><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="close" class="tsd-anchor"></a><h3 class="tsd-anchor-link">close<a href="#close" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">close<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#close">close</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L414">src/cursor/abstract_cursor.ts:414</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="collation" class="tsd-anchor"></a><h3 class="tsd-anchor-link">collation<a href="#collation" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">collation<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="../interfaces/CollationOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">CollationOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L413">src/cursor/find_cursor.ts:413</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the collation options for the cursor.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <a href="../interfaces/CollationOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">CollationOptions</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The cursor collation options (MongoDB 3.4 or higher) settings for update operation (see 3.4 documentation for available fields).</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="comment" class="tsd-anchor"></a><h3 class="tsd-anchor-link">comment<a href="#comment" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">comment<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L287">src/cursor/find_cursor.ts:287</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Add a comment to the cursor query allowing for tracking the comment in the log.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The comment attached to this query.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="count" class="tsd-anchor"></a><h3 class="tsd-anchor-link">count<a href="#count" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">count<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/CountOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">CountOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L125">src/cursor/find_cursor.ts:125</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get the count of documents for this cursor</p>
</div><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><p>Use <code>collection.estimatedDocumentCount</code> or <code>collection.countDocuments</code> instead</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="../interfaces/CountOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">CountOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="emit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">emit<a href="#emit" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">emit<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span>, <span class="tsd-signature-symbol">...</span>args<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Parameters</span><span class="tsd-signature-symbol"><</span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#emit">emit</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L365">src/mongo_types.ts:365</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span></h5></li><li><h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>args: <span class="tsd-signature-type">Parameters</span><span class="tsd-signature-symbol"><</span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">></span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="eventNames" class="tsd-anchor"></a><h3 class="tsd-anchor-link">event<wbr/>Names<a href="#eventNames" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">event<wbr/>Names<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#eventNames">eventNames</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L391">src/mongo_types.ts:391</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="explain" class="tsd-anchor"></a><h3 class="tsd-anchor-link">explain<a href="#explain" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">explain<span class="tsd-signature-symbol">(</span>verbosity<span class="tsd-signature-symbol">?: </span><a href="../modules.html#ExplainVerbosityLike" class="tsd-signature-type" data-tsd-kind="Type alias">ExplainVerbosityLike</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L143">src/cursor/find_cursor.ts:143</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Execute the explain for the cursor</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> verbosity: <a href="../modules.html#ExplainVerbosityLike" class="tsd-signature-type" data-tsd-kind="Type alias">ExplainVerbosityLike</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="filter" class="tsd-anchor"></a><h3 class="tsd-anchor-link">filter<a href="#filter" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">filter<span class="tsd-signature-symbol">(</span>filter<span class="tsd-signature-symbol">: </span><a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L155">src/cursor/find_cursor.ts:155</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the cursor query</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>filter: <a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="forEach" class="tsd-anchor"></a><h3 class="tsd-anchor-link">for<wbr/>Each<a href="#forEach" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">for<wbr/>Each<span class="tsd-signature-symbol">(</span>iterator<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#forEach">forEach</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L402">src/cursor/abstract_cursor.ts:402</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Iterates over all the documents for this cursor using the iterator, callback pattern.</p>
</div><div><p>If the iterator returns <code>false</code>, iteration will stop.</p>
</div><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><ul>
<li>Will be removed in a future release. Use for await...of instead.</li>
</ul>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>iterator: <span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The iteration callback.</p>
</div></div><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>doc: <span class="tsd-signature-type">TSchema</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="getMaxListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Max<wbr/>Listeners<a href="#getMaxListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">get<wbr/>Max<wbr/>Listeners<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#getMaxListeners">getMaxListeners</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L392">src/mongo_types.ts:392</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="hasNext" class="tsd-anchor"></a><h3 class="tsd-anchor-link">has<wbr/>Next<a href="#hasNext" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">has<wbr/>Next<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#hasNext">hasNext</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L355">src/cursor/abstract_cursor.ts:355</a></li></ul></aside><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="hint" class="tsd-anchor"></a><h3 class="tsd-anchor-link">hint<a href="#hint" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">hint<span class="tsd-signature-symbol">(</span>hint<span class="tsd-signature-symbol">: </span><a href="../modules.html#Hint" class="tsd-signature-type" data-tsd-kind="Type alias">Hint</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L166">src/cursor/find_cursor.ts:166</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the cursor hint</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>hint: <a href="../modules.html#Hint" class="tsd-signature-type" data-tsd-kind="Type alias">Hint</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>If specified, then the query system will only consider plans using the hinted index.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="limit" class="tsd-anchor"></a><h3 class="tsd-anchor-link">limit<a href="#limit" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">limit<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L424">src/cursor/find_cursor.ts:424</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the limit for the cursor.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The limit for the cursor query.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="listenerCount" class="tsd-anchor"></a><h3 class="tsd-anchor-link">listener<wbr/>Count<a href="#listenerCount" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">listener<wbr/>Count<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>type<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#listenerCount">listenerCount</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L370">src/mongo_types.ts:370</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>type: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventKey</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="listeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link">listeners<a href="#listeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">listeners<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#listeners">listeners</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L357">src/mongo_types.ts:357</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-overwrite"><a id="map" class="tsd-anchor"></a><h3 class="tsd-anchor-link">map<a href="#map" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">map<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>transform<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#map">map</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L66">src/cursor/find_cursor.ts:66</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Map all documents using the provided function
If there is a transform set on the cursor, that will be called first and the result passed to
this function's transform.</p>
</div><dl class="tsd-comment-tags"><dt>remarks</dt><dd><p><strong>Note</strong> Cursors use <code>null</code> internally to indicate that there are no more documents in the cursor. Providing a mapping
function that maps values to <code>null</code> will result in the cursor closing itself before it has finished iterating
all documents. This will <strong>not</strong> result in a memory leak, just surprising behavior. For example:</p>
<pre><code class="language-typescript"><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">cursor</span><span class="hl-0"> = </span><span class="hl-6">collection</span><span class="hl-0">.</span><span class="hl-2">find</span><span class="hl-0">({});</span><br/><span class="hl-6">cursor</span><span class="hl-0">.</span><span class="hl-2">map</span><span class="hl-0">(() </span><span class="hl-3">=></span><span class="hl-0"> </span><span class="hl-3">null</span><span class="hl-0">);</span><br/><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">documents</span><span class="hl-0"> = </span><span class="hl-7">await</span><span class="hl-0"> </span><span class="hl-6">cursor</span><span class="hl-0">.</span><span class="hl-2">toArray</span><span class="hl-0">();</span><br/><span class="hl-1">// documents is always [], regardless of how many documents are in the collection.</span>
</code></pre>
<p>Other falsey values are allowed:</p>
<pre><code class="language-typescript"><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">cursor</span><span class="hl-0"> = </span><span class="hl-6">collection</span><span class="hl-0">.</span><span class="hl-2">find</span><span class="hl-0">({});</span><br/><span class="hl-6">cursor</span><span class="hl-0">.</span><span class="hl-2">map</span><span class="hl-0">(() </span><span class="hl-3">=></span><span class="hl-0"> </span><span class="hl-5">''</span><span class="hl-0">);</span><br/><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">documents</span><span class="hl-0"> = </span><span class="hl-7">await</span><span class="hl-0"> </span><span class="hl-6">cursor</span><span class="hl-0">.</span><span class="hl-2">toArray</span><span class="hl-0">();</span><br/><span class="hl-1">// documents is now an array of empty strings</span>
</code></pre>
<p><strong>Note for Typescript Users:</strong> adding a transform changes the return type of the iteration of this cursor,
it <strong>does not</strong> return a new instance of a cursor. This means when calling map,
you should always assign the result to a new variable in order to get a correctly typed cursor variable.
Take note of the following example:</p>
</dd></dl></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>T</h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>transform: <span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>doc<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>doc: <span class="tsd-signature-type">TSchema</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="max" class="tsd-anchor"></a><h3 class="tsd-anchor-link">max<a href="#max" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">max<span class="tsd-signature-symbol">(</span>max<span class="tsd-signature-symbol">: </span><a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L188">src/cursor/find_cursor.ts:188</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the cursor max</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>max: <a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specify a $max value to specify the exclusive upper bound for a specific index in order to constrain the results of find(). The $max specifies the upper bound for all keys of a specific index in order.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="maxAwaitTimeMS" class="tsd-anchor"></a><h3 class="tsd-anchor-link">max<wbr/>Await<wbr/>TimeMS<a href="#maxAwaitTimeMS" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">max<wbr/>Await<wbr/>TimeMS<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L298">src/cursor/find_cursor.ts:298</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set a maxAwaitTimeMS on a tailing cursor query to allow to customize the timeout value for the option awaitData (Only supported on MongoDB 3.2 or higher, ignored otherwise)</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of milliseconds to wait before aborting the tailed query.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a id="maxTimeMS" class="tsd-anchor"></a><h3 class="tsd-anchor-link">max<wbr/>TimeMS<a href="#maxTimeMS" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><li class="tsd-signature tsd-kind-icon">max<wbr/>TimeMS<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Overrides <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#maxTimeMS">maxTimeMS</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L313">src/cursor/find_cursor.ts:313</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set a maxTimeMS on the cursor query, allowing for hard timeout limits on queries (Only supported on MongoDB 2.6 or higher)</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Number of milliseconds to wait before aborting the query.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="min" class="tsd-anchor"></a><h3 class="tsd-anchor-link">min<a href="#min" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">min<span class="tsd-signature-symbol">(</span>min<span class="tsd-signature-symbol">: </span><a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L177">src/cursor/find_cursor.ts:177</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the cursor min</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>min: <a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>Specify a $min value to specify the inclusive lower bound for a specific index in order to constrain the results of find(). The $min specifies the lower bound for all keys of a specific index in order.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="next" class="tsd-anchor"></a><h3 class="tsd-anchor-link">next<a href="#next" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">next<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#next">next</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L375">src/cursor/abstract_cursor.ts:375</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Get the next available document from the cursor, returns null if no more documents are available.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="off" class="tsd-anchor"></a><h3 class="tsd-anchor-link">off<a href="#off" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">off<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">off<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">off<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#off">off</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L346">src/mongo_types.ts:346</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#off">off</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L347">src/mongo_types.ts:347</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#off">off</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L351">src/mongo_types.ts:351</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="on" class="tsd-anchor"></a><h3 class="tsd-anchor-link">on<a href="#on" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">on<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">on<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">on<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#on">on</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L325">src/mongo_types.ts:325</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#on">on</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L326">src/mongo_types.ts:326</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#on">on</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L330">src/mongo_types.ts:330</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="once" class="tsd-anchor"></a><h3 class="tsd-anchor-link">once<a href="#once" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">once<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">once<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">once<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#once">once</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L332">src/mongo_types.ts:332</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#once">once</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L333">src/mongo_types.ts:333</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#once">once</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L337">src/mongo_types.ts:337</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="prependListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link">prepend<wbr/>Listener<a href="#prependListener" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">prepend<wbr/>Listener<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">prepend<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">prepend<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#prependListener">prependListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L374">src/mongo_types.ts:374</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#prependListener">prependListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L375">src/mongo_types.ts:375</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#prependListener">prependListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L379">src/mongo_types.ts:379</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="prependOnceListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link">prepend<wbr/>Once<wbr/>Listener<a href="#prependOnceListener" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">prepend<wbr/>Once<wbr/>Listener<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">prepend<wbr/>Once<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">prepend<wbr/>Once<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L381">src/mongo_types.ts:381</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L385">src/mongo_types.ts:385</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#prependOnceListener">prependOnceListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L389">src/mongo_types.ts:389</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a id="project" class="tsd-anchor"></a><h3 class="tsd-anchor-link">project<a href="#project" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><li class="tsd-signature tsd-kind-icon">project<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L363">src/cursor/find_cursor.ts:363</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Add a project stage to the aggregation pipeline</p>
</div><dl class="tsd-comment-tags"><dt>remarks</dt><dd><p>In order to strictly type this function you must provide an interface
that represents the effect of your projection on the result documents.</p>
<p>By default chaining a projection to your cursor changes the returned type to the generic
<a href="../interfaces/BSON.Document.html">Document</a> type.
You should specify a parameterized type to have assertions on your final results.</p>
</dd><dt>example</dt><dd><pre><code class="language-typescript"><span class="hl-1">// Best way</span><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">docs</span><span class="hl-0">: </span><span class="hl-9">FindCursor</span><span class="hl-0"><{ </span><span class="hl-6">a</span><span class="hl-0">: </span><span class="hl-9">number</span><span class="hl-0"> }> = </span><span class="hl-6">cursor</span><span class="hl-0">.</span><span class="hl-2">project</span><span class="hl-0"><{ </span><span class="hl-6">a</span><span class="hl-0">: </span><span class="hl-9">number</span><span class="hl-0"> }>({ </span><span class="hl-6">_id:</span><span class="hl-0"> </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-6">a:</span><span class="hl-0"> </span><span class="hl-3">true</span><span class="hl-0"> });</span><br/><span class="hl-1">// Flexible way</span><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">docs</span><span class="hl-0">: </span><span class="hl-9">FindCursor</span><span class="hl-0"><</span><span class="hl-9">Document</span><span class="hl-0">> = </span><span class="hl-6">cursor</span><span class="hl-0">.</span><span class="hl-2">project</span><span class="hl-0">({ </span><span class="hl-6">_id:</span><span class="hl-0"> </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-6">a:</span><span class="hl-0"> </span><span class="hl-3">true</span><span class="hl-0"> });</span>
</code></pre>
</dd><dt>remarks</dt><dd><p><strong>Note for Typescript Users:</strong> adding a transform changes the return type of the iteration of this cursor,
it <strong>does not</strong> return a new instance of a cursor. This means when calling project,
you should always assign the result to a new variable in order to get a correctly typed cursor variable.
Take note of the following example:</p>
</dd><dt>example</dt><dd><pre><code class="language-typescript"><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">cursor</span><span class="hl-0">: </span><span class="hl-9">FindCursor</span><span class="hl-0"><{ </span><span class="hl-6">a</span><span class="hl-0">: </span><span class="hl-9">number</span><span class="hl-0">; </span><span class="hl-6">b</span><span class="hl-0">: </span><span class="hl-9">string</span><span class="hl-0"> }> = </span><span class="hl-6">coll</span><span class="hl-0">.</span><span class="hl-2">find</span><span class="hl-0">();</span><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">projectCursor</span><span class="hl-0"> = </span><span class="hl-6">cursor</span><span class="hl-0">.</span><span class="hl-2">project</span><span class="hl-0"><{ </span><span class="hl-6">a</span><span class="hl-0">: </span><span class="hl-9">number</span><span class="hl-0"> }>({ </span><span class="hl-6">_id:</span><span class="hl-0"> </span><span class="hl-8">0</span><span class="hl-0">, </span><span class="hl-6">a:</span><span class="hl-0"> </span><span class="hl-3">true</span><span class="hl-0"> });</span><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">aPropOnlyArray</span><span class="hl-0">: {</span><span class="hl-6">a</span><span class="hl-0">: </span><span class="hl-9">number</span><span class="hl-0">}[] = </span><span class="hl-7">await</span><span class="hl-0"> </span><span class="hl-6">projectCursor</span><span class="hl-0">.</span><span class="hl-2">toArray</span><span class="hl-0">();</span><br/><br/><span class="hl-1">// or always use chaining and save the final cursor</span><br/><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">cursor</span><span class="hl-0"> = </span><span class="hl-6">coll</span><span class="hl-0">.</span><span class="hl-2">find</span><span class="hl-0">().</span><span class="hl-2">project</span><span class="hl-0"><{ </span><span class="hl-6">a</span><span class="hl-0">: </span><span class="hl-9">string</span><span class="hl-0"> }>({</span><br/><span class="hl-0"> </span><span class="hl-6">_id:</span><span class="hl-0"> </span><span class="hl-8">0</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-6">a:</span><span class="hl-0"> { </span><span class="hl-6">$convert:</span><span class="hl-0"> { </span><span class="hl-6">input:</span><span class="hl-0"> </span><span class="hl-5">'$a'</span><span class="hl-0">, </span><span class="hl-6">to:</span><span class="hl-0"> </span><span class="hl-5">'string'</span><span class="hl-0"> }</span><br/><span class="hl-0">}});</span>
</code></pre>
</dd></dl></div><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>T<span class="tsd-signature-symbol">: </span><a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a> = <a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <a href="../interfaces/BSON.Document.html" class="tsd-signature-type" data-tsd-kind="Interface">Document</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">T</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="rawListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link">raw<wbr/>Listeners<a href="#rawListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">raw<wbr/>Listeners<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#rawListeners">rawListeners</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L361">src/mongo_types.ts:361</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventKey</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">[]</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="readBufferedDocuments" class="tsd-anchor"></a><h3 class="tsd-anchor-link">read<wbr/>Buffered<wbr/>Documents<a href="#readBufferedDocuments" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">read<wbr/>Buffered<wbr/>Documents<span class="tsd-signature-symbol">(</span>number<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">[]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#readBufferedDocuments">readBufferedDocuments</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L277">src/cursor/abstract_cursor.ts:277</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns current buffered documents</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> number: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">[]</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="removeAllListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link">remove<wbr/>All<wbr/>Listeners<a href="#removeAllListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">remove<wbr/>All<wbr/>Listeners<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#removeAllListeners">removeAllListeners</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L353">src/mongo_types.ts:353</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">EventKey</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a id="removeListener" class="tsd-anchor"></a><h3 class="tsd-anchor-link">remove<wbr/>Listener<a href="#removeListener" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">remove<wbr/>Listener<span class="tsd-signature-symbol"><</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">EventKey</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EventKey</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">remove<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a>, listener<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">remove<wbr/>Listener<span class="tsd-signature-symbol">(</span>event<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#removeListener">removeListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L339">src/mongo_types.ts:339</a></li></ul></aside><h4 class="tsd-type-parameters-title">Type parameters</h4><ul class="tsd-type-parameters"><li><h4>EventKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">"close"</span></h4></li></ul><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">EventKey</span></h5></li><li><h5>listener: <a href="../modules.html#AbstractCursorEvents" class="tsd-signature-type" data-tsd-kind="Type alias">AbstractCursorEvents</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">EventKey</span><span class="tsd-signature-symbol">]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#removeListener">removeListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L340">src/mongo_types.ts:340</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <a href="../modules.html#CommonEvents" class="tsd-signature-type" data-tsd-kind="Type alias">CommonEvents</a></h5></li><li><h5>listener: <span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, listener<span class="tsd-signature-symbol">: </span><a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#removeListener">removeListener</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L344">src/mongo_types.ts:344</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>event: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5>listener: <a href="../modules.html#GenericListener" class="tsd-signature-type" data-tsd-kind="Type alias">GenericListener</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="returnKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">return<wbr/>Key<a href="#returnKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">return<wbr/>Key<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L201">src/cursor/find_cursor.ts:201</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the cursor returnKey.
If set to true, modifies the cursor to only return the index field or fields for the results of the query, rather than documents.
If set to true and the query does not use an index to perform the read operation, the returned documents will not contain any fields.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>the returnKey value.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="rewind" class="tsd-anchor"></a><h3 class="tsd-anchor-link">rewind<a href="#rewind" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">rewind<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#rewind">rewind</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L582">src/cursor/abstract_cursor.ts:582</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Rewind this cursor to its uninitialized state. Any options that are present on the cursor will
remain in effect. Iterating this cursor will cause new queries to be sent to the server, even
if the resultant data has already been retrieved by this cursor.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="setMaxListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link">set<wbr/>Max<wbr/>Listeners<a href="#setMaxListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">set<wbr/>Max<wbr/>Listeners<span class="tsd-signature-symbol">(</span>n<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#setMaxListeners">setMaxListeners</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/mongo_types.ts#L393">src/mongo_types.ts:393</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>n: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="showRecordId" class="tsd-anchor"></a><h3 class="tsd-anchor-link">show<wbr/>Record<wbr/>Id<a href="#showRecordId" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">show<wbr/>Record<wbr/>Id<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L212">src/cursor/find_cursor.ts:212</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Modifies the output of a query by adding a field $recordId to matching documents. $recordId is the internal key which uniquely identifies a document in a collection.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">boolean</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The $showDiskLoc option has now been deprecated and replaced with the showRecordId field. $showDiskLoc will still be accepted for OP_QUERY stye find.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="skip" class="tsd-anchor"></a><h3 class="tsd-anchor-link">skip<a href="#skip" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">skip<span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L443">src/cursor/find_cursor.ts:443</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the skip for the cursor.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>value: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The skip for the cursor query.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="sort" class="tsd-anchor"></a><h3 class="tsd-anchor-link">sort<a href="#sort" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">sort<span class="tsd-signature-symbol">(</span>sort<span class="tsd-signature-symbol">: </span><a href="../modules.html#Sort" class="tsd-signature-type" data-tsd-kind="Type alias">Sort</a>, direction<span class="tsd-signature-symbol">?: </span><a href="../modules.html#SortDirection" class="tsd-signature-type" data-tsd-kind="Type alias">SortDirection</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/find_cursor.ts#L375">src/cursor/find_cursor.ts:375</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Sets the sort order of the cursor query.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>sort: <a href="../modules.html#Sort" class="tsd-signature-type" data-tsd-kind="Type alias">Sort</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The key or keys set for the sort.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> direction: <a href="../modules.html#SortDirection" class="tsd-signature-type" data-tsd-kind="Type alias">SortDirection</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The direction of the sorting (1 or -1).</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="stream" class="tsd-anchor"></a><h3 class="tsd-anchor-link">stream<a href="#stream" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">stream<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/CursorStreamOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">CursorStreamOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Readable</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type">AsyncIterable</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#stream">stream</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L331">src/cursor/abstract_cursor.ts:331</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="../interfaces/CursorStreamOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">CursorStreamOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Readable</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type">AsyncIterable</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="toArray" class="tsd-anchor"></a><h3 class="tsd-anchor-link">to<wbr/>Array<a href="#toArray" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">to<wbr/>Array<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#toArray">toArray</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L426">src/cursor/abstract_cursor.ts:426</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns an array of documents. The caller is responsible for making sure that there
is enough memory to store the results. Note that the array only contains partial
results when this cursor had been previously accessed. In that case,
cursor.rewind() can be used to reset the cursor.</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="tryNext" class="tsd-anchor"></a><h3 class="tsd-anchor-link">try<wbr/>Next<a href="#tryNext" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">try<wbr/>Next<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#tryNext">tryNext</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L386">src/cursor/abstract_cursor.ts:386</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Try to get the next available document from the cursor or <code>null</code> if an empty batch is returned</p>
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">null</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="withReadConcern" class="tsd-anchor"></a><h3 class="tsd-anchor-link">with<wbr/>Read<wbr/>Concern<a href="#withReadConcern" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">with<wbr/>Read<wbr/>Concern<span class="tsd-signature-symbol">(</span>readConcern<span class="tsd-signature-symbol">: </span><a href="../modules.html#ReadConcernLike" class="tsd-signature-type" data-tsd-kind="Type alias">ReadConcernLike</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#withReadConcern">withReadConcern</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L533">src/cursor/abstract_cursor.ts:533</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the ReadPreference for the cursor.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>readConcern: <a href="../modules.html#ReadConcernLike" class="tsd-signature-type" data-tsd-kind="Type alias">ReadConcernLike</a></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a id="withReadPreference" class="tsd-anchor"></a><h3 class="tsd-anchor-link">with<wbr/>Read<wbr/>Preference<a href="#withReadPreference" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><li class="tsd-signature tsd-kind-icon">with<wbr/>Read<wbr/>Preference<span class="tsd-signature-symbol">(</span>readPreference<span class="tsd-signature-symbol">: </span><a href="../modules.html#ReadPreferenceLike" class="tsd-signature-type" data-tsd-kind="Type alias">ReadPreferenceLike</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#withReadPreference">withReadPreference</a></p><ul><li>Defined in <a href="https://github.com/mongodb/node-mongodb-native/blob/v5.4.0/src/cursor/abstract_cursor.ts#L515">src/cursor/abstract_cursor.ts:515</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Set the ReadPreference for the cursor.</p>
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>readPreference: <a href="../modules.html#ReadPreferenceLike" class="tsd-signature-type" data-tsd-kind="Type alias">ReadPreferenceLike</a></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The new read preference for the cursor.</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <a href="FindCursor.html" class="tsd-signature-type" data-tsd-kind="Class">FindCursor</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">TSchema</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="getEventListeners" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> get<wbr/>Event<wbr/>Listeners<a href="#getEventListeners" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><li class="tsd-signature tsd-kind-icon">get<wbr/>Event<wbr/>Listeners<span class="tsd-signature-symbol">(</span>emitter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">_DOMEventTarget</span>, name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#getEventListeners">getEventListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:299</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Returns a copy of the array of listeners for the event named <code>eventName</code>.</p>
</div><div><p>For <code>EventEmitter</code>s this behaves exactly the same as calling <code>.listeners</code> on
the emitter.</p>
<p>For <code>EventTarget</code>s this is the only way to get the event listeners for the
event target. This is useful for debugging and diagnostic purposes.</p>
<pre><code class="language-js"><span class="hl-3">const</span><span class="hl-0"> { </span><span class="hl-4">getEventListeners</span><span class="hl-0">, </span><span class="hl-4">EventEmitter</span><span class="hl-0"> } = </span><span class="hl-2">require</span><span class="hl-0">(</span><span class="hl-5">'events'</span><span class="hl-0">);</span><br/><br/><span class="hl-0">{</span><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">ee</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">EventEmitter</span><span class="hl-0">();</span><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-2">listener</span><span class="hl-0"> = () </span><span class="hl-3">=></span><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-5">'Events are fun'</span><span class="hl-0">);</span><br/><span class="hl-0"> </span><span class="hl-6">ee</span><span class="hl-0">.</span><span class="hl-2">on</span><span class="hl-0">(</span><span class="hl-5">'foo'</span><span class="hl-0">, </span><span class="hl-6">listener</span><span class="hl-0">);</span><br/><span class="hl-0"> </span><span class="hl-2">getEventListeners</span><span class="hl-0">(</span><span class="hl-6">ee</span><span class="hl-0">, </span><span class="hl-5">'foo'</span><span class="hl-0">); </span><span class="hl-1">// [listener]</span><br/><span class="hl-0">}</span><br/><span class="hl-0">{</span><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">et</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">EventTarget</span><span class="hl-0">();</span><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-2">listener</span><span class="hl-0"> = () </span><span class="hl-3">=></span><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-5">'Events are fun'</span><span class="hl-0">);</span><br/><span class="hl-0"> </span><span class="hl-6">et</span><span class="hl-0">.</span><span class="hl-2">addEventListener</span><span class="hl-0">(</span><span class="hl-5">'foo'</span><span class="hl-0">, </span><span class="hl-6">listener</span><span class="hl-0">);</span><br/><span class="hl-0"> </span><span class="hl-2">getEventListeners</span><span class="hl-0">(</span><span class="hl-6">et</span><span class="hl-0">, </span><span class="hl-5">'foo'</span><span class="hl-0">); </span><span class="hl-1">// [listener]</span><br/><span class="hl-0">}</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v15.2.0, v14.17.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>emitter: <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">_DOMEventTarget</span></h5></li><li><h5>name: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Function</span><span class="tsd-signature-symbol">[]</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="listenerCount-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> listener<wbr/>Count<a href="#listenerCount-1" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><li class="tsd-signature tsd-kind-icon">listener<wbr/>Count<span class="tsd-signature-symbol">(</span>emitter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EventEmitter</span>, eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#listenerCount-1">listenerCount</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:271</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>A class method that returns the number of listeners for the given <code>eventName</code>registered on the given <code>emitter</code>.</p>
</div><div><pre><code class="language-js"><span class="hl-3">const</span><span class="hl-0"> { </span><span class="hl-4">EventEmitter</span><span class="hl-0">, </span><span class="hl-4">listenerCount</span><span class="hl-0"> } = </span><span class="hl-2">require</span><span class="hl-0">(</span><span class="hl-5">'events'</span><span class="hl-0">);</span><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">myEmitter</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">EventEmitter</span><span class="hl-0">();</span><br/><span class="hl-6">myEmitter</span><span class="hl-0">.</span><span class="hl-2">on</span><span class="hl-0">(</span><span class="hl-5">'event'</span><span class="hl-0">, () </span><span class="hl-3">=></span><span class="hl-0"> {});</span><br/><span class="hl-6">myEmitter</span><span class="hl-0">.</span><span class="hl-2">on</span><span class="hl-0">(</span><span class="hl-5">'event'</span><span class="hl-0">, () </span><span class="hl-3">=></span><span class="hl-0"> {});</span><br/><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-2">listenerCount</span><span class="hl-0">(</span><span class="hl-6">myEmitter</span><span class="hl-0">, </span><span class="hl-5">'event'</span><span class="hl-0">));</span><br/><span class="hl-1">// Prints: 2</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v0.9.12</p>
</dd><dt>deprecated</dt><dd><p>Since v3.2.0 - Use <code>listenerCount</code> instead.</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>emitter: <span class="tsd-signature-type">EventEmitter</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The emitter to query</p>
</div></div></li><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The event name</p>
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="on-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> on<a href="#on-1" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><li class="tsd-signature tsd-kind-icon">on<span class="tsd-signature-symbol">(</span>emitter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">EventEmitter</span>, eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">StaticEventEmitterOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">AsyncIterableIterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#on-1">on</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:254</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<pre><code class="language-js"><span class="hl-3">const</span><span class="hl-0"> { </span><span class="hl-4">on</span><span class="hl-0">, </span><span class="hl-4">EventEmitter</span><span class="hl-0"> } = </span><span class="hl-2">require</span><span class="hl-0">(</span><span class="hl-5">'events'</span><span class="hl-0">);</span>
</code></pre>
</div><div><p>(async () => {
const ee = new EventEmitter();</p>
<p> // Emit later on
process.nextTick(() => {
ee.emit('foo', 'bar');
ee.emit('foo', 42);
});</p>
<p> for await (const event of on(ee, 'foo')) {
// The execution of this inner block is synchronous and it
// processes one event at a time (even with await). Do not use
// if concurrent execution is required.
console.log(event); // prints ['bar'] [42]
}
// Unreachable here
})();</p>
<pre><code><br/><span class="hl-6">Returns</span><span class="hl-0"> </span><span class="hl-6">an</span><span class="hl-0"> </span><span class="hl-5">`AsyncIterator`</span><span class="hl-0"> </span><span class="hl-6">that</span><span class="hl-0"> </span><span class="hl-6">iterates</span><span class="hl-0"> </span><span class="hl-5">`eventName`</span><span class="hl-0"> </span><span class="hl-6">events</span><span class="hl-0">. </span><span class="hl-6">It</span><span class="hl-0"> </span><span class="hl-6">will</span><span class="hl-0"> </span><span class="hl-7">throw</span><br/><span class="hl-7">if</span><span class="hl-0"> </span><span class="hl-6">the</span><span class="hl-0"> </span><span class="hl-5">`EventEmitter`</span><span class="hl-0"> </span><span class="hl-6">emits</span><span class="hl-0"> </span><span class="hl-5">`'error'`</span><span class="hl-0">. </span><span class="hl-6">It</span><span class="hl-0"> </span><span class="hl-6">removes</span><span class="hl-0"> </span><span class="hl-6">all</span><span class="hl-0"> </span><span class="hl-6">listeners</span><span class="hl-0"> </span><span class="hl-6">when</span><br/><span class="hl-6">exiting</span><span class="hl-0"> </span><span class="hl-6">the</span><span class="hl-0"> </span><span class="hl-6">loop</span><span class="hl-0">. </span><span class="hl-6">The</span><span class="hl-0"> </span><span class="hl-5">`value`</span><span class="hl-0"> </span><span class="hl-6">returned</span><span class="hl-0"> </span><span class="hl-6">by</span><span class="hl-0"> </span><span class="hl-6">each</span><span class="hl-0"> </span><span class="hl-6">iteration</span><span class="hl-0"> </span><span class="hl-6">is</span><span class="hl-0"> </span><span class="hl-6">an</span><span class="hl-0"> </span><span class="hl-6">array</span><br/><span class="hl-6">composed</span><span class="hl-0"> </span><span class="hl-3">of</span><span class="hl-0"> </span><span class="hl-6">the</span><span class="hl-0"> </span><span class="hl-6">emitted</span><span class="hl-0"> </span><span class="hl-6">event</span><span class="hl-0"> </span><span class="hl-3">arguments</span><span class="hl-0">.</span><br/><br/><span class="hl-6">An</span><span class="hl-0"> </span><span class="hl-5">`AbortSignal`</span><span class="hl-0"> </span><span class="hl-6">can</span><span class="hl-0"> </span><span class="hl-6">be</span><span class="hl-0"> </span><span class="hl-6">used</span><span class="hl-0"> </span><span class="hl-6">to</span><span class="hl-0"> </span><span class="hl-6">cancel</span><span class="hl-0"> </span><span class="hl-6">waiting</span><span class="hl-0"> </span><span class="hl-6">on</span><span class="hl-0"> </span><span class="hl-10">events</span><span class="hl-0">:</span><br/><br/><span class="hl-5">```js</span><br/><span class="hl-5">const { on, EventEmitter } = require('events');</span><br/><span class="hl-5">const ac = new AbortController();</span><br/><br/><span class="hl-5">(async () => {</span><br/><span class="hl-5"> const ee = new EventEmitter();</span><br/><br/><span class="hl-5"> // Emit later on</span><br/><span class="hl-5"> process.nextTick(() => {</span><br/><span class="hl-5"> ee.emit('foo', 'bar');</span><br/><span class="hl-5"> ee.emit('foo', 42);</span><br/><span class="hl-5"> });</span><br/><br/><span class="hl-5"> for await (const event of on(ee, 'foo', { signal: ac.signal })) {</span><br/><span class="hl-5"> // The execution of this inner block is synchronous and it</span><br/><span class="hl-5"> // processes one event at a time (even with await). Do not use</span><br/><span class="hl-5"> // if concurrent execution is required.</span><br/><span class="hl-5"> console.log(event); // prints ['bar'] [42]</span><br/><span class="hl-5"> }</span><br/><span class="hl-5"> // Unreachable here</span><br/><span class="hl-5">})();</span><br/><br/><span class="hl-5">process.nextTick(() => ac.abort());</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v13.6.0, v12.16.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>emitter: <span class="tsd-signature-type">EventEmitter</span></h5></li><li><h5>eventName: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>The name of the event being listened for</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">StaticEventEmitterOptions</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">AsyncIterableIterator</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4><div><p>that iterates <code>eventName</code> events emitted by the <code>emitter</code></p>
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="once-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> once<a href="#once-1" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><li class="tsd-signature tsd-kind-icon">once<span class="tsd-signature-symbol">(</span>emitter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">_NodeEventTarget</span>, eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">StaticEventEmitterOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li><li class="tsd-signature tsd-kind-icon">once<span class="tsd-signature-symbol">(</span>emitter<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">_DOMEventTarget</span>, eventName<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">StaticEventEmitterOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#once-1">once</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:194</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<p>Creates a <code>Promise</code> that is fulfilled when the <code>EventEmitter</code> emits the given
event or that is rejected if the <code>EventEmitter</code> emits <code>'error'</code> while waiting.
The <code>Promise</code> will resolve with an array of all the arguments emitted to the
given event.</p>
</div><div><p>This method is intentionally generic and works with the web platform <a href="https://dom.spec.whatwg.org/#interface-eventtarget">EventTarget</a> interface, which has no special<code>'error'</code> event
semantics and does not listen to the <code>'error'</code> event.</p>
<pre><code class="language-js"><span class="hl-3">const</span><span class="hl-0"> { </span><span class="hl-4">once</span><span class="hl-0">, </span><span class="hl-4">EventEmitter</span><span class="hl-0"> } = </span><span class="hl-2">require</span><span class="hl-0">(</span><span class="hl-5">'events'</span><span class="hl-0">);</span><br/><br/><span class="hl-3">async</span><span class="hl-0"> </span><span class="hl-3">function</span><span class="hl-0"> </span><span class="hl-2">run</span><span class="hl-0">() {</span><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">ee</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">EventEmitter</span><span class="hl-0">();</span><br/><br/><span class="hl-0"> </span><span class="hl-6">process</span><span class="hl-0">.</span><span class="hl-2">nextTick</span><span class="hl-0">(() </span><span class="hl-3">=></span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-6">ee</span><span class="hl-0">.</span><span class="hl-2">emit</span><span class="hl-0">(</span><span class="hl-5">'myevent'</span><span class="hl-0">, </span><span class="hl-8">42</span><span class="hl-0">);</span><br/><span class="hl-0"> });</span><br/><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> [</span><span class="hl-4">value</span><span class="hl-0">] = </span><span class="hl-7">await</span><span class="hl-0"> </span><span class="hl-2">once</span><span class="hl-0">(</span><span class="hl-6">ee</span><span class="hl-0">, </span><span class="hl-5">'myevent'</span><span class="hl-0">);</span><br/><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-6">value</span><span class="hl-0">);</span><br/><br/><span class="hl-0"> </span><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">err</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-9">Error</span><span class="hl-0">(</span><span class="hl-5">'kaboom'</span><span class="hl-0">);</span><br/><span class="hl-0"> </span><span class="hl-6">process</span><span class="hl-0">.</span><span class="hl-2">nextTick</span><span class="hl-0">(() </span><span class="hl-3">=></span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-6">ee</span><span class="hl-0">.</span><span class="hl-2">emit</span><span class="hl-0">(</span><span class="hl-5">'error'</span><span class="hl-0">, </span><span class="hl-6">err</span><span class="hl-0">);</span><br/><span class="hl-0"> });</span><br/><br/><span class="hl-0"> </span><span class="hl-7">try</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-7">await</span><span class="hl-0"> </span><span class="hl-2">once</span><span class="hl-0">(</span><span class="hl-6">ee</span><span class="hl-0">, </span><span class="hl-5">'myevent'</span><span class="hl-0">);</span><br/><span class="hl-0"> } </span><span class="hl-7">catch</span><span class="hl-0"> (</span><span class="hl-6">err</span><span class="hl-0">) {</span><br/><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-5">'error happened'</span><span class="hl-0">, </span><span class="hl-6">err</span><span class="hl-0">);</span><br/><span class="hl-0"> }</span><br/><span class="hl-0">}</span><br/><br/><span class="hl-2">run</span><span class="hl-0">();</span>
</code></pre>
<p>The special handling of the <code>'error'</code> event is only used when <code>events.once()</code>is used to wait for another event. If <code>events.once()</code> is used to wait for the
'<code>error'</code> event itself, then it is treated as any other kind of event without
special handling:</p>
<pre><code class="language-js"><span class="hl-3">const</span><span class="hl-0"> { </span><span class="hl-4">EventEmitter</span><span class="hl-0">, </span><span class="hl-4">once</span><span class="hl-0"> } = </span><span class="hl-2">require</span><span class="hl-0">(</span><span class="hl-5">'events'</span><span class="hl-0">);</span><br/><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">ee</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">EventEmitter</span><span class="hl-0">();</span><br/><br/><span class="hl-2">once</span><span class="hl-0">(</span><span class="hl-6">ee</span><span class="hl-0">, </span><span class="hl-5">'error'</span><span class="hl-0">)</span><br/><span class="hl-0"> .</span><span class="hl-2">then</span><span class="hl-0">(([</span><span class="hl-6">err</span><span class="hl-0">]) </span><span class="hl-3">=></span><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-5">'ok'</span><span class="hl-0">, </span><span class="hl-6">err</span><span class="hl-0">.</span><span class="hl-6">message</span><span class="hl-0">))</span><br/><span class="hl-0"> .</span><span class="hl-2">catch</span><span class="hl-0">((</span><span class="hl-6">err</span><span class="hl-0">) </span><span class="hl-3">=></span><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-5">'error'</span><span class="hl-0">, </span><span class="hl-6">err</span><span class="hl-0">.</span><span class="hl-6">message</span><span class="hl-0">));</span><br/><br/><span class="hl-6">ee</span><span class="hl-0">.</span><span class="hl-2">emit</span><span class="hl-0">(</span><span class="hl-5">'error'</span><span class="hl-0">, </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-9">Error</span><span class="hl-0">(</span><span class="hl-5">'boom'</span><span class="hl-0">));</span><br/><br/><span class="hl-1">// Prints: ok boom</span>
</code></pre>
<p>An <code>AbortSignal</code> can be used to cancel waiting for the event:</p>
<pre><code class="language-js"><span class="hl-3">const</span><span class="hl-0"> { </span><span class="hl-4">EventEmitter</span><span class="hl-0">, </span><span class="hl-4">once</span><span class="hl-0"> } = </span><span class="hl-2">require</span><span class="hl-0">(</span><span class="hl-5">'events'</span><span class="hl-0">);</span><br/><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">ee</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">EventEmitter</span><span class="hl-0">();</span><br/><span class="hl-3">const</span><span class="hl-0"> </span><span class="hl-4">ac</span><span class="hl-0"> = </span><span class="hl-3">new</span><span class="hl-0"> </span><span class="hl-2">AbortController</span><span class="hl-0">();</span><br/><br/><span class="hl-3">async</span><span class="hl-0"> </span><span class="hl-3">function</span><span class="hl-0"> </span><span class="hl-2">foo</span><span class="hl-0">(</span><span class="hl-6">emitter</span><span class="hl-0">, </span><span class="hl-6">event</span><span class="hl-0">, </span><span class="hl-6">signal</span><span class="hl-0">) {</span><br/><span class="hl-0"> </span><span class="hl-7">try</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-7">await</span><span class="hl-0"> </span><span class="hl-2">once</span><span class="hl-0">(</span><span class="hl-6">emitter</span><span class="hl-0">, </span><span class="hl-6">event</span><span class="hl-0">, { </span><span class="hl-6">signal</span><span class="hl-0"> });</span><br/><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">log</span><span class="hl-0">(</span><span class="hl-5">'event emitted!'</span><span class="hl-0">);</span><br/><span class="hl-0"> } </span><span class="hl-7">catch</span><span class="hl-0"> (</span><span class="hl-6">error</span><span class="hl-0">) {</span><br/><span class="hl-0"> </span><span class="hl-7">if</span><span class="hl-0"> (</span><span class="hl-6">error</span><span class="hl-0">.</span><span class="hl-6">name</span><span class="hl-0"> === </span><span class="hl-5">'AbortError'</span><span class="hl-0">) {</span><br/><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">error</span><span class="hl-0">(</span><span class="hl-5">'Waiting for the event was canceled!'</span><span class="hl-0">);</span><br/><span class="hl-0"> } </span><span class="hl-7">else</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-6">console</span><span class="hl-0">.</span><span class="hl-2">error</span><span class="hl-0">(</span><span class="hl-5">'There was an error'</span><span class="hl-0">, </span><span class="hl-6">error</span><span class="hl-0">.</span><span class="hl-6">message</span><span class="hl-0">);</span><br/><span class="hl-0"> }</span><br/><span class="hl-0"> }</span><br/><span class="hl-0">}</span><br/><br/><span class="hl-2">foo</span><span class="hl-0">(</span><span class="hl-6">ee</span><span class="hl-0">, </span><span class="hl-5">'foo'</span><span class="hl-0">, </span><span class="hl-6">ac</span><span class="hl-0">.</span><span class="hl-6">signal</span><span class="hl-0">);</span><br/><span class="hl-6">ac</span><span class="hl-0">.</span><span class="hl-2">abort</span><span class="hl-0">(); </span><span class="hl-1">// Abort waiting for the event</span><br/><span class="hl-6">ee</span><span class="hl-0">.</span><span class="hl-2">emit</span><span class="hl-0">(</span><span class="hl-5">'foo'</span><span class="hl-0">); </span><span class="hl-1">// Prints: Waiting for the event was canceled!</span>
</code></pre>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v11.13.0, v10.16.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>emitter: <span class="tsd-signature-type">_NodeEventTarget</span></h5></li><li><h5>eventName: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">symbol</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">StaticEventEmitterOptions</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4></li><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#once-1">once</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:195</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>emitter: <span class="tsd-signature-type">_DOMEventTarget</span></h5></li><li><h5>eventName: <span class="tsd-signature-type">string</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">StaticEventEmitterOptions</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a id="setMaxListeners-1" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagStatic">Static</span> set<wbr/>Max<wbr/>Listeners<a href="#setMaxListeners-1" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><li class="tsd-signature tsd-kind-icon">set<wbr/>Max<wbr/>Listeners<span class="tsd-signature-symbol">(</span>n<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span>, <span class="tsd-signature-symbol">...</span>eventTargets<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">_DOMEventTarget</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Inherited from <a href="AbstractCursor.html">AbstractCursor</a>.<a href="AbstractCursor.html#setMaxListeners-1">setMaxListeners</a></p><ul><li>Defined in node_modules/@types/node/events.d.ts:317</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
<pre><code class="language-js"><span class="hl-3">const</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-4">setMaxListeners</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-4">EventEmitter</span><br/><span class="hl-0">} = </span><span class="hl-2">require</span><span class="hl-0">(</span><span class="hl-5">'events'</span><span class="hl-0">);</span>
</code></pre>
</div><div><p>const target = new EventTarget();
const emitter = new EventEmitter();</p>
<p>setMaxListeners(5, target, emitter);
```</p>
</div><dl class="tsd-comment-tags"><dt>since</dt><dd><p>v15.4.0</p>
</dd></dl></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> n: <span class="tsd-signature-type">number</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
<p>A non-negative number. The maximum number of listeners per <code>EventTarget</code> event.</p>
</div></div></li><li><h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>eventTargets: <span class="tsd-signature-symbol">(</span><span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">_DOMEventTarget</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li><li class="label tsd-is-external"><span>Internals</span></li><li class="label tsd-is-external"><span>Externals</span></li><li class=" tsd-kind-namespace tsd-is-external"><a href="../modules/BSON.html">BSON</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-class tsd-has-type-parameter"><a href="FindCursor.html" class="tsd-kind-icon">Find<wbr/>Cursor</a><ul><li class="tsd-kind-event tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="FindCursor.html#CLOSE" class="tsd-kind-icon">CLOSE</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#captureRejectionSymbol" class="tsd-kind-icon">capture<wbr/>Rejection<wbr/>Symbol</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#captureRejections" class="tsd-kind-icon">capture<wbr/>Rejections</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#defaultMaxListeners" class="tsd-kind-icon">default<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#errorMonitor" class="tsd-kind-icon">error<wbr/>Monitor</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#closed" class="tsd-kind-icon">closed</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#id" class="tsd-kind-icon">id</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#killed" class="tsd-kind-icon">killed</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#loadBalanced" class="tsd-kind-icon">load<wbr/>Balanced</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#namespace" class="tsd-kind-icon">namespace</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#readConcern" class="tsd-kind-icon">read<wbr/>Concern</a></li><li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#readPreference" class="tsd-kind-icon">read<wbr/>Preference</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#_asyncIterator_" class="tsd-kind-icon">[async<wbr/>Iterator]</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#addCursorFlag" class="tsd-kind-icon">add<wbr/>Cursor<wbr/>Flag</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#addListener" class="tsd-kind-icon">add<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#addQueryModifier" class="tsd-kind-icon">add<wbr/>Query<wbr/>Modifier</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#allowDiskUse" class="tsd-kind-icon">allow<wbr/>Disk<wbr/>Use</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#batchSize" class="tsd-kind-icon">batch<wbr/>Size</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#bufferedCount" class="tsd-kind-icon">buffered<wbr/>Count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="FindCursor.html#clone" class="tsd-kind-icon">clone</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#close" class="tsd-kind-icon">close</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#collation" class="tsd-kind-icon">collation</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#comment" class="tsd-kind-icon">comment</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#count" class="tsd-kind-icon">count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#emit" class="tsd-kind-icon">emit</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#eventNames" class="tsd-kind-icon">event<wbr/>Names</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#explain" class="tsd-kind-icon">explain</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#filter" class="tsd-kind-icon">filter</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#forEach" class="tsd-kind-icon">for<wbr/>Each</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#getMaxListeners" class="tsd-kind-icon">get<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#hasNext" class="tsd-kind-icon">has<wbr/>Next</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#hint" class="tsd-kind-icon">hint</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#limit" class="tsd-kind-icon">limit</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#listenerCount" class="tsd-kind-icon">listener<wbr/>Count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#listeners" class="tsd-kind-icon">listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-overwrite"><a href="FindCursor.html#map" class="tsd-kind-icon">map</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#max" class="tsd-kind-icon">max</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#maxAwaitTimeMS" class="tsd-kind-icon">max<wbr/>Await<wbr/>TimeMS</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="FindCursor.html#maxTimeMS" class="tsd-kind-icon">max<wbr/>TimeMS</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#min" class="tsd-kind-icon">min</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#next" class="tsd-kind-icon">next</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#off" class="tsd-kind-icon">off</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#on" class="tsd-kind-icon">on</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#once" class="tsd-kind-icon">once</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#prependListener" class="tsd-kind-icon">prepend<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#prependOnceListener" class="tsd-kind-icon">prepend<wbr/>Once<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter"><a href="FindCursor.html#project" class="tsd-kind-icon">project</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#rawListeners" class="tsd-kind-icon">raw<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#readBufferedDocuments" class="tsd-kind-icon">read<wbr/>Buffered<wbr/>Documents</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#removeAllListeners" class="tsd-kind-icon">remove<wbr/>All<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-has-type-parameter tsd-is-inherited"><a href="FindCursor.html#removeListener" class="tsd-kind-icon">remove<wbr/>Listener</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#returnKey" class="tsd-kind-icon">return<wbr/>Key</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#rewind" class="tsd-kind-icon">rewind</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#setMaxListeners" class="tsd-kind-icon">set<wbr/>Max<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#showRecordId" class="tsd-kind-icon">show<wbr/>Record<wbr/>Id</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#skip" class="tsd-kind-icon">skip</a></li><li class="tsd-kind-method tsd-parent-kind-class"><a href="FindCursor.html#sort" class="tsd-kind-icon">sort</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#stream" class="tsd-kind-icon">stream</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#toArray" class="tsd-kind-icon">to<wbr/>Array</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#tryNext" class="tsd-kind-icon">try<wbr/>Next</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#withReadConcern" class="tsd-kind-icon">with<wbr/>Read<wbr/>Concern</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="FindCursor.html#withReadPreference" class="tsd-kind-icon">with<wbr/>Read<wbr/>Preference</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#getEventListeners" class="tsd-kind-icon">get<wbr/>Event<wbr/>Listeners</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#listenerCount-1" class="tsd-kind-icon">listener<wbr/>Count</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#on-1" class="tsd-kind-icon">on</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#once-1" class="tsd-kind-icon">once</a></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static tsd-is-external"><a href="FindCursor.html#setMaxListeners-1" class="tsd-kind-icon">set<wbr/>Max<wbr/>Listeners</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li><li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>