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

Method IndexCondition

src/jrd/btr.cpp:347–381  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345// IndexCondition class
346
347IndexCondition::IndexCondition(thread_db* tdbb, index_desc* idx)
348 : m_tdbb(tdbb)
349{
350 if (!(idx->idx_flags & idx_condition))
351 return;
352
353 fb_assert(idx->idx_condition);
354 m_condition = idx->idx_condition;
355
356 fb_assert(idx->idx_condition_statement);
357 const auto orgRequest = tdbb->getRequest();
358 m_request = idx->idx_condition_statement->findRequest(tdbb, true);
359
360 if (!m_request)
361 ERR_post(Arg::Gds(isc_random) << "Attempt to evaluate index condition recursively");
362
363 fb_assert(m_request != orgRequest);
364
365 fb_assert(!m_request->req_caller);
366 m_request->req_caller = orgRequest;
367
368 m_request->req_flags &= req_in_use;
369 m_request->req_flags |= req_active;
370
371 TRA_attach_request(tdbb->getTransaction(), m_request);
372 fb_assert(m_request->req_transaction);
373
374 if (orgRequest)
375 m_request->setGmtTimeStamp(orgRequest->getGmtTimeStamp());
376 else
377 m_request->validateTimeStamp();
378
379 m_request->req_rpb[0].rpb_number.setValue(BOF_NUMBER);
380 m_request->req_rpb[0].rpb_number.setValid(true);
381}
382
383IndexCondition::~IndexCondition()
384{

Callers

nothing calls this directly

Calls 11

GdsClass · 0.85
TRA_attach_requestFunction · 0.85
findRequestMethod · 0.80
validateTimeStampMethod · 0.80
setValidMethod · 0.80
ERR_postFunction · 0.70
getRequestMethod · 0.45
getTransactionMethod · 0.45
setGmtTimeStampMethod · 0.45
getGmtTimeStampMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected