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

Method get_array

src/jrd/blb.cpp:591–624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

589
590
591blb* 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
627ULONG blb::BLB_get_data(thread_db* tdbb, UCHAR* buffer, SLONG length, bool close)

Callers

nothing calls this directly

Calls 4

SET_TDBBFunction · 0.85
getOuterMethod · 0.80
BLB_closeMethod · 0.80
BLB_get_segmentMethod · 0.80

Tested by

no test coverage detected