summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/get_executor_test.cpp
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2016-05-05 17:33:34 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2016-05-10 16:00:35 -0400
commit8f8043d6128813e9862b5a5c30a90d007d92c363 (patch)
treec5cf74eab1ad31f171b5fef90d39d4247df6b086 /src/mongo/db/query/get_executor_test.cpp
parent87f738623ffe55535fde1462cda5d9715893e713 (diff)
downloadmongo-8f8043d6128813e9862b5a5c30a90d007d92c363.tar.gz
SERVER-24045 Refactor CanonicalQuery::canonicalize()
Diffstat (limited to 'src/mongo/db/query/get_executor_test.cpp')
-rw-r--r--src/mongo/db/query/get_executor_test.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/query/get_executor_test.cpp b/src/mongo/db/query/get_executor_test.cpp
index 630eb00ca40..bc8d6c40669 100644
--- a/src/mongo/db/query/get_executor_test.cpp
+++ b/src/mongo/db/query/get_executor_test.cpp
@@ -56,11 +56,12 @@ unique_ptr<CanonicalQuery> canonicalize(const char* queryStr,
QueryTestServiceContext serviceContext;
auto txn = serviceContext.makeOperationContext();
- BSONObj queryObj = fromjson(queryStr);
- BSONObj sortObj = fromjson(sortStr);
- BSONObj projObj = fromjson(projStr);
+ auto lpq = stdx::make_unique<LiteParsedQuery>(nss);
+ lpq->setFilter(fromjson(queryStr));
+ lpq->setSort(fromjson(sortStr));
+ lpq->setProj(fromjson(projStr));
auto statusWithCQ = CanonicalQuery::canonicalize(
- txn.get(), nss, queryObj, sortObj, projObj, ExtensionsCallbackDisallowExtensions());
+ txn.get(), std::move(lpq), ExtensionsCallbackDisallowExtensions());
ASSERT_OK(statusWithCQ.getStatus());
return std::move(statusWithCQ.getValue());
}