summaryrefslogtreecommitdiff
path: root/src/mongo/db/update
diff options
context:
space:
mode:
authorJames Wahlin <james@mongodb.com>2017-06-29 13:41:44 -0400
committerJames Wahlin <james@mongodb.com>2017-07-21 11:18:54 -0400
commita7164c0527ac1f231d12a889bf6d16b264af338e (patch)
tree47994590d41924ca1c6cff09f6f1aafe25e8792c /src/mongo/db/update
parente6032315026a446d1c8eef647b0bd6f2e82f2edc (diff)
downloadmongo-a7164c0527ac1f231d12a889bf6d16b264af338e.tar.gz
SERVER-29814 Move BSONObj::MatchType/BSONElement::getGtLtOp() to matcher
Diffstat (limited to 'src/mongo/db/update')
-rw-r--r--src/mongo/db/update/pull_node.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/update/pull_node.cpp b/src/mongo/db/update/pull_node.cpp
index 45052c0c0f9..4d9c9c2fa09 100644
--- a/src/mongo/db/update/pull_node.cpp
+++ b/src/mongo/db/update/pull_node.cpp
@@ -129,7 +129,8 @@ Status PullNode::init(BSONElement modExpr, const CollatorInterface* collator) {
try {
if (modExpr.type() == mongo::Object &&
- modExpr.embeddedObject().firstElement().getGtLtOp(-1) == -1) {
+ !MatchExpressionParser::parsePathAcceptingKeyword(
+ modExpr.embeddedObject().firstElement())) {
_matcher = stdx::make_unique<ObjectMatcher>(modExpr.embeddedObject(), collator);
} else if (modExpr.type() == mongo::Object || modExpr.type() == mongo::RegEx) {
_matcher = stdx::make_unique<WrappedObjectMatcher>(modExpr, collator);