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

Method create

src/jrd/extds/IscDS.cpp:759–782  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

757}
758
759void IscBlob::create(thread_db* tdbb, Transaction& tran, dsc& desc, const UCharBuffer* bpb)
760{
761 fb_assert(!m_handle);
762 fb_assert(sizeof(m_blob_id) == desc.dsc_length);
763
764 FB_API_HANDLE& h_db = m_iscConnection.getAPIHandle();
765 FB_API_HANDLE& h_tran = ((IscTransaction&) tran).getAPIHandle();
766
767 FbLocalStatus status;
768 {
769 EngineCallbackGuard guard(tdbb, m_iscConnection, FB_FUNCTION);
770
771 ISC_USHORT bpb_len = bpb ? bpb->getCount() : 0;
772 const char* bpb_buff = bpb ? reinterpret_cast<const char*>(bpb->begin()) : NULL;
773
774 m_iscProvider.isc_create_blob2(&status, &h_db, &h_tran, &m_handle, &m_blob_id,
775 bpb_len, bpb_buff);
776 memcpy(desc.dsc_address, &m_blob_id, sizeof(m_blob_id));
777 }
778 if (status->getState() & IStatus::STATE_ERRORS) {
779 m_iscConnection.raise(&status, tdbb, "isc_create_blob2");
780 }
781 fb_assert(m_handle);
782}
783
784USHORT IscBlob::read(thread_db* tdbb, UCHAR* buff, USHORT len)
785{

Callers 1

putExtBlobMethod · 0.45

Calls 5

isc_create_blob2Method · 0.80
getCountMethod · 0.45
beginMethod · 0.45
getStateMethod · 0.45
raiseMethod · 0.45

Tested by

no test coverage detected