summaryrefslogtreecommitdiff
path: root/src/mongo/db/query
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query')
-rw-r--r--src/mongo/db/query/canonical_query.h14
-rw-r--r--src/mongo/db/query/explain_plan.h2
-rw-r--r--src/mongo/db/query/index_bounds.h20
-rw-r--r--src/mongo/db/query/index_bounds_builder.h10
-rw-r--r--src/mongo/db/query/index_entry.h8
-rw-r--r--src/mongo/db/query/index_tag.h2
-rw-r--r--src/mongo/db/query/interval.h4
-rw-r--r--src/mongo/db/query/lite_parsed_query.h22
-rw-r--r--src/mongo/db/query/parsed_projection.h4
-rw-r--r--src/mongo/db/query/plan_cache.h2
-rw-r--r--src/mongo/db/query/plan_enumerator.h44
-rw-r--r--src/mongo/db/query/plan_ranker.h2
-rw-r--r--src/mongo/db/query/planner_access.h14
-rw-r--r--src/mongo/db/query/planner_ixselect.h18
-rw-r--r--src/mongo/db/query/query_planner.h4
-rw-r--r--src/mongo/db/query/query_planner_common.h4
-rw-r--r--src/mongo/db/query/query_planner_params.h2
-rw-r--r--src/mongo/db/query/query_planner_test_lib.h2
-rw-r--r--src/mongo/db/query/query_solution.h52
-rw-r--r--src/mongo/db/query/runner.h4
-rw-r--r--src/mongo/db/query/type_explain.h2
21 files changed, 118 insertions, 118 deletions
diff --git a/src/mongo/db/query/canonical_query.h b/src/mongo/db/query/canonical_query.h
index 8c3db4ed204..d4c7626e816 100644
--- a/src/mongo/db/query/canonical_query.h
+++ b/src/mongo/db/query/canonical_query.h
@@ -67,13 +67,13 @@ namespace mongo {
const MatchExpressionParser::WhereCallback& whereCallback =
MatchExpressionParser::WhereCallback());
- static Status canonicalize(const string& ns,
+ static Status canonicalize(const std::string& ns,
const BSONObj& query,
CanonicalQuery** out,
const MatchExpressionParser::WhereCallback& whereCallback =
MatchExpressionParser::WhereCallback());
- static Status canonicalize(const string& ns,
+ static Status canonicalize(const std::string& ns,
const BSONObj& query,
long long skip,
long long limit,
@@ -81,7 +81,7 @@ namespace mongo {
const MatchExpressionParser::WhereCallback& whereCallback =
MatchExpressionParser::WhereCallback());
- static Status canonicalize(const string& ns,
+ static Status canonicalize(const std::string& ns,
const BSONObj& query,
const BSONObj& sort,
const BSONObj& proj,
@@ -89,7 +89,7 @@ namespace mongo {
const MatchExpressionParser::WhereCallback& whereCallback =
MatchExpressionParser::WhereCallback());
- static Status canonicalize(const string& ns,
+ static Status canonicalize(const std::string& ns,
const BSONObj& query,
const BSONObj& sort,
const BSONObj& proj,
@@ -99,7 +99,7 @@ namespace mongo {
const MatchExpressionParser::WhereCallback& whereCallback =
MatchExpressionParser::WhereCallback());
- static Status canonicalize(const string& ns,
+ static Status canonicalize(const std::string& ns,
const BSONObj& query,
const BSONObj& sort,
const BSONObj& proj,
@@ -110,7 +110,7 @@ namespace mongo {
const MatchExpressionParser::WhereCallback& whereCallback =
MatchExpressionParser::WhereCallback());
- static Status canonicalize(const string& ns,
+ static Status canonicalize(const std::string& ns,
const BSONObj& query,
const BSONObj& sort,
const BSONObj& proj,
@@ -132,7 +132,7 @@ namespace mongo {
static bool isSimpleIdQuery(const BSONObj& query);
// What namespace is this query over?
- const string& ns() const { return _pq->ns(); }
+ const std::string& ns() const { return _pq->ns(); }
//
// Accessors for the query
diff --git a/src/mongo/db/query/explain_plan.h b/src/mongo/db/query/explain_plan.h
index 7ffbd489914..1a25dbb9322 100644
--- a/src/mongo/db/query/explain_plan.h
+++ b/src/mongo/db/query/explain_plan.h
@@ -68,7 +68,7 @@ namespace mongo {
TypeExplain** explain);
/**
- * Returns a short plan summary string describing the leaves of the query solution.
+ * Returns a short plan summary std::string describing the leaves of the query solution.
*
* Used for logging.
*/
diff --git a/src/mongo/db/query/index_bounds.h b/src/mongo/db/query/index_bounds.h
index 8bf955aadaf..b5236d2d4e4 100644
--- a/src/mongo/db/query/index_bounds.h
+++ b/src/mongo/db/query/index_bounds.h
@@ -41,13 +41,13 @@ namespace mongo {
*/
struct OrderedIntervalList {
OrderedIntervalList() { }
- OrderedIntervalList(const string& n) : name(n) { }
+ OrderedIntervalList(const std::string& n) : name(n) { }
// Must be ordered according to the index order.
- vector<Interval> intervals;
+ std::vector<Interval> intervals;
// TODO: We could drop this. Only used in IndexBounds::isValidFor.
- string name;
+ std::string name;
bool isValidFor(int expectedOrientation) const;
std::string toString() const;
@@ -74,7 +74,7 @@ namespace mongo {
IndexBounds() : isSimpleRange(false), endKeyInclusive(false) { }
// For each indexed field, the values that the field is allowed to take on.
- vector<OrderedIntervalList> fields;
+ std::vector<OrderedIntervalList> fields;
// Debugging check.
// We must have as many fields the key pattern does.
@@ -121,7 +121,7 @@ namespace mongo {
*
* Returns true if there is a valid start key. Returns false otherwise.
*/
- bool getStartKey(vector<const BSONElement*>* valueOut, vector<bool>* inclusiveOut);
+ bool getStartKey(std::vector<const BSONElement*>* valueOut, std::vector<bool>* inclusiveOut);
/**
* The states of a key from an index scan. See checkKey below.
@@ -179,7 +179,7 @@ namespace mongo {
* If the i-th element is true, seek to the i-th element of out.
*/
KeyState checkKey(const BSONObj& key, int* keyEltsToUse, bool* movePastKeyElts,
- vector<const BSONElement*>* out, vector<bool>* incOut);
+ std::vector<const BSONElement*>* out, std::vector<bool>* incOut);
/**
* Relative position of a key to an interval.
@@ -217,7 +217,7 @@ namespace mongo {
* 'where' is the leftmost field that isn't in the interval we think it is.
* 'what' is the orientation of the field with respect to that interval.
*/
- bool findLeftmostProblem(const vector<BSONElement>& keyValues, size_t* where,
+ bool findLeftmostProblem(const std::vector<BSONElement>& keyValues, size_t* where,
Location* what);
/**
@@ -226,16 +226,16 @@ namespace mongo {
*
* keyValues are the elements of the index key in order.
*/
- bool spaceLeftToAdvance(size_t fieldsToCheck, const vector<BSONElement>& keyValues);
+ bool spaceLeftToAdvance(size_t fieldsToCheck, const std::vector<BSONElement>& keyValues);
// The actual bounds. Must outlive this object. Not owned by us.
const IndexBounds* _bounds;
// For each field, which interval are we currently in?
- vector<size_t> _curInterval;
+ std::vector<size_t> _curInterval;
// Direction of scan * direction of indexing.
- vector<int> _expectedDirection;
+ std::vector<int> _expectedDirection;
};
} // namespace mongo
diff --git a/src/mongo/db/query/index_bounds_builder.h b/src/mongo/db/query/index_bounds_builder.h
index dceed96bc61..2e760ed663c 100644
--- a/src/mongo/db/query/index_bounds_builder.h
+++ b/src/mongo/db/query/index_bounds_builder.h
@@ -104,8 +104,8 @@ namespace mongo {
bool startInclusive,
bool endInclusive);
- static Interval makeRangeInterval(const string& start,
- const string& end,
+ static Interval makeRangeInterval(const std::string& start,
+ const std::string& end,
bool startInclusive,
bool endInclusive);
@@ -114,7 +114,7 @@ namespace mongo {
* The object must have exactly one field which is the value of the point interval.
*/
static Interval makePointInterval(const BSONObj& obj);
- static Interval makePointInterval(const string& str);
+ static Interval makePointInterval(const std::string& str);
static Interval makePointInterval(double d);
/**
@@ -131,13 +131,13 @@ namespace mongo {
/**
* Copied almost verbatim from db/queryutil.cpp.
*
- * returns a string that when used as a matcher, would match a super set of regex()
+ * returns a std::string that when used as a matcher, would match a super set of regex()
*
* returns "" for complex regular expressions
*
* used to optimize queries in some simple regex cases that start with '^'
*/
- static string simpleRegex(const char* regex,
+ static std::string simpleRegex(const char* regex,
const char* flags,
BoundsTightness* tightnessOut);
diff --git a/src/mongo/db/query/index_entry.h b/src/mongo/db/query/index_entry.h
index 9e81e78ee85..f69ca28fc5f 100644
--- a/src/mongo/db/query/index_entry.h
+++ b/src/mongo/db/query/index_entry.h
@@ -43,10 +43,10 @@ namespace mongo {
* Use this constructor if you're making an IndexEntry from the catalog.
*/
IndexEntry(const BSONObj& kp,
- const string& accessMethod,
+ const std::string& accessMethod,
bool mk,
bool sp,
- const string& n,
+ const std::string& n,
const BSONObj& io)
: keyPattern(kp),
multikey(mk),
@@ -63,7 +63,7 @@ namespace mongo {
IndexEntry(const BSONObj& kp,
bool mk,
bool sp,
- const string& n,
+ const std::string& n,
const BSONObj& io)
: keyPattern(kp),
multikey(mk),
@@ -93,7 +93,7 @@ namespace mongo {
bool sparse;
- string name;
+ std::string name;
// Geo indices have extra parameters. We need those available to plan correctly.
BSONObj infoObj;
diff --git a/src/mongo/db/query/index_tag.h b/src/mongo/db/query/index_tag.h
index 060bf7212cc..9fb115c818d 100644
--- a/src/mongo/db/query/index_tag.h
+++ b/src/mongo/db/query/index_tag.h
@@ -73,7 +73,7 @@ namespace mongo {
// root. We do this once and store it.
// TODO: Do a FieldRef / StringData pass.
// TODO: We might want this inside of the MatchExpression.
- string path;
+ std::string path;
// Points to the innermost containing $elemMatch. If this tag is
// attached to an expression not contained in an $elemMatch, then
diff --git a/src/mongo/db/query/interval.h b/src/mongo/db/query/interval.h
index 1d3e156af4a..e4f82da8088 100644
--- a/src/mongo/db/query/interval.h
+++ b/src/mongo/db/query/interval.h
@@ -52,7 +52,7 @@ namespace mongo {
/** Creates an empty interval */
Interval();
- string toString() const {
+ std::string toString() const {
mongoutils::str::stream ss;
if (startInclusive) {
ss << "[";
@@ -165,7 +165,7 @@ namespace mongo {
/**
* toString for IntervalComparison
*/
- static string cmpstr(IntervalComparison c);
+ static std::string cmpstr(IntervalComparison c);
//
// Mutation of intervals
diff --git a/src/mongo/db/query/lite_parsed_query.h b/src/mongo/db/query/lite_parsed_query.h
index e99a073e950..a03ef36f54f 100644
--- a/src/mongo/db/query/lite_parsed_query.h
+++ b/src/mongo/db/query/lite_parsed_query.h
@@ -52,7 +52,7 @@ namespace mongo {
* Fills out a LiteParsedQuery. Used for debugging and testing, when we don't have a
* QueryMessage.
*/
- static Status make(const string& ns,
+ static Status make(const std::string& ns,
int ntoskip,
int ntoreturn,
int queryoptions,
@@ -115,17 +115,17 @@ namespace mongo {
static BSONObj normalizeSortOrder(const BSONObj& sortObj);
// Names of the maxTimeMS command and query option.
- static const string cmdOptionMaxTimeMS;
- static const string queryOptionMaxTimeMS;
+ static const std::string cmdOptionMaxTimeMS;
+ static const std::string queryOptionMaxTimeMS;
// Names of the $meta projection values.
- static const string metaTextScore;
- static const string metaGeoNearDistance;
- static const string metaGeoNearPoint;
- static const string metaDiskLoc;
- static const string metaIndexKey;
+ static const std::string metaTextScore;
+ static const std::string metaGeoNearDistance;
+ static const std::string metaGeoNearPoint;
+ static const std::string metaDiskLoc;
+ static const std::string metaIndexKey;
- const string& ns() const { return _ns; }
+ const std::string& ns() const { return _ns; }
bool isLocalDB() const { return _ns.compare(0, 6, "local.") == 0; }
const BSONObj& getFilter() const { return _filter; }
@@ -153,14 +153,14 @@ namespace mongo {
private:
LiteParsedQuery();
- Status init(const string& ns, int ntoskip, int ntoreturn, int queryOptions,
+ Status init(const std::string& ns, int ntoskip, int ntoreturn, int queryOptions,
const BSONObj& queryObj, const BSONObj& proj, bool fromQueryMessage);
Status initFullQuery(const BSONObj& top);
static StatusWith<int> parseMaxTimeMS(const BSONElement& maxTimeMSElt);
- string _ns;
+ std::string _ns;
int _ntoskip;
int _ntoreturn;
BSONObj _filter;
diff --git a/src/mongo/db/query/parsed_projection.h b/src/mongo/db/query/parsed_projection.h
index 0bcd51756a7..64c6b9d70ba 100644
--- a/src/mongo/db/query/parsed_projection.h
+++ b/src/mongo/db/query/parsed_projection.h
@@ -64,7 +64,7 @@ namespace mongo {
* If requiresDocument() == false, what fields are required to compute
* the projection?
*/
- const vector<string>& getRequiredFields() const {
+ const std::vector<std::string>& getRequiredFields() const {
return _requiredFields;
}
@@ -114,7 +114,7 @@ namespace mongo {
const std::string& matchfield);
// TODO: stringdata?
- vector<string> _requiredFields;
+ std::vector<std::string> _requiredFields;
bool _requiresDocument;
diff --git a/src/mongo/db/query/plan_cache.h b/src/mongo/db/query/plan_cache.h
index 402633c8c5b..84dbab1fa34 100644
--- a/src/mongo/db/query/plan_cache.h
+++ b/src/mongo/db/query/plan_cache.h
@@ -85,7 +85,7 @@ namespace mongo {
PlanCacheIndexTree() : entry(NULL), index_pos(0) { }
~PlanCacheIndexTree() {
- for (vector<PlanCacheIndexTree*>::const_iterator it = children.begin();
+ for (std::vector<PlanCacheIndexTree*>::const_iterator it = children.begin();
it != children.end(); ++it) {
delete *it;
}
diff --git a/src/mongo/db/query/plan_enumerator.h b/src/mongo/db/query/plan_enumerator.h
index 8cccbab61c8..5f27a6ebbf1 100644
--- a/src/mongo/db/query/plan_enumerator.h
+++ b/src/mongo/db/query/plan_enumerator.h
@@ -53,7 +53,7 @@ namespace mongo {
MatchExpression* root;
// Not owned here.
- const vector<IndexEntry>* indices;
+ const std::vector<IndexEntry>* indices;
// How many plans are we willing to ouput from an OR? We currently consider
// all possibly OR plans, which means the product of the number of possibilities
@@ -176,7 +176,7 @@ namespace mongo {
struct PredicateAssignment {
PredicateAssignment() : indexToAssign(0) { }
- vector<IndexID> first;
+ std::vector<IndexID> first;
// Not owned here.
MatchExpression* expr;
@@ -193,7 +193,7 @@ namespace mongo {
// subsequent state it just asks all its children to move their states forward.
// Must use all of subnodes.
- vector<MemoID> subnodes;
+ std::vector<MemoID> subnodes;
// The number of OR states that we've enumerated so far.
size_t counter;
@@ -202,20 +202,20 @@ namespace mongo {
// This is used by AndAssignment and is not an actual assignment.
struct OneIndexAssignment {
// 'preds[i]' is uses index 'index' at position 'positions[i]'
- vector<MatchExpression*> preds;
- vector<IndexPosition> positions;
+ std::vector<MatchExpression*> preds;
+ std::vector<IndexPosition> positions;
IndexID index;
};
struct AndEnumerableState {
- vector<OneIndexAssignment> assignments;
- vector<MemoID> subnodesToIndex;
+ std::vector<OneIndexAssignment> assignments;
+ std::vector<MemoID> subnodesToIndex;
};
struct AndAssignment {
AndAssignment() : counter(0) { }
- vector<AndEnumerableState> choices;
+ std::vector<AndEnumerableState> choices;
// We're on the counter-th member of state.
size_t counter;
@@ -223,7 +223,7 @@ namespace mongo {
struct ArrayAssignment {
ArrayAssignment() : counter(0) { }
- vector<MemoID> subnodes;
+ std::vector<MemoID> subnodes;
size_t counter;
};
@@ -235,7 +235,7 @@ namespace mongo {
scoped_ptr<OrAssignment> orAssignment;
scoped_ptr<AndAssignment> andAssignment;
scoped_ptr<ArrayAssignment> arrayAssignment;
- string toString() const;
+ std::string toString() const;
};
/**
@@ -268,9 +268,9 @@ namespace mongo {
*/
bool partitionPreds(MatchExpression* node,
PrepMemoContext context,
- vector<MatchExpression*>* indexOut,
- vector<MemoID>* subnodesOut,
- vector<MemoID>* mandatorySubnodes);
+ std::vector<MatchExpression*>* indexOut,
+ std::vector<MemoID>* subnodesOut,
+ std::vector<MemoID>* mandatorySubnodes);
/**
* Finds a set of predicates that can be safely compounded with the set
@@ -334,9 +334,9 @@ namespace mongo {
* and then not assign the $near because the $within is already assigned (and
* has the same path).
*/
- void getMultikeyCompoundablePreds(const vector<MatchExpression*>& assigned,
- const vector<MatchExpression*>& couldCompound,
- vector<MatchExpression*>* out);
+ void getMultikeyCompoundablePreds(const std::vector<MatchExpression*>& assigned,
+ const std::vector<MatchExpression*>& couldCompound,
+ std::vector<MatchExpression*>* out);
/**
* 'andAssignment' contains assignments that we've already committed to outputting,
@@ -357,12 +357,12 @@ namespace mongo {
* and notice that we have already assigned this same set of predicates to
* the single index {a: 1, b: 1} via compounding.
*/
- bool alreadyCompounded(const set<MatchExpression*>& ixisectAssigned,
+ bool alreadyCompounded(const std::set<MatchExpression*>& ixisectAssigned,
const AndAssignment* andAssignment);
/**
* Output index intersection assignments inside of an AND node.
*/
- typedef unordered_map<IndexID, vector<MatchExpression*> > IndexToPredMap;
+ typedef unordered_map<IndexID, std::vector<MatchExpression*> > IndexToPredMap;
/**
* Generate index intersection assignments given the predicate/index structure in idxToFirst
@@ -371,7 +371,7 @@ namespace mongo {
*/
void enumerateAndIntersect(const IndexToPredMap& idxToFirst,
const IndexToPredMap& idxToNotFirst,
- const vector<MemoID>& subnodes,
+ const std::vector<MemoID>& subnodes,
AndAssignment* andAssignment);
/**
@@ -381,7 +381,7 @@ namespace mongo {
*/
void enumerateOneIndex(const IndexToPredMap& idxToFirst,
const IndexToPredMap& idxToNotFirst,
- const vector<MemoID>& subnodes,
+ const std::vector<MemoID>& subnodes,
AndAssignment* andAssignment);
/**
@@ -399,7 +399,7 @@ namespace mongo {
* Try to assign predicates in 'tryCompound' to 'thisIndex' as compound assignments.
* Output the assignments in 'assign'.
*/
- void compound(const vector<MatchExpression*>& tryCompound,
+ void compound(const std::vector<MatchExpression*>& tryCompound,
const IndexEntry& thisIndex,
OneIndexAssignment* assign);
@@ -429,7 +429,7 @@ namespace mongo {
MatchExpression* _root;
// Indices we're allowed to enumerate with. Not owned here.
- const vector<IndexEntry>* _indices;
+ const std::vector<IndexEntry>* _indices;
// Do we output >1 index per AND (index intersection)?
bool _ixisect;
diff --git a/src/mongo/db/query/plan_ranker.h b/src/mongo/db/query/plan_ranker.h
index 41049febbfc..8ffdece195b 100644
--- a/src/mongo/db/query/plan_ranker.h
+++ b/src/mongo/db/query/plan_ranker.h
@@ -53,7 +53,7 @@ namespace mongo {
* Caller owns pointers in 'why'.
* 'candidateOrder' holds indices into candidates ordered by score (winner in first element).
*/
- static size_t pickBestPlan(const vector<CandidatePlan>& candidates,
+ static size_t pickBestPlan(const std::vector<CandidatePlan>& candidates,
PlanRankingDecision* why);
/**
diff --git a/src/mongo/db/query/planner_access.h b/src/mongo/db/query/planner_access.h
index 71dd60d9f39..43300261fd4 100644
--- a/src/mongo/db/query/planner_access.h
+++ b/src/mongo/db/query/planner_access.h
@@ -140,7 +140,7 @@ namespace mongo {
static QuerySolutionNode* buildIndexedDataAccess(const CanonicalQuery& query,
MatchExpression* root,
bool inArrayOperator,
- const vector<IndexEntry>& indices);
+ const std::vector<IndexEntry>& indices);
/**
* Takes ownership of 'root'.
@@ -148,7 +148,7 @@ namespace mongo {
static QuerySolutionNode* buildIndexedAnd(const CanonicalQuery& query,
MatchExpression* root,
bool inArrayOperator,
- const vector<IndexEntry>& indices);
+ const std::vector<IndexEntry>& indices);
/**
* Takes ownership of 'root'.
@@ -156,7 +156,7 @@ namespace mongo {
static QuerySolutionNode* buildIndexedOr(const CanonicalQuery& query,
MatchExpression* root,
bool inArrayOperator,
- const vector<IndexEntry>& indices);
+ const std::vector<IndexEntry>& indices);
/**
* Traverses the tree rooted at the $elemMatch expression 'node',
@@ -170,8 +170,8 @@ namespace mongo {
* tagged to use an index.
*/
static void findElemMatchChildren(const MatchExpression* node,
- vector<MatchExpression*>* out,
- vector<MatchExpression*>* subnodesOut);
+ std::vector<MatchExpression*>* out,
+ std::vector<MatchExpression*>* subnodesOut);
/**
* Helper used by buildIndexedAnd and buildIndexedOr.
@@ -189,8 +189,8 @@ namespace mongo {
static bool processIndexScans(const CanonicalQuery& query,
MatchExpression* root,
bool inArrayOperator,
- const vector<IndexEntry>& indices,
- vector<QuerySolutionNode*>* out);
+ const std::vector<IndexEntry>& indices,
+ std::vector<QuerySolutionNode*>* out);
//
// Helpers for creating an index scan.
diff --git a/src/mongo/db/query/planner_ixselect.h b/src/mongo/db/query/planner_ixselect.h
index a68837af352..ca385bd35fa 100644
--- a/src/mongo/db/query/planner_ixselect.h
+++ b/src/mongo/db/query/planner_ixselect.h
@@ -46,15 +46,15 @@ namespace mongo {
* The 'prefix' argument is a path prefix to be prepended to any fields mentioned in
* predicates encountered. Some array operators specify a path prefix.
*/
- static void getFields(MatchExpression* node, string prefix, unordered_set<string>* out);
+ static void getFields(MatchExpression* node, std::string prefix, unordered_set<std::string>* out);
/**
* Find all indices prefixed by fields we have predicates over. Only these indices are
* useful in answering the query.
*/
- static void findRelevantIndices(const unordered_set<string>& fields,
- const vector<IndexEntry>& indices,
- vector<IndexEntry>* out);
+ static void findRelevantIndices(const unordered_set<std::string>& fields,
+ const std::vector<IndexEntry>& indices,
+ std::vector<IndexEntry>* out);
/**
* Return true if the index key pattern field 'elt' (which belongs to 'index') can be used
@@ -84,8 +84,8 @@ namespace mongo {
* original predicate by having an AND as a parent.
*/
static void rateIndices(MatchExpression* node,
- string prefix,
- const vector<IndexEntry>& indices);
+ std::string prefix,
+ const std::vector<IndexEntry>& indices);
/**
* Amend the RelevantTag lists for all predicates in the subtree rooted at 'node' to remove
@@ -94,7 +94,7 @@ namespace mongo {
* See the body of this function and the specific stripInvalidAssignments functions for details.
*/
static void stripInvalidAssignments(MatchExpression* node,
- const vector<IndexEntry>& indices);
+ const std::vector<IndexEntry>& indices);
private:
/**
@@ -129,7 +129,7 @@ namespace mongo {
* those annotations get removed here.
*/
static void stripInvalidAssignmentsToTextIndexes(MatchExpression* node,
- const vector<IndexEntry>& indices);
+ const std::vector<IndexEntry>& indices);
/**
* For V1 2dsphere indices we ignore the sparse option. As such we can use an index
@@ -149,7 +149,7 @@ namespace mongo {
* predicate on every geo field in the index.
*/
static void stripInvalidAssignmentsTo2dsphereIndices(MatchExpression* node,
- const vector<IndexEntry>& indices);
+ const std::vector<IndexEntry>& indices);
};
} // namespace mongo
diff --git a/src/mongo/db/query/query_planner.h b/src/mongo/db/query/query_planner.h
index e314e1f132c..151c7278728 100644
--- a/src/mongo/db/query/query_planner.h
+++ b/src/mongo/db/query/query_planner.h
@@ -102,7 +102,7 @@ namespace mongo {
* On failure, 'out' is set to NULL.
*/
static Status cacheDataFromTaggedTree(const MatchExpression* const taggedTree,
- const vector<IndexEntry>& relevantIndices,
+ const std::vector<IndexEntry>& relevantIndices,
PlanCacheIndexTree** out);
/**
@@ -124,7 +124,7 @@ namespace mongo {
*/
static Status tagAccordingToCache(MatchExpression* filter,
const PlanCacheIndexTree* const indexTree,
- const map<BSONObj, size_t>& indexMap);
+ const std::map<BSONObj, size_t>& indexMap);
};
} // namespace mongo
diff --git a/src/mongo/db/query/query_planner_common.h b/src/mongo/db/query/query_planner_common.h
index e1c858ab98c..2caa2545be3 100644
--- a/src/mongo/db/query/query_planner_common.h
+++ b/src/mongo/db/query/query_planner_common.h
@@ -95,7 +95,7 @@ namespace mongo {
}
else {
for (size_t i = 0; i < isn->bounds.fields.size(); ++i) {
- vector<Interval>& iv = isn->bounds.fields[i].intervals;
+ std::vector<Interval>& iv = isn->bounds.fields[i].intervals;
// Step 1: reverse the list.
std::reverse(iv.begin(), iv.end());
// Step 2: reverse each interval.
@@ -106,7 +106,7 @@ namespace mongo {
}
if (!isn->bounds.isValidFor(isn->indexKeyPattern, isn->direction)) {
- QLOG() << "Invalid bounds: " << isn->bounds.toString() << endl;
+ QLOG() << "Invalid bounds: " << isn->bounds.toString() << std::endl;
verify(0);
}
diff --git a/src/mongo/db/query/query_planner_params.h b/src/mongo/db/query/query_planner_params.h
index 6d51291f1fb..38429bd014d 100644
--- a/src/mongo/db/query/query_planner_params.h
+++ b/src/mongo/db/query/query_planner_params.h
@@ -88,7 +88,7 @@ namespace mongo {
size_t options;
// What indices are available for planning?
- vector<IndexEntry> indices;
+ std::vector<IndexEntry> indices;
// What's our shard key? If INCLUDE_SHARD_FILTER is set we will create a shard filtering
// stage. If we know the shard key, we can perform covering analysis instead of always
diff --git a/src/mongo/db/query/query_planner_test_lib.h b/src/mongo/db/query/query_planner_test_lib.h
index 9c7d7eb9caf..8e4b9abdeab 100644
--- a/src/mongo/db/query/query_planner_test_lib.h
+++ b/src/mongo/db/query/query_planner_test_lib.h
@@ -53,7 +53,7 @@ namespace mongo {
*/
static bool solutionMatches(const BSONObj& testSoln, const QuerySolutionNode* trueSoln);
- static bool solutionMatches(const string& testSoln, const QuerySolutionNode* trueSoln) {
+ static bool solutionMatches(const std::string& testSoln, const QuerySolutionNode* trueSoln) {
return solutionMatches(fromjson(testSoln), trueSoln);
}
};
diff --git a/src/mongo/db/query/query_solution.h b/src/mongo/db/query/query_solution.h
index 45908539398..6000c823528 100644
--- a/src/mongo/db/query/query_solution.h
+++ b/src/mongo/db/query/query_solution.h
@@ -53,9 +53,9 @@ namespace mongo {
}
/**
- * Return a string representation of this node and any children.
+ * Return a std::string representation of this node and any children.
*/
- string toString() const;
+ std::string toString() const;
/**
* What stage should this be transcribed to? See stage_types.h.
@@ -103,7 +103,7 @@ namespace mongo {
*
* TODO: 'field' is probably more appropriate as a FieldRef or string.
*/
- virtual bool hasField(const string& field) const = 0;
+ virtual bool hasField(const std::string& field) const = 0;
/**
* Returns true if the tree rooted at this node provides data that is sorted by the
@@ -143,7 +143,7 @@ namespace mongo {
}
// These are owned here.
- vector<QuerySolutionNode*> children;
+ std::vector<QuerySolutionNode*> children;
// If a stage has a non-NULL filter all values outputted from that stage must pass that
// filter.
@@ -199,9 +199,9 @@ namespace mongo {
boost::scoped_ptr<SolutionCacheData> cacheData;
/**
- * Output a human-readable string representing the plan.
+ * Output a human-readable std::string representing the plan.
*/
- string toString() {
+ std::string toString() {
if (NULL == root) {
return "empty query solution";
}
@@ -224,7 +224,7 @@ namespace mongo {
// text's return is LOC_AND_UNOWNED_OBJ so it's fetched and has all fields.
bool fetched() const { return true; }
- bool hasField(const string& field) const { return true; }
+ bool hasField(const std::string& field) const { return true; }
bool sortedByDiskLoc() const { return false; }
const BSONObjSet& getSort() const { return _sort; }
@@ -251,7 +251,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const { return true; }
- bool hasField(const string& field) const { return true; }
+ bool hasField(const std::string& field) const { return true; }
bool sortedByDiskLoc() const { return false; }
const BSONObjSet& getSort() const { return _sort; }
@@ -260,7 +260,7 @@ namespace mongo {
BSONObjSet _sort;
// Name of the namespace.
- string name;
+ std::string name;
// Should we make a tailable cursor?
bool tailable;
@@ -280,7 +280,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const;
- bool hasField(const string& field) const;
+ bool hasField(const std::string& field) const;
bool sortedByDiskLoc() const { return false; }
const BSONObjSet& getSort() const { return children.back()->getSort(); }
@@ -298,7 +298,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const;
- bool hasField(const string& field) const;
+ bool hasField(const std::string& field) const;
bool sortedByDiskLoc() const { return true; }
const BSONObjSet& getSort() const { return _sort; }
@@ -316,7 +316,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const;
- bool hasField(const string& field) const;
+ bool hasField(const std::string& field) const;
bool sortedByDiskLoc() const {
// Even if our children are sorted by their diskloc or other fields, we don't maintain
// any order on the output.
@@ -340,7 +340,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const;
- bool hasField(const string& field) const;
+ bool hasField(const std::string& field) const;
bool sortedByDiskLoc() const { return false; }
const BSONObjSet& getSort() const { return _sorts; }
@@ -370,7 +370,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const { return true; }
- bool hasField(const string& field) const { return true; }
+ bool hasField(const std::string& field) const { return true; }
bool sortedByDiskLoc() const { return children[0]->sortedByDiskLoc(); }
const BSONObjSet& getSort() const { return children[0]->getSort(); }
@@ -390,7 +390,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const { return false; }
- bool hasField(const string& field) const;
+ bool hasField(const std::string& field) const;
bool sortedByDiskLoc() const;
const BSONObjSet& getSort() const { return _sorts; }
@@ -448,7 +448,7 @@ namespace mongo {
*/
bool fetched() const { return true; }
- bool hasField(const string& field) const {
+ bool hasField(const std::string& field) const {
// TODO: Returning false isn't always the right answer -- we may either be including
// certain fields, or we may be dropping fields (in which case hasField returns true).
//
@@ -502,7 +502,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const { return children[0]->fetched(); }
- bool hasField(const string& field) const { return children[0]->hasField(field); }
+ bool hasField(const std::string& field) const { return children[0]->hasField(field); }
bool sortedByDiskLoc() const { return false; }
const BSONObjSet& getSort() const { return _sorts; }
@@ -536,7 +536,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const { return children[0]->fetched(); }
- bool hasField(const string& field) const { return children[0]->hasField(field); }
+ bool hasField(const std::string& field) const { return children[0]->hasField(field); }
bool sortedByDiskLoc() const { return children[0]->sortedByDiskLoc(); }
const BSONObjSet& getSort() const { return children[0]->getSort(); }
@@ -553,7 +553,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const { return children[0]->fetched(); }
- bool hasField(const string& field) const { return children[0]->hasField(field); }
+ bool hasField(const std::string& field) const { return children[0]->hasField(field); }
bool sortedByDiskLoc() const { return children[0]->sortedByDiskLoc(); }
const BSONObjSet& getSort() const { return children[0]->getSort(); }
@@ -576,7 +576,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const { return false; }
- bool hasField(const string& field) const;
+ bool hasField(const std::string& field) const;
bool sortedByDiskLoc() const { return false; }
const BSONObjSet& getSort() const { return _sorts; }
BSONObjSet _sorts;
@@ -596,7 +596,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const { return true; }
- bool hasField(const string& field) const { return true; }
+ bool hasField(const std::string& field) const { return true; }
bool sortedByDiskLoc() const { return false; }
const BSONObjSet& getSort() const { return _sorts; }
@@ -620,7 +620,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const { return true; }
- bool hasField(const string& field) const { return true; }
+ bool hasField(const std::string& field) const { return true; }
bool sortedByDiskLoc() const { return false; }
const BSONObjSet& getSort() const { return _sorts; }
@@ -654,7 +654,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const { return children[0]->fetched(); }
- bool hasField(const string& field) const { return children[0]->hasField(field); }
+ bool hasField(const std::string& field) const { return children[0]->hasField(field); }
bool sortedByDiskLoc() const { return children[0]->sortedByDiskLoc(); }
const BSONObjSet& getSort() const { return children[0]->getSort(); }
@@ -677,7 +677,7 @@ namespace mongo {
bool fetched() const { return children[0]->fetched(); }
// Any flagged results are OWNED_OBJ and as such they'll have any field we need.
- bool hasField(const string& field) const { return children[0]->hasField(field); }
+ bool hasField(const std::string& field) const { return children[0]->hasField(field); }
bool sortedByDiskLoc() const { return false; }
const BSONObjSet& getSort() const { return sorts; }
@@ -702,7 +702,7 @@ namespace mongo {
// This stage is created "on top" of normal planning and as such the properties
// below don't really matter.
bool fetched() const { return false; }
- bool hasField(const string& field) const { return !indexKeyPattern[field].eoo(); }
+ bool hasField(const std::string& field) const { return !indexKeyPattern[field].eoo(); }
bool sortedByDiskLoc() const { return false; }
const BSONObjSet& getSort() const { return sorts; }
@@ -729,7 +729,7 @@ namespace mongo {
virtual void appendToString(mongoutils::str::stream* ss, int indent) const;
bool fetched() const { return true; }
- bool hasField(const string& field) const { return true; }
+ bool hasField(const std::string& field) const { return true; }
bool sortedByDiskLoc() const { return false; }
const BSONObjSet& getSort() const { return sorts; }
diff --git a/src/mongo/db/query/runner.h b/src/mongo/db/query/runner.h
index 474b93c1fd3..ebcc12f82a4 100644
--- a/src/mongo/db/query/runner.h
+++ b/src/mongo/db/query/runner.h
@@ -64,7 +64,7 @@ namespace mongo {
RUNNER_ERROR,
};
- static string statestr(RunnerState s) {
+ static std::string statestr(RunnerState s) {
if (RUNNER_ADVANCED == s) {
return "RUNNER_ADVANCED";
}
@@ -154,7 +154,7 @@ namespace mongo {
/**
* Return the NS that the query is running over.
*/
- virtual const string& ns() = 0;
+ virtual const std::string& ns() = 0;
/**
* Return the Collection that the query is running over.
diff --git a/src/mongo/db/query/type_explain.h b/src/mongo/db/query/type_explain.h
index 1048e591c85..a151c78715d 100644
--- a/src/mongo/db/query/type_explain.h
+++ b/src/mongo/db/query/type_explain.h
@@ -42,7 +42,7 @@ namespace mongo {
* query. The exception is the multi plan runner, in which
* case plan selection depends on actually running the query.
*
- * Currently, just a summary string describing the plan
+ * Currently, just a summary std::string describing the plan
* used to run the query.
*/
struct PlanInfo {