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

Method tryGetPrimaryKeyIndex

src/storage/table/node_table.cpp:830–844  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

828}
829
830Index* NodeTable::tryGetPrimaryKeyIndex() const {
831 if (auto* pkIndex = tryGetPKIndex()) {
832 return pkIndex;
833 }
834 for (auto& indexHolder : indexes) {
835 if (!indexHolder.isLoaded()) {
836 continue;
837 }
838 auto* loadedIndex = indexHolder.getIndex();
839 if (loadedIndex->isPrimary()) {
840 return loadedIndex;
841 }
842 }
843 return nullptr;
844}
845
846bool NodeTable::lookupPK(const Transaction* transaction, ValueVector* keyVector, uint64_t vectorPos,
847 offset_t& result) const {

Callers 6

IndexLookupMethod · 0.80
initPKIndexMethod · 0.80
executeInternalMethod · 0.80
mapScanNodeTableMethod · 0.80

Calls 2

isLoadedMethod · 0.80
getIndexMethod · 0.45

Tested by

no test coverage detected