NOLINTNEXTLINE(readability-make-member-function-const): Semantically non-const.
| 124 | |
| 125 | // NOLINTNEXTLINE(readability-make-member-function-const): Semantically non-const. |
| 126 | bool 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 | |
| 147 | void RelTableData::addColumn(TableAddColumnState& addColumnState, PageAllocator& pageAllocator) { |
| 148 | auto& definition = addColumnState.propertyDefinition; |
nothing calls this directly
no test coverage detected