summaryrefslogtreecommitdiff
path: root/db/indexkey.h
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2011-07-31 08:36:17 -0700
committerAaron <aaron@10gen.com>2011-07-31 08:51:41 -0700
commitc698874735ae6d315d6a71b1695f9e04cc275437 (patch)
treeb203c35044173dbf33f9facc3e36f239156bfa15 /db/indexkey.h
parentfb8b8936656d94617e3c3b416c24e4660706610c (diff)
downloadmongo-c698874735ae6d315d6a71b1695f9e04cc275437.tar.gz
SERVER-3375 key generation fixes - backward breaking for v1 indexes
Diffstat (limited to 'db/indexkey.h')
-rw-r--r--db/indexkey.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/db/indexkey.h b/db/indexkey.h
index 4a755f8a4e8..6c2d67f762f 100644
--- a/db/indexkey.h
+++ b/db/indexkey.h
@@ -161,16 +161,21 @@ namespace mongo {
protected:
+ int indexVersion() const;
+
IndexSuitability _suitability( const BSONObj& query , const BSONObj& order ) const ;
- void _getKeys( vector<const char*> fieldNames , vector<BSONElement> fixed , const BSONObj &obj, BSONObjSet &keys ) const;
-
BSONSizeTracker _sizeTracker;
vector<const char*> _fieldNames;
vector<BSONElement> _fixed;
+
BSONObj _nullKey; // a full key with all fields null
BSONObj _nullObj; // only used for _nullElt
BSONElement _nullElt; // jstNull
+
+ BSONObj _undefinedObj; // only used for _undefinedElt
+ BSONElement _undefinedElt; // undefined
+
int _nFields; // number of fields in the index
bool _sparse; // if the index is sparse
shared_ptr<IndexType> _indexType;
@@ -179,6 +184,8 @@ namespace mongo {
void _init();
friend class IndexType;
+ friend class KeyGeneratorV0;
+ friend class KeyGeneratorV1;
public:
bool _finishedInit;
};