diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-02-17 11:02:56 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-02-17 11:03:39 -0500 |
commit | 7700abb01197a0415ae337ac4305a150750d3978 (patch) | |
tree | 17d92b71054aa359911a4333f4a1b72dea6cf2e8 /db/index.cpp | |
parent | 8fbc9c34acf011a23238241d55550cea529c58fa (diff) | |
download | mongo-7700abb01197a0415ae337ac4305a150750d3978.tar.gz |
helpers
Diffstat (limited to 'db/index.cpp')
-rw-r--r-- | db/index.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/db/index.cpp b/db/index.cpp index ddd97bb91ac..038cb4f0ce8 100644 --- a/db/index.cpp +++ b/db/index.cpp @@ -27,6 +27,11 @@ namespace mongo { map<string,IndexPlugin*> * IndexPlugin::_plugins; + IndexType::IndexType( const IndexPlugin * plugin ) + : _plugin( plugin ){ + + } + IndexType::~IndexType(){ } @@ -69,6 +74,10 @@ namespace mongo { } } + const IndexSpec& IndexDetails::getSpec() const { + return NamespaceDetailsTransient::get_w( info.obj()["ns"].valuestr() ).getIndexSpec( this ); + } + /* delete this index. does NOT clean up the system catalog (system.indexes or system.namespaces) -- only NamespaceIndex. */ @@ -229,7 +238,7 @@ namespace mongo { Keys will be left empty if key not found in the object. */ void IndexDetails::getKeysFromObject( const BSONObj& obj, BSONObjSetDefaultOrder& keys) const { - NamespaceDetailsTransient::get_w( info.obj()["ns"].valuestr() ).getIndexSpec( this ).getKeys( obj, keys ); + getSpec().getKeys( obj, keys ); } void setDifference(BSONObjSetDefaultOrder &l, BSONObjSetDefaultOrder &r, vector<BSONObj*> &diff) { |