summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/rename_collection_cmd.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-06-23 10:45:48 -0400
committerMathias Stearn <mathias@10gen.com>2017-07-13 16:53:12 -0400
commit8d555140ce24b9f59e4672a0ed026502fdfffd2c (patch)
tree0ad245d9c2cfb93a80c4978a475cd1a78e35d52e /src/mongo/db/commands/rename_collection_cmd.cpp
parentb6abff538f84abecae2bd7137173a37a8626ac14 (diff)
downloadmongo-8d555140ce24b9f59e4672a0ed026502fdfffd2c.tar.gz
SERVER-29731 get errmsg out of BasicCommand api
It is now only used by commands deriving from ErrmsgCommandDeprecated.
Diffstat (limited to 'src/mongo/db/commands/rename_collection_cmd.cpp')
-rw-r--r--src/mongo/db/commands/rename_collection_cmd.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mongo/db/commands/rename_collection_cmd.cpp b/src/mongo/db/commands/rename_collection_cmd.cpp
index a5a54249d5a..0afd8e7dce6 100644
--- a/src/mongo/db/commands/rename_collection_cmd.cpp
+++ b/src/mongo/db/commands/rename_collection_cmd.cpp
@@ -56,9 +56,9 @@ using std::stringstream;
namespace {
-class CmdRenameCollection : public BasicCommand {
+class CmdRenameCollection : public ErrmsgCommandDeprecated {
public:
- CmdRenameCollection() : BasicCommand("renameCollection") {}
+ CmdRenameCollection() : ErrmsgCommandDeprecated("renameCollection") {}
virtual bool adminOnly() const {
return true;
}
@@ -85,11 +85,11 @@ public:
}
}
- virtual bool run(OperationContext* opCtx,
- const string& dbname,
- const BSONObj& cmdObj,
- string& errmsg,
- BSONObjBuilder& result) {
+ virtual bool errmsgRun(OperationContext* opCtx,
+ const string& dbname,
+ const BSONObj& cmdObj,
+ string& errmsg,
+ BSONObjBuilder& result) {
const auto sourceNsElt = cmdObj[getName()];
const auto targetNsElt = cmdObj["to"];