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

Method scanNext

src/storage/table/rel_table.cpp:122–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120}
121
122bool RelTableScanState::scanNext(Transaction* transaction) {
123 while (true) {
124 switch (source) {
125 case TableScanSource::COMMITTED: {
126 const auto scanResult = nodeGroup->scan(transaction, *this);
127 if (scanResult == NODE_GROUP_SCAN_EMPTY_RESULT) {
128 if (hasUnCommittedData()) {
129 initStateForUncommitted();
130 } else {
131 source = TableScanSource::NONE;
132 }
133 continue;
134 }
135 return true;
136 }
137 case TableScanSource::UNCOMMITTED: {
138 DASSERT(localTableScanState && localTableScanState->localRelTable);
139 return localTableScanState->localRelTable->scan(transaction, *this);
140 }
141 case TableScanSource::NONE: {
142 return false;
143 }
144 default: {
145 UNREACHABLE_CODE;
146 }
147 }
148 }
149}
150
151void RelTableScanState::setNodeIDVectorToFlat(sel_t selPos) const {
152 nodeIDVector->state->setToFlat();

Callers 2

scanInternalMethod · 0.45
nextMethod · 0.45

Calls 1

scanMethod · 0.45

Tested by

no test coverage detected