MCPcopy Create free account
hub / github.com/FoundationDB/fdb-document-layer / ExtMsgInsert

Method ExtMsgInsert

src/ExtMsg.actor.cpp:605–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

603}
604
605ExtMsgInsert::ExtMsgInsert(ExtMsgHeader* header, const uint8_t* body) : header(header) {
606 const uint8_t* ptr = body;
607 const uint8_t* eom = (const uint8_t*)header + header->messageLength;
608
609 flags = *(int32_t*)ptr;
610 ptr += sizeof(int32_t);
611
612 const char* collName = (const char*)ptr;
613 ptr += strlen(collName) + 1;
614 ns = getDBCollectionPair(collName, std::make_pair("msgType", "OP_INSERT"));
615
616 while (ptr < eom) {
617 bson::BSONObj doc = bson::BSONObj((const char*)ptr);
618 ptr += doc.objsize();
619 documents.push_back(doc);
620 }
621
622 ASSERT(ptr == eom);
623}
624
625std::string ExtMsgInsert::toString() {
626 std::string buf = "INSERT: documents=[ ";

Callers

nothing calls this directly

Calls 1

getDBCollectionPairFunction · 0.85

Tested by

no test coverage detected