void DBClientCursor::initLazy(bool isRetry) { massert(15875, "DBClientCursor::initLazy called on a client that doesn't support lazy", _client->lazySupported()); Message toSend; _assembleInit(toSend); _client->say(toSend, isRetry, &_originalHost); }
void DBClientCursor::initLazy( bool isRetry ) { massert( 15875 , "DBClientCursor::initLazy called on a client that doesn't support lazy" , _client->lazySupported() ); if (DBClientWithCommands::RunCommandHookFunc hook = _client->getRunCommandHook()) { if (NamespaceString(ns).isCommand()) { BSONObjBuilder bob; bob.appendElements(query); hook(&bob); query = bob.obj(); } } Message toSend; _assembleInit( toSend ); _client->say( toSend, isRetry, &_originalHost ); }
bool DBClientCursor::init() { Message toSend; _assembleInit(toSend); verify(_client); if (!_client->call(toSend, batch.m, false, &_originalHost)) { // log msg temp? log() << "DBClientCursor::init call() failed" << endl; return false; } if (batch.m.empty()) { // log msg temp? log() << "DBClientCursor::init message from call() was empty" << endl; return false; } dataReceived(); return true; }
void DBClientCursor::initLazy() { Message toSend; _assembleInit( toSend ); _lazy = _client->callLazy( toSend ); assert( _lazy ); }
void DBClientCursor::initLazy( bool isRetry ) { verify( 15875 , _client->lazySupported() ); Message toSend; _assembleInit( toSend ); _client->say( toSend, isRetry, &_originalHost ); }