summaryrefslogtreecommitdiff
path: root/client/dbclient.cpp
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2011-06-18 21:24:54 +0200
committerAntonin Kral <a.kral@bobek.cz>2011-06-18 21:24:54 +0200
commitfefb1e355f6cbe35160f2f73ed68a38d95fa59a2 (patch)
treefaecb2fb6677516c5f6d9edfae8475344ddd73ed /client/dbclient.cpp
parentd95b46b2bbb5b4246213f252010508489b4e5719 (diff)
parent64b33ee522375a8dc15be2875dfb7db4502259b0 (diff)
downloadmongodb-fefb1e355f6cbe35160f2f73ed68a38d95fa59a2.tar.gz
Merge commit 'upstream/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 a68b1af..bb24199 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;