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

Method isVisible

src/storage/table/node_table.cpp:781–793  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

779}
780
781bool NodeTable::isVisible(const Transaction* transaction, offset_t offset) const {
782 if (transaction && transaction->isUnCommitted(tableID, offset)) {
783 const auto localTable = transaction->getLocalStorage()->getLocalTable(tableID);
784 DASSERT(localTable);
785 return localTable->cast<LocalNodeTable>().isVisible(transaction, offset);
786 }
787 auto [nodeGroupIdx, offsetInGroup] = StorageUtils::getNodeGroupIdxAndOffsetInChunk(offset);
788 if (nodeGroupIdx >= nodeGroups->getNumNodeGroups()) {
789 return false;
790 }
791 const auto* nodeGroup = getNodeGroup(nodeGroupIdx);
792 return nodeGroup->isVisible(transaction, offsetInGroup);
793}
794
795bool NodeTable::isVisibleNoLock(const Transaction* transaction, offset_t offset) const {
796 if (transaction && transaction->isUnCommitted(tableID, offset)) {

Callers 1

isVisibleNoLockMethod · 0.45

Calls 4

getNodeGroupFunction · 0.85
isUnCommittedMethod · 0.80
getLocalTableMethod · 0.80
getNumNodeGroupsMethod · 0.45

Tested by

no test coverage detected