summaryrefslogtreecommitdiff
path: root/src/mongo/scripting
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-07-10 15:44:26 -0400
committerMathias Stearn <mathias@10gen.com>2017-07-26 15:13:34 -0400
commit191931c4390ab1ede373e6772aa4d3999518fdaf (patch)
treec35ed32b3570ee9c420f1ee27e6aeb45907952a8 /src/mongo/scripting
parent516e0a50a0fb0e9df45cdc5f74cf0308c3706366 (diff)
downloadmongo-191931c4390ab1ede373e6772aa4d3999518fdaf.tar.gz
SERVER-28509 Flatten DBClient hierarchy to just DBClientBase and subclasses
Diffstat (limited to 'src/mongo/scripting')
-rw-r--r--src/mongo/scripting/engine.cpp2
-rw-r--r--src/mongo/scripting/engine.h7
-rw-r--r--src/mongo/scripting/mozjs/mongo.cpp6
3 files changed, 7 insertions, 8 deletions
diff --git a/src/mongo/scripting/engine.cpp b/src/mongo/scripting/engine.cpp
index 8ae118d21da..483ed7cecd9 100644
--- a/src/mongo/scripting/engine.cpp
+++ b/src/mongo/scripting/engine.cpp
@@ -554,7 +554,7 @@ unique_ptr<Scope> ScriptEngine::getPooledScope(OperationContext* opCtx,
return p;
}
-void (*ScriptEngine::_connectCallback)(DBClientWithCommands&) = 0;
+void (*ScriptEngine::_connectCallback)(DBClientBase&) = 0;
ScriptEngine* getGlobalScriptEngine() {
if (hasGlobalServiceContext())
diff --git a/src/mongo/scripting/engine.h b/src/mongo/scripting/engine.h
index e61fde92774..ff6dd1b1616 100644
--- a/src/mongo/scripting/engine.h
+++ b/src/mongo/scripting/engine.h
@@ -38,7 +38,6 @@ typedef unsigned long long ScriptingFunction;
typedef BSONObj (*NativeFunction)(const BSONObj& args, void* data);
typedef std::map<std::string, ScriptingFunction> FunctionCacheMap;
-class DBClientWithCommands;
class DBClientBase;
class OperationContext;
@@ -264,10 +263,10 @@ public:
void setScopeInitCallback(void (*func)(Scope&)) {
_scopeInitCallback = func;
}
- static void setConnectCallback(void (*func)(DBClientWithCommands&)) {
+ static void setConnectCallback(void (*func)(DBClientBase&)) {
_connectCallback = func;
}
- static void runConnectCallback(DBClientWithCommands& c) {
+ static void runConnectCallback(DBClientBase& c) {
if (_connectCallback)
_connectCallback(c);
}
@@ -285,7 +284,7 @@ protected:
void (*_scopeInitCallback)(Scope&);
private:
- static void (*_connectCallback)(DBClientWithCommands&);
+ static void (*_connectCallback)(DBClientBase&);
};
void installGlobalUtils(Scope& scope);
diff --git a/src/mongo/scripting/mozjs/mongo.cpp b/src/mongo/scripting/mozjs/mongo.cpp
index bbade839e02..1c22e4e5e27 100644
--- a/src/mongo/scripting/mozjs/mongo.cpp
+++ b/src/mongo/scripting/mozjs/mongo.cpp
@@ -125,8 +125,8 @@ void setCursorHandle(MozJSImplScope* scope,
}
void setHiddenMongo(JSContext* cx,
- DBClientWithCommands* resPtr,
- DBClientWithCommands* origConn,
+ DBClientBase* resPtr,
+ DBClientBase* origConn,
JS::CallArgs& args) {
ObjectWrapper o(cx, args.rval());
// If the connection that ran the command is the same as conn, then we set a hidden "_mongo"
@@ -545,7 +545,7 @@ void MongoBase::Functions::copyDatabaseWithSCRAM::call(JSContext* cx, JS::CallAr
std::string password = ValueWriter(cx, args.get(4)).toString();
bool slaveOk = ValueWriter(cx, args.get(5)).toBoolean();
- std::string hashedPwd = DBClientWithCommands::createPasswordDigest(user, password);
+ std::string hashedPwd = DBClientBase::createPasswordDigest(user, password);
std::unique_ptr<SaslClientSession> session(new NativeSaslClientSession());