diff options
author | Jason Rassi <rassi@10gen.com> | 2015-08-28 02:17:49 -0400 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2015-08-28 15:32:04 -0400 |
commit | 450dc96f2e57bea4af7929d2ad10d3afb774e410 (patch) | |
tree | 1b5c9bebfee570f77fa75d273d8d23cd4e2942e8 /src/mongo/db/query/cursor_response.h | |
parent | 1c5fdf89ee6fd377096b9369b94ee490792a22b8 (diff) | |
download | mongo-450dc96f2e57bea4af7929d2ad10d3afb774e410.tar.gz |
SERVER-19569 CursorResponse::toBSON() ability to return first batch
Diffstat (limited to 'src/mongo/db/query/cursor_response.h')
-rw-r--r-- | src/mongo/db/query/cursor_response.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mongo/db/query/cursor_response.h b/src/mongo/db/query/cursor_response.h index e606dcd1559..ac15477e28c 100644 --- a/src/mongo/db/query/cursor_response.h +++ b/src/mongo/db/query/cursor_response.h @@ -66,6 +66,11 @@ void appendGetMoreResponseObject(long long cursorId, BSONObjBuilder* builder); struct CursorResponse { + enum class ResponseType { + InitialResponse, + SubsequentResponse, + }; + /** * Constructs from values for each of the fields. */ @@ -82,8 +87,8 @@ struct CursorResponse { /** * Converts this response to its raw BSON representation. */ - BSONObj toBSON() const; - void addToBSON(BSONObjBuilder* builder) const; + BSONObj toBSON(ResponseType responseType) const; + void addToBSON(ResponseType responseType, BSONObjBuilder* builder) const; const NamespaceString nss; const CursorId cursorId; |