MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / deserialize

Method deserialize

src/storage/wal/records/node_update_record.cpp:28–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28std::unique_ptr<NodeUpdateRecord> NodeUpdateRecord::deserialize(Deserializer& deserializer,
29 const main::ClientContext& clientContext) {
30 std::string key;
31 table_id_t tableID = INVALID_TABLE_ID;
32 if (deserializer.hasRemainingData()) {
33 deserializer.validateDebuggingInfo(key, "table_id");
34 deserializer.deserializeValue<table_id_t>(tableID);
35 }
36 column_id_t columnID = INVALID_COLUMN_ID;
37 if (deserializer.hasRemainingData()) {
38 deserializer.validateDebuggingInfo(key, "column_id");
39 deserializer.deserializeValue<column_id_t>(columnID);
40 }
41 offset_t nodeOffset = INVALID_OFFSET;
42 if (deserializer.hasRemainingData()) {
43 deserializer.validateDebuggingInfo(key, "node_offset");
44 deserializer.deserializeValue<offset_t>(nodeOffset);
45 }
46 std::unique_ptr<ValueVector> propertyVector;
47 if (deserializer.hasRemainingData()) {
48 deserializer.validateDebuggingInfo(key, "property_vector");
49 auto propertyVectorState = std::make_shared<DataChunkState>();
50 propertyVector = ValueVector::deSerialize(deserializer, MemoryManager::Get(clientContext),
51 propertyVectorState);
52 }
53
54 return std::make_unique<NodeUpdateRecord>(std::move(tableID), std::move(columnID),
55 std::move(nodeOffset), std::move(propertyVector));
56}
57
58} // namespace storage
59} // namespace lbug

Callers

nothing calls this directly

Calls 1

validateDebuggingInfoMethod · 0.80

Tested by

no test coverage detected