summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/accumulator.h
diff options
context:
space:
mode:
authorSally McNichols <sally.mcnichols@mongodb.com>2016-07-26 17:52:36 -0400
committerSally McNichols <sally.mcnichols@mongodb.com>2016-07-26 17:52:36 -0400
commit39d63ea21d7236a88616e89cb8381b34414ac349 (patch)
tree2acb3ee8c69049c8edb467e9ee122360c945c600 /src/mongo/db/pipeline/accumulator.h
parentf22f6e220e5471c0876938bd0812ffa62901e3a7 (diff)
downloadmongo-39d63ea21d7236a88616e89cb8381b34414ac349.tar.gz
SERVER-24152 add $bucketAuto aggregation stage
Diffstat (limited to 'src/mongo/db/pipeline/accumulator.h')
-rw-r--r--src/mongo/db/pipeline/accumulator.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/accumulator.h b/src/mongo/db/pipeline/accumulator.h
index 81b84bf1982..eba774295f2 100644
--- a/src/mongo/db/pipeline/accumulator.h
+++ b/src/mongo/db/pipeline/accumulator.h
@@ -37,6 +37,7 @@
#include "mongo/base/init.h"
#include "mongo/bson/bsontypes.h"
+#include "mongo/db/pipeline/expression.h"
#include "mongo/db/pipeline/expression_context.h"
#include "mongo/db/pipeline/value.h"
#include "mongo/db/pipeline/value_comparator.h"
@@ -103,6 +104,13 @@ public:
*/
static Factory getFactory(StringData name);
+ /**
+ * Parses a BSONElement that is an accumulator field, and returns a pair containing (field name,
+ * accumulator expression).
+ */
+ static std::pair<StringData, boost::intrusive_ptr<Expression>> parseAccumulator(
+ const BSONElement& elem, const VariablesParseState& vps);
+
virtual bool isAssociative() const {
return false;
}