File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -126,6 +126,17 @@ function throwUnsupportedError() {
126
126
127
127
/** @internal */
128
128
export class CursorResponse extends MongoDBResponse {
129
+ static emptyGetMore = new CursorResponse (
130
+ Buffer . from (
131
+ 'NgAAABBvawABAAAAA2N1cnNvcgAhAAAAEmlkAAAAAAAAAAAABG5leHRCYXRjaAAFAAAAAAAA' ,
132
+ 'base64'
133
+ )
134
+ ) ;
135
+
136
+ static override is ( value : unknown ) : value is CursorResponse {
137
+ return value instanceof CursorResponse ;
138
+ }
139
+
129
140
public id : Long | null = null ;
130
141
public ns : MongoDBNamespace | null = null ;
131
142
public documents : any | null = null ;
@@ -183,8 +194,4 @@ export class CursorResponse extends MongoDBResponse {
183
194
push : { value : throwUnsupportedError }
184
195
} ) ;
185
196
}
186
-
187
- static override is ( value : unknown ) : value is CursorResponse {
188
- return value instanceof CursorResponse ;
189
- }
190
197
}
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ export class FindCursor<TSchema = any> extends AbstractCursor<TSchema> {
110
110
// instead, if we determine there are no more documents to request from the server, we preemptively
111
111
// close the cursor
112
112
}
113
- return { cursor : { id : Long . ZERO , nextBatch : [ ] } } ;
113
+ return CursorResponse . emptyGetMore ;
114
114
}
115
115
}
116
116
You can’t perform that action at this time.
0 commit comments