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

Method open

src/jrd/extds/InternalDS.cpp:758–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

756}
757
758void InternalBlob::open(thread_db* tdbb, Transaction& tran, const dsc& desc, const UCharBuffer* bpb)
759{
760 fb_assert(!m_blob);
761 fb_assert(sizeof(m_blob_id) == desc.dsc_length);
762
763 JAttachment* att = m_connection.getJrdAtt();
764 JTransaction* transaction = static_cast<InternalTransaction&>(tran).getJrdTran();
765 memcpy(&m_blob_id, desc.dsc_address, sizeof(m_blob_id));
766
767 FbLocalStatus status;
768
769 {
770 EngineCallbackGuard guard(tdbb, m_connection, FB_FUNCTION);
771
772 USHORT bpb_len = bpb ? bpb->getCount() : 0;
773 const UCHAR* bpb_buff = bpb ? bpb->begin() : NULL;
774
775 m_blob.assignRefNoIncr(
776 att->openBlob(&status, transaction, &m_blob_id, bpb_len, bpb_buff));
777 }
778
779 if (status->getState() & IStatus::STATE_ERRORS)
780 m_connection.raise(&status, tdbb, "JAttachment::openBlob");
781
782 fb_assert(m_blob);
783}
784
785void InternalBlob::create(thread_db* tdbb, Transaction& tran, dsc& desc, const UCharBuffer* bpb)
786{

Callers

nothing calls this directly

Calls 8

getJrdAttMethod · 0.80
getJrdTranMethod · 0.80
assignRefNoIncrMethod · 0.80
getCountMethod · 0.45
beginMethod · 0.45
openBlobMethod · 0.45
getStateMethod · 0.45
raiseMethod · 0.45

Tested by

no test coverage detected