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

Method internalGetRecord

src/jrd/recsrc/BitmapTableScan.cpp:84–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84bool BitmapTableScan::internalGetRecord(thread_db* tdbb) const
85{
86 JRD_reschedule(tdbb);
87
88 Request* const request = tdbb->getRequest();
89 record_param* const rpb = &request->req_rpb[m_stream];
90 Impure* const impure = request->getImpure<Impure>(m_impure);
91
92 if (!(impure->irsb_flags & irsb_open))
93 {
94 rpb->rpb_number.setValid(false);
95 return false;
96 }
97
98 RecordBitmap** pbitmap = impure->irsb_bitmap;
99 RecordBitmap* bitmap;
100
101 if (!pbitmap || !(bitmap = *pbitmap))
102 {
103 rpb->rpb_number.setValid(false);
104 return false;
105 }
106
107 if (rpb->rpb_number.isBof() ? bitmap->getFirst() : bitmap->getNext())
108 {
109 do
110 {
111 rpb->rpb_number.setValue(bitmap->current());
112
113 if (VIO_get(tdbb, rpb, request->req_transaction, request->req_pool))
114 {
115 rpb->rpb_number.setValid(true);
116 return true;
117 }
118 } while (bitmap->getNext());
119 }
120
121 rpb->rpb_number.setValid(false);
122 return false;
123}
124
125void BitmapTableScan::getChildren(Array<const RecordSource*>& children) const
126{

Callers

nothing calls this directly

Calls 9

JRD_rescheduleFunction · 0.85
VIO_getFunction · 0.85
setValidMethod · 0.80
getRequestMethod · 0.45
isBofMethod · 0.45
getFirstMethod · 0.45
getNextMethod · 0.45
setValueMethod · 0.45
currentMethod · 0.45

Tested by

no test coverage detected