diff options
author | Benety Goh <benety@mongodb.com> | 2020-02-19 10:17:21 -0500 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-02-19 15:49:41 +0000 |
commit | 21692cab486977a3c70f1a2a746ff12e5ffa3358 (patch) | |
tree | c57c1a81f4d8e7e39ad7c610c5c72a2de260d7b0 /src/mongo/client/dbclient_base.h | |
parent | bc71c1dfefb4da9ba6592005ce35e21456ca7af3 (diff) | |
download | mongo-21692cab486977a3c70f1a2a746ff12e5ffa3358.tar.gz |
SERVER-39453 add DBClientBase::getReadyIndexSpecs()
Diffstat (limited to 'src/mongo/client/dbclient_base.h')
-rw-r--r-- | src/mongo/client/dbclient_base.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mongo/client/dbclient_base.h b/src/mongo/client/dbclient_base.h index ac4d302d172..5a3dfcfc766 100644 --- a/src/mongo/client/dbclient_base.h +++ b/src/mongo/client/dbclient_base.h @@ -510,9 +510,19 @@ public: */ virtual void createIndexes(StringData ns, const std::vector<BSONObj>& specs); + /** + * Lists indexes on the collection 'nsOrUuid'. + * Includes in-progress indexes. + */ virtual std::list<BSONObj> getIndexSpecs(const NamespaceStringOrUUID& nsOrUuid, int options = 0); + /** + * Lists completed indexes on the collection 'nsOrUuid'. + */ + virtual std::list<BSONObj> getReadyIndexSpecs(const NamespaceStringOrUUID& nsOrUuid, + int options = 0); + virtual void dropIndex(const std::string& ns, BSONObj keys); virtual void dropIndex(const std::string& ns, const std::string& indexName); @@ -730,6 +740,13 @@ protected: std::vector<std::string> _saslMechsForAuth; private: + /** + * Implementation for getIndexes() and getReadyIndexes(). + */ + std::list<BSONObj> _getIndexSpecs(const NamespaceStringOrUUID& nsOrUuid, + const BSONObj& cmd, + int options); + auth::RunCommandHook _makeAuthRunCommandHook(); /** |