summaryrefslogtreecommitdiff
path: root/client/dbclient.cpp
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2011-06-18 21:24:41 +0200
committerAntonin Kral <a.kral@bobek.cz>2011-06-18 21:24:41 +0200
commit64b33ee522375a8dc15be2875dfb7db4502259b0 (patch)
tree44979e0aaf6bb576f4a737a93e071e28809b6779 /client/dbclient.cpp
parent4d87ff4aa74d7ae975268ac43eee152dc3f5b7e9 (diff)
Imported Upstream version 1.8.2upstream/1.8.2
Diffstat (limited to 'client/dbclient.cpp')
-rw-r--r--client/dbclient.cpp7
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;