| 589 | |
| 590 | |
| 591 | blb* blb::get_array(thread_db* tdbb, jrd_tra* transaction, const bid* blob_id, |
| 592 | Ods::InternalArrayDesc* desc) |
| 593 | { |
| 594 | /************************************** |
| 595 | * |
| 596 | * b l b : : g e t _ a r r a y |
| 597 | * |
| 598 | ************************************** |
| 599 | * |
| 600 | * Functional description |
| 601 | * Get array blob and array descriptor. |
| 602 | * |
| 603 | **************************************/ |
| 604 | transaction = transaction->getOuter(); |
| 605 | |
| 606 | SET_TDBB(tdbb); |
| 607 | |
| 608 | blb* blob = open2(tdbb, transaction, blob_id, 0, 0); |
| 609 | |
| 610 | if (blob->blb_length < sizeof(Ods::InternalArrayDesc)) |
| 611 | { |
| 612 | blob->BLB_close(tdbb); |
| 613 | IBERROR(193); // msg 193 null or invalid array |
| 614 | } |
| 615 | |
| 616 | blob->BLB_get_segment(tdbb, reinterpret_cast<UCHAR*>(desc), sizeof(Ods::InternalArrayDesc)); |
| 617 | |
| 618 | const USHORT n = desc->iad_length - sizeof(Ods::InternalArrayDesc); |
| 619 | if (n) { |
| 620 | blob->BLB_get_segment(tdbb, reinterpret_cast<UCHAR*>(desc) + sizeof(Ods::InternalArrayDesc), n); |
| 621 | } |
| 622 | |
| 623 | return blob; |
| 624 | } |
| 625 | |
| 626 | |
| 627 | ULONG blb::BLB_get_data(thread_db* tdbb, UCHAR* buffer, SLONG length, bool close) |
nothing calls this directly
no test coverage detected