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

Method startTransaction

src/jrd/jrd.cpp:4703–4745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4701
4702
4703JTransaction* JAttachment::startTransaction(CheckStatusWrapper* user_status,
4704 unsigned int tpbLength, const unsigned char* tpb)
4705{
4706/**************************************
4707 *
4708 * g d s _ $ s t a r t _ t r a n s a c t i o n
4709 *
4710 **************************************
4711 *
4712 * Functional description
4713 * Start a transaction.
4714 *
4715 **************************************/
4716 jrd_tra* tra = NULL;
4717
4718 try
4719 {
4720 EngineContextHolder tdbb(user_status, this, FB_FUNCTION);
4721 check_database(tdbb);
4722
4723 start_transaction(tdbb, true, &tra, getHandle(), tpbLength, tpb);
4724 }
4725 catch (const Exception& ex)
4726 {
4727 ex.stuffException(user_status);
4728 return NULL;
4729 }
4730
4731 successful_completion(user_status);
4732
4733 JTransaction* jt = tra->getInterface(false);
4734
4735 if (jt)
4736 tra->tra_flags &= ~TRA_own_interface;
4737 else
4738 {
4739 jt = FB_NEW JTransaction(tra, getStable());
4740 tra->setInterface(jt);
4741 jt->addRef();
4742 }
4743
4744 return jt;
4745}
4746
4747
4748void JAttachment::transactRequest(CheckStatusWrapper* user_status, ITransaction* tra,

Callers 14

initItemMethod · 0.45
prepareDataStructuresMethod · 0.45
startMethod · 0.45
executeMethod · 0.45
SecurityDatabaseMethod · 0.45
populateMethod · 0.45
populateMethod · 0.45
populateMethod · 0.45
getListMethod · 0.45
openDbFunction · 0.45
initMethod · 0.45
flushMethod · 0.45

Calls 8

check_databaseFunction · 0.85
start_transactionFunction · 0.85
successful_completionFunction · 0.85
JTransactionClass · 0.85
stuffExceptionMethod · 0.45
getInterfaceMethod · 0.45
setInterfaceMethod · 0.45
addRefMethod · 0.45

Tested by

no test coverage detected