summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher/matcher.h
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2013-05-14 01:23:57 -0400
committerEliot Horowitz <eliot@10gen.com>2013-05-14 01:23:57 -0400
commitc934f621261042f3d235a81d16119840991a2ddf (patch)
treea21e095da7054fbdbd080d52a1d20479dc1dcdae /src/mongo/db/matcher/matcher.h
parent9c28453d56d3ab69f8cefe85bdc4216de8164906 (diff)
downloadmongo-c934f621261042f3d235a81d16119840991a2ddf.tar.gz
SERVER-6400: Matcher2 handles some index expression issues
Diffstat (limited to 'src/mongo/db/matcher/matcher.h')
-rw-r--r--src/mongo/db/matcher/matcher.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/mongo/db/matcher/matcher.h b/src/mongo/db/matcher/matcher.h
index fb6e6b7c32b..55011d76600 100644
--- a/src/mongo/db/matcher/matcher.h
+++ b/src/mongo/db/matcher/matcher.h
@@ -31,6 +31,14 @@ namespace mongo {
class Matcher2 {
MONGO_DISALLOW_COPYING( Matcher2 );
+ struct IndexSpliceInfo {
+ IndexSpliceInfo() {
+ hasNullEquality = false;
+ }
+
+ bool hasNullEquality;
+ };
+
public:
explicit Matcher2( const BSONObj& pattern, bool nested=false /* do not use */ );
@@ -64,17 +72,20 @@ namespace mongo {
bool keyMatch( const Matcher2 &docMatcher ) const;
static MatchExpression* spliceForIndex( const BSONObj& key,
- const MatchExpression* full );
+ const MatchExpression* full,
+ IndexSpliceInfo* spliceInfo );
private:
BSONObj _pattern;
-
BSONObj _indexKey;
boost::scoped_ptr<MatchExpression> _expression;
+ IndexSpliceInfo _spliceInfo;
+
static MatchExpression* _spliceForIndex( const set<std::string>& keys,
- const MatchExpression* full );
+ const MatchExpression* full,
+ IndexSpliceInfo* spliceInfo );
};