summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/internal_plans.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query/internal_plans.h')
-rw-r--r--src/mongo/db/query/internal_plans.h85
1 files changed, 43 insertions, 42 deletions
diff --git a/src/mongo/db/query/internal_plans.h b/src/mongo/db/query/internal_plans.h
index d9e763828ca..3b21e3a4f1e 100644
--- a/src/mongo/db/query/internal_plans.h
+++ b/src/mongo/db/query/internal_plans.h
@@ -33,52 +33,53 @@
namespace mongo {
- class BSONObj;
- class Collection;
- class IndexDescriptor;
- class OperationContext;
- class PlanExecutor;
+class BSONObj;
+class Collection;
+class IndexDescriptor;
+class OperationContext;
+class PlanExecutor;
- /**
- * The internal planner is a one-stop shop for "off-the-shelf" plans. Most internal procedures
- * that do not require advanced queries could be served by plans already in here.
- */
- class InternalPlanner {
- public:
- enum Direction {
- FORWARD = 1,
- BACKWARD = -1,
- };
-
- enum IndexScanOptions {
- // The client is interested in the default outputs of an index scan: BSONObj of the key,
- // RecordId of the record that's indexed. The client does its own fetching if required.
- IXSCAN_DEFAULT = 0,
+/**
+ * The internal planner is a one-stop shop for "off-the-shelf" plans. Most internal procedures
+ * that do not require advanced queries could be served by plans already in here.
+ */
+class InternalPlanner {
+public:
+ enum Direction {
+ FORWARD = 1,
+ BACKWARD = -1,
+ };
- // The client wants the fetched object and the RecordId that refers to it. Delegating
- // the fetch to the runner allows fetching outside of a lock.
- IXSCAN_FETCH = 1,
- };
+ enum IndexScanOptions {
+ // The client is interested in the default outputs of an index scan: BSONObj of the key,
+ // RecordId of the record that's indexed. The client does its own fetching if required.
+ IXSCAN_DEFAULT = 0,
- /**
- * Return a collection scan. Caller owns pointer.
- */
- static PlanExecutor* collectionScan(OperationContext* txn,
- StringData ns,
- Collection* collection,
- const Direction direction = FORWARD,
- const RecordId startLoc = RecordId());
+ // The client wants the fetched object and the RecordId that refers to it. Delegating
+ // the fetch to the runner allows fetching outside of a lock.
+ IXSCAN_FETCH = 1,
+ };
- /**
- * Return an index scan. Caller owns returned pointer.
- */
- static PlanExecutor* indexScan(OperationContext* txn,
- const Collection* collection,
- const IndexDescriptor* descriptor,
- const BSONObj& startKey, const BSONObj& endKey,
- bool endKeyInclusive, Direction direction = FORWARD,
- int options = 0);
+ /**
+ * Return a collection scan. Caller owns pointer.
+ */
+ static PlanExecutor* collectionScan(OperationContext* txn,
+ StringData ns,
+ Collection* collection,
+ const Direction direction = FORWARD,
+ const RecordId startLoc = RecordId());
- };
+ /**
+ * Return an index scan. Caller owns returned pointer.
+ */
+ static PlanExecutor* indexScan(OperationContext* txn,
+ const Collection* collection,
+ const IndexDescriptor* descriptor,
+ const BSONObj& startKey,
+ const BSONObj& endKey,
+ bool endKeyInclusive,
+ Direction direction = FORWARD,
+ int options = 0);
+};
} // namespace mongo