diff options
author | Bernard Gorman <bernard.gorman@mongodb.com> | 2017-03-05 16:00:47 +0000 |
---|---|---|
committer | Bernard Gorman <bernard.gorman@mongodb.com> | 2017-03-15 08:51:47 +0000 |
commit | 1b98ea650d24ab1718bc1669729431ffaf066337 (patch) | |
tree | cca0ba7d8c25c7b29a9efb560bdbb4f1174f487c /src/mongo/db/pipeline/aggregation_request.h | |
parent | 4948241998903e628ea3c18204191e71ee4b3896 (diff) | |
download | mongo-1b98ea650d24ab1718bc1669729431ffaf066337.tar.gz |
SERVER-28128 Add support for a "comment" parameter to the aggregate...
... command
Diffstat (limited to 'src/mongo/db/pipeline/aggregation_request.h')
-rw-r--r-- | src/mongo/db/pipeline/aggregation_request.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/aggregation_request.h b/src/mongo/db/pipeline/aggregation_request.h index 156d397cbb0..935b98fed97 100644 --- a/src/mongo/db/pipeline/aggregation_request.h +++ b/src/mongo/db/pipeline/aggregation_request.h @@ -56,6 +56,7 @@ public: static const StringData kExplainName; static const StringData kAllowDiskUseName; static const StringData kHintName; + static const StringData kCommentName; static const long long kDefaultBatchSize; @@ -131,6 +132,10 @@ public: return _hint; } + const std::string& getComment() const { + return _comment; + } + boost::optional<ExplainOptions::Verbosity> getExplain() const { return _explainMode; } @@ -155,6 +160,10 @@ public: _hint = hint.getOwned(); } + void setComment(const std::string& comment) { + _comment = comment; + } + void setExplain(boost::optional<ExplainOptions::Verbosity> verbosity) { _explainMode = verbosity; } @@ -191,6 +200,9 @@ private: // {$hint: <String>}, where <String> is the index name hinted. BSONObj _hint; + // The comment parameter attached to this aggregation. + std::string _comment; + // The explain mode to use, or boost::none if this is not a request for an aggregation explain. boost::optional<ExplainOptions::Verbosity> _explainMode; |