| 376 | } |
| 377 | |
| 378 | FB_UINT64 BufferedStream::getCount(thread_db* tdbb) const |
| 379 | { |
| 380 | Request* const request = tdbb->getRequest(); |
| 381 | Impure* const impure = request->getImpure<Impure>(m_impure); |
| 382 | |
| 383 | // If we haven't fetched and cached the underlying stream completely, do it now |
| 384 | if (impure->irsb_flags & irsb_mustread) |
| 385 | { |
| 386 | while (this->getRecord(tdbb)) |
| 387 | ; // no-op |
| 388 | fb_assert(!(impure->irsb_flags & irsb_mustread)); |
| 389 | } |
| 390 | |
| 391 | return impure->irsb_buffer ? impure->irsb_buffer->getCount() : 0; |
| 392 | } |
no test coverage detected