diff options
author | Mathias Stearn <mathias@10gen.com> | 2013-07-26 17:44:06 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2013-07-26 17:44:06 -0400 |
commit | 21431f5bc46c292bd2962d5bf9aa16dc6f43a121 (patch) | |
tree | 8fc4f27fd1fb02fd47c36c754fa9df87c9aa3fe1 /src/mongo/db/pipeline/document_source.h | |
parent | ea776af8e3f982c488ca6d7476ab79e20733e9a9 (diff) | |
download | mongo-21431f5bc46c292bd2962d5bf9aa16dc6f43a121.tar.gz |
ExpressionContext now has the input namespace
This reduces the amount of PipelineD injection and will make sharded
$out easier (SERVER-10097).
Diffstat (limited to 'src/mongo/db/pipeline/document_source.h')
-rw-r--r-- | src/mongo/db/pipeline/document_source.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/mongo/db/pipeline/document_source.h b/src/mongo/db/pipeline/document_source.h index 6ec8ae16e4a..72b5b8edf3d 100644 --- a/src/mongo/db/pipeline/document_source.h +++ b/src/mongo/db/pipeline/document_source.h @@ -806,21 +806,20 @@ namespace mongo { virtual void sourceToBson(BSONObjBuilder *pBuilder, bool explain) const; private: - DocumentSourceOut(StringData outputCollection, + DocumentSourceOut(const NamespaceString& outputNs, const intrusive_ptr<ExpressionContext> &pExpCtx); // Sets _tempsNs and prepares it to receive data. - void prepTempCollection(const string& finalNs); + void prepTempCollection(); bool _done; NamespaceString _tempNs; // output goes here as it is being processed. - const string _outputCollection; // output will go here after all data is processed. + const NamespaceString _outputNs; // output will go here after all data is processed. - // These fields are injected by PipelineD. This division of labor allows the + // This field is injected by PipelineD. This division of labor allows the // DocumentSourceOut class to be linked into both mongos and mongod while // allowing it to use DBDirectClient when in mongod. - string _db; boost::scoped_ptr<DBClientBase> _conn; // either NULL or a DBDirectClient friend class PipelineD; }; @@ -1217,7 +1216,7 @@ namespace mongo { DocumentSourceGeoNear(const intrusive_ptr<ExpressionContext> &pExpCtx); void parseOptions(BSONObj options); - BSONObj buildGeoNearCmd(const StringData& collection) const; + BSONObj buildGeoNearCmd() const; void runCommand(); // These fields describe the command to run. @@ -1233,11 +1232,9 @@ namespace mongo { scoped_ptr<FieldPath> includeLocs; bool uniqueDocs; - // These fields are injected by PipelineD. This division of labor allows the + // This field is injected by PipelineD. This division of labor allows the // DocumentSourceGeoNear class to be linked into both mongos and mongod while // allowing it to run a command using DBDirectClient when in mongod. - string db; - string collection; boost::scoped_ptr<DBClientWithCommands> client; // either NULL or a DBDirectClient friend class PipelineD; |