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

Method initInsertState

src/storage/table/node_table.cpp:437–448  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435}
436
437void NodeTable::initInsertState(main::ClientContext* context, TableInsertState& insertState) {
438 auto& nodeInsertState = insertState.cast<NodeTableInsertState>();
439 nodeInsertState.indexInsertStates.resize(indexes.size());
440 for (auto i = 0u; i < indexes.size(); i++) {
441 auto& indexHolder = indexes[i];
442 const auto index = indexHolder.getIndex();
443 nodeInsertState.indexInsertStates[i] =
444 index->initInsertState(context, [&](offset_t offset) {
445 return isVisible(transaction::Transaction::Get(*context), offset);
446 });
447 }
448}
449
450void NodeTable::insert(Transaction* transaction, TableInsertState& insertState) {
451 const auto& nodeInsertState = insertState.cast<NodeTableInsertState>();

Callers 1

processScanOutputMethod · 0.45

Calls 4

isVisibleFunction · 0.85
resizeMethod · 0.45
sizeMethod · 0.45
getIndexMethod · 0.45

Tested by

no test coverage detected