summaryrefslogtreecommitdiff
path: root/dbgrid/request.cpp
diff options
context:
space:
mode:
authorDwight <dmerriman@gmail.com>2008-10-24 17:51:28 -0400
committerDwight <dmerriman@gmail.com>2008-10-24 17:51:28 -0400
commit1875ee8151c15677c7396b15a715be99b8f1ee62 (patch)
treee3b9452176b67de75510785b1f4c99c6eda39d31 /dbgrid/request.cpp
parent13480027d90f8b2da17e099cadaeaa22c04a3be1 (diff)
downloadmongo-1875ee8151c15677c7396b15a715be99b8f1ee62.tar.gz
more dbgrid work
Diffstat (limited to 'dbgrid/request.cpp')
-rw-r--r--dbgrid/request.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/dbgrid/request.cpp b/dbgrid/request.cpp
index 160e897d3db..ba380b5fbe7 100644
--- a/dbgrid/request.cpp
+++ b/dbgrid/request.cpp
@@ -55,26 +55,15 @@ void getMore(Message& m, MessagingPort& p) {
bool runCommandAgainstRegistered(const char *ns, BSONObj& jsobj, BSONObjBuilder& anObjBuilder);
-#include "../db/commands.h"
-
-class IsDbGridCmd : public Command {
-public:
- IsDbGridCmd() : Command("isdbgrid") { }
- bool run(const char *ns, BSONObj& cmdObj, string& errmsg, BSONObjBuilder& result) {
- result.append("isdbgrid", 1);
- return true;
- }
-} isdbgridcmd;
-
void queryOp(Message& m, MessagingPort& p) {
DbMessage d(m);
QueryMessage q(d);
- cout << "TEMPns: " << q.ns << endl;
-
if( q.ntoreturn == -1 && strstr(q.ns, ".$cmd") ) {
BSONObjBuilder builder;
- if( runCommandAgainstRegistered(q.ns, q.query, builder) ) {
+ cout << q.query.toString() << endl;
+ bool ok = runCommandAgainstRegistered(q.ns, q.query, builder);
+ if( ok ) {
BufBuilder b(32768);
b.skip(sizeof(QueryResult));
BSONObj x = builder.done();