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

Function prepareRequest

src/dsql/dsql.cpp:464–488  ·  view source on GitHub ↗

Prepare a request for execution. Note: caller is responsible for pool handling.

Source from the content-addressed store, hash-verified

462// Prepare a request for execution.
463// Note: caller is responsible for pool handling.
464static DsqlRequest* prepareRequest(thread_db* tdbb, dsql_dbb* database, jrd_tra* transaction,
465 ULONG textLength, const TEXT* text, USHORT clientDialect, bool isInternalRequest)
466{
467 TraceDSQLPrepare trace(database->dbb_attachment, transaction, textLength, text, isInternalRequest);
468
469 ntrace_result_t traceResult = ITracePlugin::RESULT_SUCCESS;
470 try
471 {
472 auto statement = prepareStatement(tdbb, database, transaction, textLength, text,
473 clientDialect, isInternalRequest, &traceResult);
474
475 auto dsqlRequest = statement->createRequest(tdbb, database);
476
477 dsqlRequest->req_traced = !isInternalRequest;
478 trace.setStatement(dsqlRequest);
479 trace.prepare(traceResult);
480
481 return dsqlRequest;
482 }
483 catch (const Exception&)
484 {
485 trace.prepare(ITracePlugin::RESULT_FAILED);
486 throw;
487 }
488}
489
490
491// Prepare a statement for execution.

Callers 1

safePrepareRequestFunction · 0.85

Calls 4

prepareStatementFunction · 0.85
createRequestMethod · 0.45
setStatementMethod · 0.45
prepareMethod · 0.45

Tested by

no test coverage detected