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

Method compileRequest

src/jrd/jrd.cpp:2700–2751  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2698}
2699
2700JRequest* JAttachment::compileRequest(CheckStatusWrapper* user_status,
2701 unsigned int blr_length, const unsigned char* blr)
2702{
2703/**************************************
2704 *
2705 * g d s _ $ c o m p i l e
2706 *
2707 **************************************
2708 *
2709 * Functional description
2710 *
2711 **************************************/
2712 Statement* stmt = NULL;
2713
2714 try
2715 {
2716 EngineContextHolder tdbb(user_status, this, FB_FUNCTION);
2717 check_database(tdbb);
2718
2719 TraceBlrCompile trace(tdbb, blr_length, blr);
2720 try
2721 {
2722 stmt = CMP_compile(tdbb, blr, blr_length, false, 0, nullptr);
2723
2724 const auto attachment = tdbb->getAttachment();
2725 const auto rootRequest = stmt->getRequest(tdbb, 0);
2726 rootRequest->setAttachment(attachment);
2727 attachment->att_requests.add(rootRequest);
2728
2729 trace.finish(stmt, ITracePlugin::RESULT_SUCCESS);
2730 }
2731 catch (const Exception& ex)
2732 {
2733 const ISC_STATUS exc = transliterateException(tdbb, ex, user_status, "JAttachment::compileRequest");
2734 const bool no_priv = (exc == isc_no_priv);
2735 trace.finish(NULL, no_priv ? ITracePlugin::RESULT_UNAUTHORIZED : ITracePlugin::RESULT_FAILED);
2736
2737 return NULL;
2738 }
2739 }
2740 catch (const Exception& ex)
2741 {
2742 ex.stuffException(user_status);
2743 return NULL;
2744 }
2745
2746 successful_completion(user_status);
2747
2748 JRequest* jr = FB_NEW JRequest(stmt, getStable());
2749 jr->addRef();
2750 return jr;
2751}
2752
2753
2754JBlob* JAttachment::createBlob(CheckStatusWrapper* user_status, ITransaction* tra, ISC_QUAD* blob_id,

Callers

nothing calls this directly

Calls 12

check_databaseFunction · 0.85
CMP_compileFunction · 0.85
transliterateExceptionFunction · 0.85
successful_completionFunction · 0.85
JRequestClass · 0.85
getAttachmentMethod · 0.45
getRequestMethod · 0.45
setAttachmentMethod · 0.45
addMethod · 0.45
finishMethod · 0.45
stuffExceptionMethod · 0.45
addRefMethod · 0.45

Tested by

no test coverage detected