diff options
| author | Antonin Kral <a.kral@bobek.cz> | 2011-06-18 21:24:41 +0200 |
|---|---|---|
| committer | Antonin Kral <a.kral@bobek.cz> | 2011-06-18 21:24:41 +0200 |
| commit | 64b33ee522375a8dc15be2875dfb7db4502259b0 (patch) | |
| tree | 44979e0aaf6bb576f4a737a93e071e28809b6779 /client/dbclient.cpp | |
| parent | 4d87ff4aa74d7ae975268ac43eee152dc3f5b7e9 (diff) | |
Imported Upstream version 1.8.2upstream/1.8.2
Diffstat (limited to 'client/dbclient.cpp')
| -rw-r--r-- | client/dbclient.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/dbclient.cpp b/client/dbclient.cpp index a68b1af2adc..bb2419951b4 100644 --- a/client/dbclient.cpp +++ b/client/dbclient.cpp @@ -442,15 +442,16 @@ namespace mongo { return false; } - BSONObj DBClientWithCommands::mapreduce(const string &ns, const string &jsmapf, const string &jsreducef, BSONObj query, const string& outputcolname) { + DBClientWithCommands::MROutput DBClientWithCommands::MRInline (BSON("inline" << 1)); + + BSONObj DBClientWithCommands::mapreduce(const string &ns, const string &jsmapf, const string &jsreducef, BSONObj query, MROutput output) { BSONObjBuilder b; b.append("mapreduce", nsGetCollection(ns)); b.appendCode("map", jsmapf); b.appendCode("reduce", jsreducef); if( !query.isEmpty() ) b.append("query", query); - if( !outputcolname.empty() ) - b.append("out", outputcolname); + b.append("out", output.out); BSONObj info; runCommand(nsGetDB(ns), b.done(), info); return info; |
