Skip to content

Commit 4631e34

Browse files
committed
docs: add comment for base64 string
1 parent 7edb948 commit 4631e34

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/cmap/wire_protocol/responses.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,15 @@ export class MongoDBResponse extends OnDemandDocument {
122122

123123
/** @internal */
124124
export class CursorResponse extends MongoDBResponse {
125+
/**
126+
* This is a BSON document containing the following:
127+
* ```
128+
* { ok: 1, cursor: { id: 0n, nextBatch: new Array(0) } }
129+
* ```
130+
* This is used when the client side findCursor is closed by tracking the number returned and limit
131+
* to avoid an extra round trip. It provides a cursor response that the server _would_ return _if_
132+
* that round trip were to be made.
133+
*/
125134
static emptyGetMore = new CursorResponse(
126135
Buffer.from(
127136
'NgAAABBvawABAAAAA2N1cnNvcgAhAAAAEmlkAAAAAAAAAAAABG5leHRCYXRjaAAFAAAAAAAA',

0 commit comments

Comments
 (0)