예제 #1
0
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);
}
예제 #2
0
 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 );
 }
예제 #3
0
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;
}
예제 #4
0
 void DBClientCursor::initLazy() {
     Message toSend;
     _assembleInit( toSend );
     _lazy = _client->callLazy( toSend );
     assert( _lazy );
 }
예제 #5
0
 void DBClientCursor::initLazy( bool isRetry ) {
     verify( 15875 , _client->lazySupported() );
     Message toSend;
     _assembleInit( toSend );
     _client->say( toSend, isRetry, &_originalHost );
 }