summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops
diff options
context:
space:
mode:
authorDavid Hatch <david.hatch@mongodb.com>2016-06-01 10:39:21 -0400
committerDavid Hatch <david.hatch@mongodb.com>2016-06-03 15:48:07 -0400
commit7c3c0f3bcb487b16ff556d06a4fd66e0fb67de1c (patch)
tree41b472545759aa21aff247152c09e92a825119f8 /src/mongo/db/ops
parentee7acb15457859045419ce597ef7319ae775c4f3 (diff)
downloadmongo-7c3c0f3bcb487b16ff556d06a4fd66e0fb67de1c.tar.gz
SERVER-24118 Rename LiteParsedQuery to QueryRequest.
Diffstat (limited to 'src/mongo/db/ops')
-rw-r--r--src/mongo/db/ops/parsed_delete.cpp16
-rw-r--r--src/mongo/db/ops/parsed_update.cpp16
-rw-r--r--src/mongo/db/ops/update_driver.cpp6
3 files changed, 19 insertions, 19 deletions
diff --git a/src/mongo/db/ops/parsed_delete.cpp b/src/mongo/db/ops/parsed_delete.cpp
index b2f723e455e..b22441e94e5 100644
--- a/src/mongo/db/ops/parsed_delete.cpp
+++ b/src/mongo/db/ops/parsed_delete.cpp
@@ -77,11 +77,11 @@ Status ParsedDelete::parseQueryToCQ() {
// The projection needs to be applied after the delete operation, so we do not specify a
// projection during canonicalization.
- auto lpq = stdx::make_unique<LiteParsedQuery>(_request->getNamespaceString());
- lpq->setFilter(_request->getQuery());
- lpq->setSort(_request->getSort());
- lpq->setCollation(_request->getCollation());
- lpq->setExplain(_request->isExplain());
+ auto qr = stdx::make_unique<QueryRequest>(_request->getNamespaceString());
+ qr->setFilter(_request->getQuery());
+ qr->setSort(_request->getSort());
+ qr->setCollation(_request->getCollation());
+ qr->setExplain(_request->isExplain());
// Limit should only used for the findAndModify command when a sort is specified. If a sort
// is requested, we want to use a top-k sort for efficiency reasons, so should pass the
@@ -90,10 +90,10 @@ Status ParsedDelete::parseQueryToCQ() {
// has not actually deleted a document. This behavior is fine for findAndModify, but should
// not apply to deletes in general.
if (!_request->isMulti() && !_request->getSort().isEmpty()) {
- lpq->setLimit(1);
+ qr->setLimit(1);
}
- auto statusWithCQ = CanonicalQuery::canonicalize(_txn, std::move(lpq), extensionsCallback);
+ auto statusWithCQ = CanonicalQuery::canonicalize(_txn, std::move(qr), extensionsCallback);
if (statusWithCQ.isOK()) {
_canonicalQuery = std::move(statusWithCQ.getValue());
@@ -118,7 +118,7 @@ PlanExecutor::YieldPolicy ParsedDelete::yieldPolicy() const {
bool ParsedDelete::isIsolated() const {
return _canonicalQuery.get() ? _canonicalQuery->isIsolated()
- : LiteParsedQuery::isQueryIsolated(_request->getQuery());
+ : QueryRequest::isQueryIsolated(_request->getQuery());
}
bool ParsedDelete::hasParsedQuery() const {
diff --git a/src/mongo/db/ops/parsed_update.cpp b/src/mongo/db/ops/parsed_update.cpp
index bccd6491048..a6cb8b97a81 100644
--- a/src/mongo/db/ops/parsed_update.cpp
+++ b/src/mongo/db/ops/parsed_update.cpp
@@ -92,11 +92,11 @@ Status ParsedUpdate::parseQueryToCQ() {
// The projection needs to be applied after the update operation, so we do not specify a
// projection during canonicalization.
- auto lpq = stdx::make_unique<LiteParsedQuery>(_request->getNamespaceString());
- lpq->setFilter(_request->getQuery());
- lpq->setSort(_request->getSort());
- lpq->setCollation(_request->getCollation());
- lpq->setExplain(_request->isExplain());
+ auto qr = stdx::make_unique<QueryRequest>(_request->getNamespaceString());
+ qr->setFilter(_request->getQuery());
+ qr->setSort(_request->getSort());
+ qr->setCollation(_request->getCollation());
+ qr->setExplain(_request->isExplain());
// Limit should only used for the findAndModify command when a sort is specified. If a sort
// is requested, we want to use a top-k sort for efficiency reasons, so should pass the
@@ -106,10 +106,10 @@ Status ParsedUpdate::parseQueryToCQ() {
// not apply to update in general.
// TODO SERVER-23473: Pass the collation to canonicalize().
if (!_request->isMulti() && !_request->getSort().isEmpty()) {
- lpq->setLimit(1);
+ qr->setLimit(1);
}
- auto statusWithCQ = CanonicalQuery::canonicalize(_txn, std::move(lpq), extensionsCallback);
+ auto statusWithCQ = CanonicalQuery::canonicalize(_txn, std::move(qr), extensionsCallback);
if (statusWithCQ.isOK()) {
_canonicalQuery = std::move(statusWithCQ.getValue());
}
@@ -146,7 +146,7 @@ PlanExecutor::YieldPolicy ParsedUpdate::yieldPolicy() const {
bool ParsedUpdate::isIsolated() const {
return _canonicalQuery.get() ? _canonicalQuery->isIsolated()
- : LiteParsedQuery::isQueryIsolated(_request->getQuery());
+ : QueryRequest::isQueryIsolated(_request->getQuery());
}
bool ParsedUpdate::hasParsedQuery() const {
diff --git a/src/mongo/db/ops/update_driver.cpp b/src/mongo/db/ops/update_driver.cpp
index fad283493cd..b488bad70e7 100644
--- a/src/mongo/db/ops/update_driver.cpp
+++ b/src/mongo/db/ops/update_driver.cpp
@@ -180,9 +180,9 @@ Status UpdateDriver::populateDocumentWithQueryFields(OperationContext* txn,
// We canonicalize the query to collapse $and/$or, and the namespace is not needed. Also,
// because this is for the upsert case, where we insert a new document if one was not found, the
// $where/$text clauses do not make sense, hence empty ExtensionsCallback.
- auto lpq = stdx::make_unique<LiteParsedQuery>(NamespaceString(""));
- lpq->setFilter(query);
- auto statusWithCQ = CanonicalQuery::canonicalize(txn, std::move(lpq), ExtensionsCallbackNoop());
+ auto qr = stdx::make_unique<QueryRequest>(NamespaceString(""));
+ qr->setFilter(query);
+ auto statusWithCQ = CanonicalQuery::canonicalize(txn, std::move(qr), ExtensionsCallbackNoop());
if (!statusWithCQ.isOK()) {
return statusWithCQ.getStatus();
}