summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/query_planner.h
diff options
context:
space:
mode:
authorHari Khalsa <hkhalsa@10gen.com>2013-08-01 11:01:23 -0400
committerHari Khalsa <hkhalsa@10gen.com>2013-08-05 10:46:23 -0400
commitbd0cdbf21d2e91a4b63db6d092378a86f058c73d (patch)
tree0c4797e8dffcbb1aa3db47b52e995b0f21a58ebc /src/mongo/db/query/query_planner.h
parent00eeec1ab83c8f4921d1bc1352221168a3a01900 (diff)
downloadmongo-bd0cdbf21d2e91a4b63db6d092378a86f058c73d.tar.gz
SERVER-10376 SERVER-10026 end-to-end part 1: run non-indexed queries
Diffstat (limited to 'src/mongo/db/query/query_planner.h')
-rw-r--r--src/mongo/db/query/query_planner.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/mongo/db/query/query_planner.h b/src/mongo/db/query/query_planner.h
index beec11f136c..dcfc5ecf9d2 100644
--- a/src/mongo/db/query/query_planner.h
+++ b/src/mongo/db/query/query_planner.h
@@ -16,6 +16,7 @@
#pragma once
+#include "mongo/db/query/canonical_query.h"
#include "mongo/db/query/query_solution.h"
namespace mongo {
@@ -32,8 +33,18 @@ namespace mongo {
*
* Caller owns the pointers in *out.
*/
- static void plan(const CanonicalQuery& query, vector<QuerySolution*> *out) {
- }
+ static void plan(const CanonicalQuery& query, vector<QuerySolution*>* out);
+
+ private:
+ /**
+ * Returns true if the tree rooted at 'node' requires an index to answer the query. There
+ * is a default solution for every plan that is a collection scan + a filter for the full
+ * query. We can use this default solution when the query doesn't require an index.
+ *
+ * TODO: When we create plans with indices, we'll want to know which nodes require an index
+ * and what the parents of those nodes are.
+ */
+ static bool requiresIndex(const MatchExpression* node);
};
} // namespace mongo