diff options
Diffstat (limited to 'src/mongo/db/pipeline/document_source.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source.cpp | 16 |
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) { |