0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

access to raw resultFlags

This commit is contained in:
Eliot Horowitz 2009-04-13 10:47:42 -04:00
parent 7d9eebe983
commit a2479cdf80
2 changed files with 7 additions and 1 deletions

View File

@ -672,6 +672,7 @@ namespace mongo {
void DBClientCursor::dataReceived() {
QueryResult *qr = (QueryResult *) m->data;
resultFlags = qr->resultFlags();
if ( qr->resultFlags() & QueryResult::ResultFlag_CursorNotFound ) {
// cursor id no longer valid at the server.
assert( qr->cursorId == 0 );

View File

@ -178,6 +178,10 @@ namespace mongo {
bool tailable() const {
return (opts & Option_CursorTailable) != 0;
}
bool hasResultFlag( int flag ){
return resultFlags & flag;
}
bool init();
@ -226,6 +230,7 @@ namespace mongo {
int opts;
auto_ptr<Message> m;
int resultFlags;
long long cursorId;
int nReturned;
int pos;
@ -234,7 +239,7 @@ namespace mongo {
void requestMore();
bool ownCursor_;
};
/**
The interface that any db connection should implement