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

Method delete_

src/storage/table/rel_table_data.cpp:126–145  ·  view source on GitHub ↗

NOLINTNEXTLINE(readability-make-member-function-const): Semantically non-const.

Source from the content-addressed store, hash-verified

124
125// NOLINTNEXTLINE(readability-make-member-function-const): Semantically non-const.
126bool RelTableData::delete_(Transaction* transaction, ValueVector& boundNodeIDVector,
127 const ValueVector& relIDVector) {
128 const auto boundNodePos = boundNodeIDVector.state->getSelVector()[0];
129 const auto relIDPos = relIDVector.state->getSelVector()[0];
130 if (boundNodeIDVector.isNull(boundNodePos) || relIDVector.isNull(relIDPos)) {
131 return false;
132 }
133 const auto [source, rowIdx] = findMatchingRow(transaction, boundNodeIDVector, relIDVector);
134 if (rowIdx == INVALID_ROW_IDX) {
135 return false;
136 }
137 const auto boundNodeOffset = boundNodeIDVector.getValue<nodeID_t>(boundNodePos).offset;
138 const auto nodeGroupIdx = StorageUtils::getNodeGroupIdx(boundNodeOffset);
139 auto& csrNodeGroup = getNodeGroup(nodeGroupIdx)->cast<CSRNodeGroup>();
140 bool isDeleted = csrNodeGroup.delete_(transaction, source, rowIdx);
141 if (isDeleted && transaction->shouldAppendToUndoBuffer()) {
142 transaction->pushDeleteInfo(nodeGroupIdx, rowIdx, 1, getVersionRecordHandler(source));
143 }
144 return isDeleted;
145}
146
147void RelTableData::addColumn(TableAddColumnState& addColumnState, PageAllocator& pageAllocator) {
148 auto& definition = addColumnState.propertyDefinition;

Callers

nothing calls this directly

Calls 3

getNodeGroupFunction · 0.85
pushDeleteInfoMethod · 0.80
isNullMethod · 0.45

Tested by

no test coverage detected