diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 00:22:50 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 10:56:02 -0400 |
commit | 9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch) | |
tree | 3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/db/commands/explain_cmd.h | |
parent | 01965cf52bce6976637ecb8f4a622aeb05ab256a (diff) | |
download | mongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz |
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/db/commands/explain_cmd.h')
-rw-r--r-- | src/mongo/db/commands/explain_cmd.h | 96 |
1 files changed, 51 insertions, 45 deletions
diff --git a/src/mongo/db/commands/explain_cmd.h b/src/mongo/db/commands/explain_cmd.h index 24edec205ca..7d77bd3af36 100644 --- a/src/mongo/db/commands/explain_cmd.h +++ b/src/mongo/db/commands/explain_cmd.h @@ -33,57 +33,63 @@ namespace mongo { - /** - * The explain command is used to generate explain output for any read or write - * operation which has a query component (e.g. find, count, update, remove, distinct, etc.). - * - * The explain command takes as its argument a nested object which specifies the command to - * explain, and a verbosity indicator. For example: - * - * {explain: {count: "coll", query: {foo: "bar"}}, verbosity: "executionStats"} - * - * This command like a dispatcher: it just retrieves a pointer to the nested command and - * invokes its explain() implementation. - */ - class CmdExplain : public Command { - public: - CmdExplain() : Command("explain") { } - - virtual bool isWriteCommandForConfigServer() const { return false; } +/** + * The explain command is used to generate explain output for any read or write + * operation which has a query component (e.g. find, count, update, remove, distinct, etc.). + * + * The explain command takes as its argument a nested object which specifies the command to + * explain, and a verbosity indicator. For example: + * + * {explain: {count: "coll", query: {foo: "bar"}}, verbosity: "executionStats"} + * + * This command like a dispatcher: it just retrieves a pointer to the nested command and + * invokes its explain() implementation. + */ +class CmdExplain : public Command { +public: + CmdExplain() : Command("explain") {} - /** - * Running an explain on a secondary requires explicitly setting slaveOk. - */ - virtual bool slaveOk() const { - return false; - } - virtual bool slaveOverrideOk() const { - return true; - } + virtual bool isWriteCommandForConfigServer() const { + return false; + } - virtual bool maintenanceOk() const { return false; } + /** + * Running an explain on a secondary requires explicitly setting slaveOk. + */ + virtual bool slaveOk() const { + return false; + } + virtual bool slaveOverrideOk() const { + return true; + } - virtual bool adminOnly() const { return false; } + virtual bool maintenanceOk() const { + return false; + } - virtual void help( std::stringstream& help ) const { - help << "explain database reads and writes"; - } + virtual bool adminOnly() const { + return false; + } - /** - * You are authorized to run an explain if you are authorized to run - * the command that you are explaining. The auth check is performed recursively - * on the nested command. - */ - virtual Status checkAuthForCommand(ClientBasic* client, - const std::string& dbname, - const BSONObj& cmdObj); + virtual void help(std::stringstream& help) const { + help << "explain database reads and writes"; + } - virtual bool run(OperationContext* txn, - const std::string& dbname, - BSONObj& cmdObj, int options, - std::string& errmsg, - BSONObjBuilder& result); + /** + * You are authorized to run an explain if you are authorized to run + * the command that you are explaining. The auth check is performed recursively + * on the nested command. + */ + virtual Status checkAuthForCommand(ClientBasic* client, + const std::string& dbname, + const BSONObj& cmdObj); - }; + virtual bool run(OperationContext* txn, + const std::string& dbname, + BSONObj& cmdObj, + int options, + std::string& errmsg, + BSONObjBuilder& result); +}; } // namespace mongo |