| 1147 | } |
| 1148 | |
| 1149 | ExtMsgGetMore::ExtMsgGetMore(ExtMsgHeader* header, const uint8_t* body) : header(header) { |
| 1150 | const uint8_t* ptr = body; |
| 1151 | const uint8_t* eom = (const uint8_t*)header + header->messageLength; |
| 1152 | |
| 1153 | // Mongo OP_GET_MORE begins with int32 ZERO, reserved for future use |
| 1154 | ptr += sizeof(int32_t); |
| 1155 | |
| 1156 | const char* collName = (const char*)ptr; |
| 1157 | ptr += strlen(collName) + 1; |
| 1158 | ns = getDBCollectionPair(collName, std::make_pair("msgType", "OP_GETMORE")); |
| 1159 | |
| 1160 | numberToReturn = *(int32_t*)ptr; |
| 1161 | ptr += sizeof(int32_t); |
| 1162 | cursorID = *(int64_t*)ptr; |
| 1163 | ptr += sizeof(int64_t); |
| 1164 | |
| 1165 | ASSERT(ptr == eom); |
| 1166 | } |
| 1167 | |
| 1168 | std::string ExtMsgGetMore::toString() { |
| 1169 | return format("GET_MORE: collection=%s, numberToReturn=%d, cursorID=%d (%s)", fullCollNameToString(ns).c_str(), |
nothing calls this directly
no test coverage detected