| 757 | } |
| 758 | |
| 759 | void 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 | |
| 784 | USHORT IscBlob::read(thread_db* tdbb, UCHAR* buff, USHORT len) |
| 785 | { |
no test coverage detected