summaryrefslogtreecommitdiff
path: root/src/mongo/s/commands/cluster_explain_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/s/commands/cluster_explain_cmd.cpp')
-rw-r--r--src/mongo/s/commands/cluster_explain_cmd.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/s/commands/cluster_explain_cmd.cpp b/src/mongo/s/commands/cluster_explain_cmd.cpp
index 0b7897f416c..a02f11943c6 100644
--- a/src/mongo/s/commands/cluster_explain_cmd.cpp
+++ b/src/mongo/s/commands/cluster_explain_cmd.cpp
@@ -95,7 +95,7 @@ public:
BSONObj explainObj = cmdObj.firstElement().Obj();
- Command* commToExplain = Command::findCommand(explainObj.firstElementFieldName());
+ Command* commToExplain = CommandHelpers::findCommand(explainObj.firstElementFieldName());
if (NULL == commToExplain) {
mongoutils::str::stream ss;
ss << "unknown command: " << explainObj.firstElementFieldName();
@@ -112,7 +112,7 @@ public:
BSONObjBuilder& result) {
auto verbosity = ExplainOptions::parseCmdBSON(cmdObj);
if (!verbosity.isOK()) {
- return appendCommandStatus(result, verbosity.getStatus());
+ return CommandHelpers::appendCommandStatus(result, verbosity.getStatus());
}
// This is the nested command which we are explaining. We need to propagate generic
@@ -134,7 +134,7 @@ public:
// If the argument is in both the inner and outer command, we currently let the
// inner version take precedence.
const auto name = outerElem.fieldNameStringData();
- if (Command::isGenericArgument(name) && !innerObj.hasField(name)) {
+ if (CommandHelpers::isGenericArgument(name) && !innerObj.hasField(name)) {
bob.append(outerElem);
}
}
@@ -142,9 +142,9 @@ public:
}());
const std::string cmdName = explainObj.firstElementFieldName();
- Command* commToExplain = Command::findCommand(cmdName);
+ Command* commToExplain = CommandHelpers::findCommand(cmdName);
if (!commToExplain) {
- return appendCommandStatus(
+ return CommandHelpers::appendCommandStatus(
result,
Status{ErrorCodes::CommandNotFound,
str::stream() << "Explain failed due to unknown command: " << cmdName});
@@ -154,7 +154,7 @@ public:
Status explainStatus =
commToExplain->explain(opCtx, dbName, explainObj, verbosity.getValue(), &result);
if (!explainStatus.isOK()) {
- return appendCommandStatus(result, explainStatus);
+ return CommandHelpers::appendCommandStatus(result, explainStatus);
}
return true;