diff options
author | Benety Goh <benety@mongodb.com> | 2015-03-25 13:23:31 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2015-03-25 13:23:31 -0400 |
commit | 23f55a53c3279a0a5f44aaa720ba4450889165c9 (patch) | |
tree | aa1cceaca6f38ee488317965fef385790428c728 /src/mongo/db/commands.h | |
parent | bd03079b0f93097c409c9b17a0ff1c852f30b356 (diff) | |
download | mongo-23f55a53c3279a0a5f44aaa720ba4450889165c9.tar.gz |
SERVER-17663 added Command::appendGetMoreResponseObject
Diffstat (limited to 'src/mongo/db/commands.h')
-rw-r--r-- | src/mongo/db/commands.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h index 0a3a14d5ac1..37b2750684e 100644 --- a/src/mongo/db/commands.h +++ b/src/mongo/db/commands.h @@ -317,6 +317,18 @@ namespace mutablebson { BSONObjBuilder* builder); /** + * Builds a getMore response object from the provided cursor identifiers and "nextBatch", + * and appends the response object to the provided builder under the field name "cursor". + * + * The response object has the following format: + * { id: <NumberLong>, ns: <String>, nextBatch: <Array> }. + */ + static void appendGetMoreResponseObject(long long cursorId, + StringData cursorNamespace, + BSONArray nextBatch, + BSONObjBuilder* builder); + + /** * Helper for setting a writeConcernError field in the command result object if * a writeConcern error occurs. */ |