summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/expression.cpp
diff options
context:
space:
mode:
authorIan Boros <ian.boros@mongodb.com>2019-10-21 22:49:04 +0000
committerevergreen <evergreen@mongodb.com>2019-10-21 22:49:04 +0000
commit1b0927456ed31f6903cdeab64217ada8415f0c95 (patch)
tree9188241c22a047f8a2c9448b3be68e13b9871c7d /src/mongo/db/pipeline/expression.cpp
parent5b749ef0105d92a2a3318c01d622f25201cd7bb8 (diff)
downloadmongo-1b0927456ed31f6903cdeab64217ada8415f0c95.tar.gz
SERVER-42988 allow agg-style object syntax in find() projection
Diffstat (limited to 'src/mongo/db/pipeline/expression.cpp')
-rw-r--r--src/mongo/db/pipeline/expression.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/expression.cpp b/src/mongo/db/pipeline/expression.cpp
index e69ff21aa5d..19658f2e005 100644
--- a/src/mongo/db/pipeline/expression.cpp
+++ b/src/mongo/db/pipeline/expression.cpp
@@ -191,6 +191,10 @@ intrusive_ptr<Expression> Expression::parseOperand(
}
}
+bool Expression::isExpressionName(StringData name) {
+ return parserMap.find(name) != parserMap.end();
+}
+
namespace {
/**
* UTF-8 multi-byte code points consist of one leading byte of the form 11xxxxxx, and potentially