summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-01-27 13:45:48 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2018-02-02 15:38:47 -0500
commited7af7cc923316749055d4be7486918d30ed8c59 (patch)
treefc49d0dd643168d712cd122e86e3031b98346777 /src/mongo/db/commands.h
parent721d2547c6c2883b522740dc2b7ff420aeebb7e9 (diff)
downloadmongo-ed7af7cc923316749055d4be7486918d30ed8c59.tar.gz
SERVER-32367 Make the Command::parseNs* methods take StringData
Diffstat (limited to 'src/mongo/db/commands.h')
-rw-r--r--src/mongo/db/commands.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h
index 48cce22e3a6..762b87a87ca 100644
--- a/src/mongo/db/commands.h
+++ b/src/mongo/db/commands.h
@@ -50,30 +50,27 @@
namespace mongo {
+class Command;
class OperationContext;
-class Timer;
namespace mutablebson {
class Document;
} // namespace mutablebson
-class Command;
-
// Various helpers unrelated to any single command or to the command registry.
// Would be a namespace, but want to keep it closed rather than open.
// Some of these may move to the BasicCommand shim if they are only for legacy implementations.
struct CommandHelpers {
// The type of the first field in 'cmdObj' must be mongo::String. The first field is
// interpreted as a collection name.
- static std::string parseNsFullyQualified(const std::string& dbname, const BSONObj& cmdObj);
+ static std::string parseNsFullyQualified(StringData dbname, const BSONObj& cmdObj);
// The type of the first field in 'cmdObj' must be mongo::String or Symbol.
// The first field is interpreted as a collection name.
- static NamespaceString parseNsCollectionRequired(const std::string& dbname,
- const BSONObj& cmdObj);
+ static NamespaceString parseNsCollectionRequired(StringData dbname, const BSONObj& cmdObj);
static NamespaceString parseNsOrUUID(OperationContext* opCtx,
- const std::string& dbname,
+ StringData dbname,
const BSONObj& cmdObj);
static Command* findCommand(StringData name);
@@ -245,7 +242,6 @@ public:
*/
virtual bool supportsWriteConcern(const BSONObj& cmd) const = 0;
-
/**
* Return true if only the admin ns has privileges to run this command.
*/