diff options
Diffstat (limited to 'src/mongo/db/commands/group.h')
-rw-r--r-- | src/mongo/db/commands/group.h | 118 |
1 files changed, 63 insertions, 55 deletions
diff --git a/src/mongo/db/commands/group.h b/src/mongo/db/commands/group.h index d6486a8d978..eab554dd1f8 100644 --- a/src/mongo/db/commands/group.h +++ b/src/mongo/db/commands/group.h @@ -32,60 +32,68 @@ namespace mongo { - class ClientBasic; - class Database; - class OperationContext; - class PlanExecutor; - class Scope; - - struct GroupRequest; - - class GroupCommand : public Command { - public: - GroupCommand(); - - private: - virtual bool isWriteCommandForConfigServer() const { return false; } - - virtual bool maintenanceOk() const { return false; } - - virtual bool slaveOk() const { return false; } - - virtual bool slaveOverrideOk() const { return true; } - - virtual void help(std::stringstream& help) const { - help << "http://dochub.mongodb.org/core/aggregation"; - } - - virtual Status checkAuthForCommand(ClientBasic* client, - const std::string& dbname, - const BSONObj& cmdObj); - - virtual std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const; - - virtual bool run(OperationContext* txn, - const std::string& dbname, - BSONObj& jsobj, - int, - std::string& errmsg, - BSONObjBuilder& result); - - virtual Status explain(OperationContext* txn, - const std::string& dbname, - const BSONObj& cmdObj, - ExplainCommon::Verbosity verbosity, - BSONObjBuilder* out) const; - - /** - * Parse a group command object. - * - * If 'cmdObj' is well-formed, returns Status::OK() and fills in out-argument 'request'. - * - * If a parsing error is encountered, returns an error Status. - */ - Status parseRequest(const std::string& dbname, - const BSONObj& cmdObj, - GroupRequest* request) const; - }; +class ClientBasic; +class Database; +class OperationContext; +class PlanExecutor; +class Scope; + +struct GroupRequest; + +class GroupCommand : public Command { +public: + GroupCommand(); + +private: + virtual bool isWriteCommandForConfigServer() const { + return false; + } + + virtual bool maintenanceOk() const { + return false; + } + + virtual bool slaveOk() const { + return false; + } + + virtual bool slaveOverrideOk() const { + return true; + } + + virtual void help(std::stringstream& help) const { + help << "http://dochub.mongodb.org/core/aggregation"; + } + + virtual Status checkAuthForCommand(ClientBasic* client, + const std::string& dbname, + const BSONObj& cmdObj); + + virtual std::string parseNs(const std::string& dbname, const BSONObj& cmdObj) const; + + virtual bool run(OperationContext* txn, + const std::string& dbname, + BSONObj& jsobj, + int, + std::string& errmsg, + BSONObjBuilder& result); + + virtual Status explain(OperationContext* txn, + const std::string& dbname, + const BSONObj& cmdObj, + ExplainCommon::Verbosity verbosity, + BSONObjBuilder* out) const; + + /** + * Parse a group command object. + * + * If 'cmdObj' is well-formed, returns Status::OK() and fills in out-argument 'request'. + * + * If a parsing error is encountered, returns an error Status. + */ + Status parseRequest(const std::string& dbname, + const BSONObj& cmdObj, + GroupRequest* request) const; +}; } // namespace mongo |