diff options
author | PV99 <pridhvi.vegesna@mongodb.com> | 2020-07-09 17:47:54 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-07-15 05:35:52 +0000 |
commit | bd12a2bf57e9fcdcf216d11b67dadc557cfd9d1d (patch) | |
tree | ef810037a1a2762f5433d5c44f0cf998357e1480 /src/mongo/db/commands.h | |
parent | 86296e8ffdae40d0b006276895940c87926c88b0 (diff) | |
download | mongo-bd12a2bf57e9fcdcf216d11b67dadc557cfd9d1d.tar.gz |
SERVER-49061 Command base class changes for Versioned API
Diffstat (limited to 'src/mongo/db/commands.h')
-rw-r--r-- | src/mongo/db/commands.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h index 08af2938a79..c029cf9febe 100644 --- a/src/mongo/db/commands.h +++ b/src/mongo/db/commands.h @@ -58,6 +58,8 @@ namespace mongo { extern FailPoint failCommand; extern FailPoint waitInCommandMarkKillOnClientDisconnect; extern const OperationContext::Decoration<boost::optional<BSONArray>> errorLabelsOverride; +extern const std::set<std::string> kNoApiVersions; +extern const std::set<std::string> kApiVersions1; class Command; class CommandInvocation; @@ -353,6 +355,16 @@ public: return false; } + // List of API versions that include this command. + virtual const std::set<std::string>& apiVersions() const { + return kNoApiVersions; + }; + + // API versions in which this command is deprecated. + virtual const std::set<std::string>& deprecatedApiVersions() const { + return kNoApiVersions; + }; + /** * Like adminOnly, but even stricter: we must either be authenticated for admin db, * or, if running without auth, on the local interface. Used for things which |