MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / fetchRecord

Method fetchRecord

src/jrd/recsrc/NestedLoopJoin.cpp:353–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351}
352
353bool NestedLoopJoin::fetchRecord(thread_db* tdbb, FB_SIZE_T n) const
354{
355 fb_assert(m_joinType == INNER_JOIN);
356
357 const RecordSource* const arg = m_args[n];
358
359 if (arg->getRecord(tdbb))
360 return true;
361
362 // We have exhausted this stream, so close it; if there is
363 // another candidate record from the n-1 streams to the left,
364 // then reopen the stream and start again from the beginning.
365
366 while (true)
367 {
368 arg->close(tdbb);
369
370 if (n == 0 || !fetchRecord(tdbb, n - 1))
371 return false;
372
373 arg->open(tdbb);
374
375 if (arg->getRecord(tdbb))
376 return true;
377 }
378}

Callers

nothing calls this directly

Calls 3

getRecordMethod · 0.45
closeMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected