Beispiel #1
0
 QueryResponseBuilder::QueryResponseBuilder( const ParsedQuery &parsedQuery,
                                            const shared_ptr<Cursor> &cursor,
                                            const QueryPlanSummary &queryPlan,
                                            const BSONObj &oldPlan ) :
 _parsedQuery( parsedQuery ),
 _cursor( cursor ),
 _queryOptimizerCursor( dynamic_pointer_cast<QueryOptimizerCursor>( _cursor ) ),
 _buf( 32768 ), // TODO be smarter here
 _chunkManager( newChunkManager() ),
 _explain( newExplainRecordingStrategy( queryPlan, oldPlan ) ),
 _builder( newResponseBuildStrategy( queryPlan ) ) {
     _builder->resetBuf();
 }
Beispiel #2
0
 void QueryResponseBuilder::init( const QueryPlanSummary &queryPlan, const BSONObj &oldPlan ) {
     _collMetadata = newCollMetadata();
     _explain = newExplainRecordingStrategy( queryPlan, oldPlan );
     _builder = newResponseBuildStrategy( queryPlan );
     _builder->resetBuf();
 }