summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/fetch.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec/fetch.h')
-rw-r--r--src/mongo/db/exec/fetch.h106
1 files changed, 53 insertions, 53 deletions
diff --git a/src/mongo/db/exec/fetch.h b/src/mongo/db/exec/fetch.h
index b43a38bb7eb..5fba058b730 100644
--- a/src/mongo/db/exec/fetch.h
+++ b/src/mongo/db/exec/fetch.h
@@ -37,75 +37,75 @@
namespace mongo {
- class RecordCursor;
+class RecordCursor;
- /**
- * This stage turns a RecordId into a BSONObj.
- *
- * In WorkingSetMember terms, it transitions from LOC_AND_IDX to LOC_AND_UNOWNED_OBJ by reading
- * the record at the provided loc. Returns verbatim any data that already has an object.
- *
- * Preconditions: Valid RecordId.
- */
- class FetchStage : public PlanStage {
- public:
- FetchStage(OperationContext* txn,
- WorkingSet* ws,
- PlanStage* child,
- const MatchExpression* filter,
- const Collection* collection);
-
- virtual ~FetchStage();
+/**
+ * This stage turns a RecordId into a BSONObj.
+ *
+ * In WorkingSetMember terms, it transitions from LOC_AND_IDX to LOC_AND_UNOWNED_OBJ by reading
+ * the record at the provided loc. Returns verbatim any data that already has an object.
+ *
+ * Preconditions: Valid RecordId.
+ */
+class FetchStage : public PlanStage {
+public:
+ FetchStage(OperationContext* txn,
+ WorkingSet* ws,
+ PlanStage* child,
+ const MatchExpression* filter,
+ const Collection* collection);
- virtual bool isEOF();
- virtual StageState work(WorkingSetID* out);
+ virtual ~FetchStage();
- virtual void saveState();
- virtual void restoreState(OperationContext* opCtx);
- virtual void invalidate(OperationContext* txn, const RecordId& dl, InvalidationType type);
+ virtual bool isEOF();
+ virtual StageState work(WorkingSetID* out);
- virtual std::vector<PlanStage*> getChildren() const;
+ virtual void saveState();
+ virtual void restoreState(OperationContext* opCtx);
+ virtual void invalidate(OperationContext* txn, const RecordId& dl, InvalidationType type);
- virtual StageType stageType() const { return STAGE_FETCH; }
+ virtual std::vector<PlanStage*> getChildren() const;
- PlanStageStats* getStats();
+ virtual StageType stageType() const {
+ return STAGE_FETCH;
+ }
- virtual const CommonStats* getCommonStats() const;
+ PlanStageStats* getStats();
- virtual const SpecificStats* getSpecificStats() const;
+ virtual const CommonStats* getCommonStats() const;
- static const char* kStageType;
+ virtual const SpecificStats* getSpecificStats() const;
- private:
+ static const char* kStageType;
- /**
- * If the member (with id memberID) passes our filter, set *out to memberID and return that
- * ADVANCED. Otherwise, free memberID and return NEED_TIME.
- */
- StageState returnIfMatches(WorkingSetMember* member, WorkingSetID memberID,
- WorkingSetID* out);
+private:
+ /**
+ * If the member (with id memberID) passes our filter, set *out to memberID and return that
+ * ADVANCED. Otherwise, free memberID and return NEED_TIME.
+ */
+ StageState returnIfMatches(WorkingSetMember* member, WorkingSetID memberID, WorkingSetID* out);
- OperationContext* _txn;
+ OperationContext* _txn;
- // Collection which is used by this stage. Used to resolve record ids retrieved by child
- // stages. The lifetime of the collection must supersede that of the stage.
- const Collection* _collection;
- // Used to fetch Records from _collection.
- std::unique_ptr<RecordCursor> _cursor;
+ // Collection which is used by this stage. Used to resolve record ids retrieved by child
+ // stages. The lifetime of the collection must supersede that of the stage.
+ const Collection* _collection;
+ // Used to fetch Records from _collection.
+ std::unique_ptr<RecordCursor> _cursor;
- // _ws is not owned by us.
- WorkingSet* _ws;
- std::unique_ptr<PlanStage> _child;
+ // _ws is not owned by us.
+ WorkingSet* _ws;
+ std::unique_ptr<PlanStage> _child;
- // The filter is not owned by us.
- const MatchExpression* _filter;
+ // The filter is not owned by us.
+ const MatchExpression* _filter;
- // If not Null, we use this rather than asking our child what to do next.
- WorkingSetID _idRetrying;
+ // If not Null, we use this rather than asking our child what to do next.
+ WorkingSetID _idRetrying;
- // Stats
- CommonStats _commonStats;
- FetchStats _specificStats;
- };
+ // Stats
+ CommonStats _commonStats;
+ FetchStats _specificStats;
+};
} // namespace mongo