summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source.cpp
diff options
context:
space:
mode:
authormatt dannenberg <matt.dannenberg@10gen.com>2013-08-12 16:53:05 -0400
committermatt dannenberg <matt.dannenberg@10gen.com>2013-08-28 15:52:46 -0400
commit47272101ae458bfa0c01809bf5309a4c08c8e9c6 (patch)
treeb11250cad8313ad3ca3b5a47bcefdf64dd05092c /src/mongo/db/pipeline/document_source.cpp
parent40132af8cf5b0b9ab79f24dbce72d4d5b6af88f2 (diff)
downloadmongo-47272101ae458bfa0c01809bf5309a4c08c8e9c6.tar.gz
serialize to replace toBson in document sources and pipeline
Diffstat (limited to 'src/mongo/db/pipeline/document_source.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/mongo/db/pipeline/document_source.cpp b/src/mongo/db/pipeline/document_source.cpp
index 1cfb2d8c689..e91dc62e102 100644
--- a/src/mongo/db/pipeline/document_source.cpp
+++ b/src/mongo/db/pipeline/document_source.cpp
@@ -18,6 +18,7 @@
#include "mongo/db/pipeline/document_source.h"
#include "mongo/db/pipeline/expression_context.h"
+#include "mongo/db/pipeline/value.h"
namespace mongo {
@@ -55,18 +56,11 @@ namespace mongo {
}
}
- void DocumentSource::addToBsonArray(
- BSONArrayBuilder *pBuilder, bool explain) const {
- BSONObjBuilder insides;
- sourceToBson(&insides, explain);
-
-/* No statistics at this time
- if (explain) {
- insides.append("nOut", nOut);
+ void DocumentSource::serializeToArray(vector<Value>& array, bool explain) const {
+ Value entry = serialize(explain);
+ if (!entry.missing()) {
+ array.push_back(entry);
}
-*/
-
- pBuilder->append(insides.done());
}
BSONObj DocumentSource::depsToProjection(const set<string>& deps) {