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

Method getNavigation

src/jrd/optimizer/Retrieval.cpp:371–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

369}
370
371IndexTableScan* Retrieval::getNavigation()
372{
373 if (!navigationCandidate)
374 return nullptr;
375
376 IndexScratch* const scratch = navigationCandidate->scratch;
377
378 // Looks like we can do a navigational walk. Flag that
379 // we have used this index for navigation, and allocate
380 // a navigational rsb for it.
381 scratch->index->idx_runtime_flags |= idx_navigate;
382
383 const USHORT key_length =
384 ROUNDUP(BTR_key_length(tdbb, relation, scratch->index), sizeof(SLONG));
385
386 InversionNode* const index_node = makeIndexScanNode(scratch);
387
388 return FB_NEW_POOL(getPool())
389 IndexTableScan(csb, getAlias(), stream, relation, index_node, key_length,
390 navigationCandidate->selectivity);
391}
392
393void Retrieval::analyzeNavigation(const InversionCandidateList& inversions)
394{

Callers 1

generateRetrievalMethod · 0.80

Calls 2

BTR_key_lengthFunction · 0.85
IndexTableScanClass · 0.70

Tested by

no test coverage detected