summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/sort.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec/sort.h')
-rw-r--r--src/mongo/db/exec/sort.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/mongo/db/exec/sort.h b/src/mongo/db/exec/sort.h
index e67305504ba..96da33b36b7 100644
--- a/src/mongo/db/exec/sort.h
+++ b/src/mongo/db/exec/sort.h
@@ -47,9 +47,10 @@ namespace mongo {
// Parameters that must be provided to a SortStage
class SortStageParams {
public:
- SortStageParams() : collection( NULL), limit(0) { }
+ SortStageParams() : collection(NULL), limit(0) { }
- Collection* collection;
+ // Used for resolving DiskLocs to BSON
+ const Collection* collection;
// How we're sorting.
BSONObj pattern;
@@ -73,7 +74,7 @@ namespace mongo {
* ensure that the value we select to sort by is within bounds generated by
* executing 'queryObj' using the virtual index with key pattern 'sortSpec'.
*/
- SortStageKeyGenerator(Collection* collection,
+ SortStageKeyGenerator(const Collection* collection,
const BSONObj& sortSpec,
const BSONObj& queryObj);
@@ -104,7 +105,8 @@ namespace mongo {
void getBoundsForSort(const BSONObj& queryObj,
const BSONObj& sortObj);
- Collection* _collection;
+ // Not owned by us
+ const Collection* _collection;
// The object that we use to call woCompare on our resulting key. Is equal to _rawSortSpec
// unless we have some $meta expressions. Each $meta expression has a default sort order.
@@ -160,7 +162,8 @@ namespace mongo {
// Query Stage
//
- Collection* _collection;
+ // Not owned by us.
+ const Collection* _collection;
// Not owned by us.
WorkingSet* _ws;