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

Method initUpdateState

src/storage/table/node_table.cpp:480–495  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

478}
479
480void NodeTable::initUpdateState(main::ClientContext* context, TableUpdateState& updateState) const {
481 auto& nodeUpdateState = updateState.cast<NodeTableUpdateState>();
482 nodeUpdateState.indexUpdateState.resize(indexes.size());
483 for (auto i = 0u; i < indexes.size(); i++) {
484 auto& indexHolder = indexes[i];
485 auto index = indexHolder.getIndex();
486 if (index->isPrimary() || !index->isBuiltOnColumn(nodeUpdateState.columnID)) {
487 nodeUpdateState.indexUpdateState[i] = nullptr;
488 continue;
489 }
490 nodeUpdateState.indexUpdateState[i] =
491 index->initUpdateState(context, nodeUpdateState.columnID, [&](offset_t offset) {
492 return isVisible(transaction::Transaction::Get(*context), offset);
493 });
494 }
495}
496
497void NodeTable::update(Transaction* transaction, TableUpdateState& updateState) {
498 // NOTE: We assume all inputs are flattened now. This is to simplify the implementation.

Callers

nothing calls this directly

Calls 5

isVisibleFunction · 0.85
isBuiltOnColumnMethod · 0.80
resizeMethod · 0.45
sizeMethod · 0.45
getIndexMethod · 0.45

Tested by

no test coverage detected