summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands.h')
-rw-r--r--src/mongo/db/commands.h12
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