summaryrefslogtreecommitdiff
path: root/db/commands.h
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2008-12-28 20:28:49 -0500
committerAaron <aaron@10gen.com>2008-12-28 20:28:49 -0500
commitb7cbd301124045fccab665f939a68d703e70629b (patch)
treee7796053c090b4ee242ef5d1d960e6d78f57ec2b /db/commands.h
parentb53f593e1bc3d13fc831089541f23116fcc1803a (diff)
downloadmongo-b7cbd301124045fccab665f939a68d703e70629b.tar.gz
Replace tab indentation with spaces
Diffstat (limited to 'db/commands.h')
-rw-r--r--db/commands.h24
1 files changed, 14 insertions, 10 deletions
diff --git a/db/commands.h b/db/commands.h
index 24418da8e4b..0c2a54a0dd7 100644
--- a/db/commands.h
+++ b/db/commands.h
@@ -1,16 +1,16 @@
// commands.h
/**
-*
+*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License, version 3,
* as published by the Free Software Foundation.
-*
+*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
-*
+*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@@ -22,14 +22,14 @@ class BSONObjBuilder;
// db "commands" (sent via db.$cmd.findOne(...))
// subclass to make a command.
-class Command {
+class Command {
public:
string name;
- /* run the given command
+ /* run the given command
implement this...
- fromRepl - command is being invoked as part of replication syncing. In this situation you
+ fromRepl - command is being invoked as part of replication syncing. In this situation you
normally do not want to log the command to the local oplog.
return value is true if succeeded. if false, set errmsg text.
@@ -37,19 +37,23 @@ public:
virtual bool run(const char *ns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result, bool fromRepl) = 0;
/* Return true if only the admin ns has privileges to run this command. */
- virtual bool adminOnly() { return false; }
+ virtual bool adminOnly() {
+ return false;
+ }
- /* Return true if slaves of a replication pair are allowed to execute the command
+ /* Return true if slaves of a replication pair are allowed to execute the command
(the command directly from a client -- if fromRepl, always allowed).
*/
virtual bool slaveOk() = 0;
- /* Override and return true to if true,log the operation (logOp()) to the replication log.
+ /* Override and return true to if true,log the operation (logOp()) to the replication log.
(not done if fromRepl of course)
Note if run() returns false, we do NOT log.
*/
- virtual bool logTheOp() { return false; }
+ virtual bool logTheOp() {
+ return false;
+ }
Command(const char *_name);
};