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

Method createBlob

src/jrd/jrd.cpp:2754–2800  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2752
2753
2754JBlob* JAttachment::createBlob(CheckStatusWrapper* user_status, ITransaction* tra, ISC_QUAD* blob_id,
2755 unsigned int bpb_length, const unsigned char* bpb)
2756{
2757/**************************************
2758 *
2759 * g d s _ $ c r e a t e _ b l o b
2760 *
2761 **************************************
2762 *
2763 * Functional description
2764 * Create a new blob.
2765 *
2766 **************************************/
2767 blb* blob = NULL;
2768
2769 try
2770 {
2771 JTransaction* const jt = getTransactionInterface(user_status, tra);
2772 EngineContextHolder tdbb(user_status, this, FB_FUNCTION);
2773
2774 jrd_tra* transaction = jt->getHandle();
2775 validateHandle(tdbb, transaction);
2776 check_database(tdbb);
2777
2778 try
2779 {
2780 blob = blb::create2(tdbb, transaction, reinterpret_cast<bid*>(blob_id), bpb_length, bpb, true);
2781 }
2782 catch (const Exception& ex)
2783 {
2784 transliterateException(tdbb, ex, user_status, "JAttachment::createBlob");
2785 return NULL;
2786 }
2787 }
2788 catch (const Exception& ex)
2789 {
2790 ex.stuffException(user_status);
2791 return NULL;
2792 }
2793
2794 successful_completion(user_status);
2795
2796 JBlob* jb = FB_NEW JBlob(blob, getStable());
2797 jb->addRef();
2798 blob->blb_interface = jb;
2799 return jb;
2800}
2801
2802
2803JAttachment* JProvider::createDatabase(CheckStatusWrapper* user_status, const char* filename,

Callers 5

blobWriteMethod · 0.45
createMethod · 0.45
flushMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 8

validateHandleFunction · 0.85
check_databaseFunction · 0.85
transliterateExceptionFunction · 0.85
successful_completionFunction · 0.85
JBlobClass · 0.85
getHandleMethod · 0.45
stuffExceptionMethod · 0.45
addRefMethod · 0.45

Tested by

no test coverage detected