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

Method update

src/storage/table/rel_table_data.cpp:107–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105}
106
107bool RelTableData::update(Transaction* transaction, ValueVector& boundNodeIDVector,
108 const ValueVector& relIDVector, column_id_t columnID, const ValueVector& dataVector) const {
109 DASSERT(boundNodeIDVector.state->getSelVector().getSelSize() == 1);
110 DASSERT(relIDVector.state->getSelVector().getSelSize() == 1);
111 const auto boundNodePos = boundNodeIDVector.state->getSelVector()[0];
112 const auto relIDPos = relIDVector.state->getSelVector()[0];
113 if (boundNodeIDVector.isNull(boundNodePos) || relIDVector.isNull(relIDPos)) {
114 return false;
115 }
116 const auto [source, rowIdx] = findMatchingRow(transaction, boundNodeIDVector, relIDVector);
117 DASSERT(rowIdx != INVALID_ROW_IDX);
118 const auto boundNodeOffset = boundNodeIDVector.getValue<nodeID_t>(boundNodePos).offset;
119 const auto nodeGroupIdx = StorageUtils::getNodeGroupIdx(boundNodeOffset);
120 auto& csrNodeGroup = getNodeGroup(nodeGroupIdx)->cast<CSRNodeGroup>();
121 csrNodeGroup.update(transaction, source, rowIdx, columnID, dataVector);
122 return true;
123}
124
125// NOLINTNEXTLINE(readability-make-member-function-const): Semantically non-const.
126bool RelTableData::delete_(Transaction* transaction, ValueVector& boundNodeIDVector,

Callers

nothing calls this directly

Calls 3

getNodeGroupFunction · 0.85
getSelSizeMethod · 0.80
isNullMethod · 0.45

Tested by

no test coverage detected