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

Function preModifyEraseTriggers

src/dsql/StmtNodes.cpp:10970–10995  ·  view source on GitHub ↗

Perform operation's pre-triggers, storing active rpb in chain.

Source from the content-addressed store, hash-verified

10968
10969// Perform operation's pre-triggers, storing active rpb in chain.
10970static void preModifyEraseTriggers(thread_db* tdbb, TrigVector** trigs,
10971 StmtNode::WhichTrigger whichTrig, record_param* rpb, record_param* rec, TriggerAction op)
10972{
10973 if (!tdbb->getTransaction()->tra_rpblist)
10974 {
10975 tdbb->getTransaction()->tra_rpblist =
10976 FB_NEW_POOL(*tdbb->getTransaction()->tra_pool) traRpbList(*tdbb->getTransaction()->tra_pool);
10977 }
10978
10979 const int rpblevel = tdbb->getTransaction()->tra_rpblist->PushRpb(rpb);
10980
10981 if (*trigs && whichTrig != StmtNode::POST_TRIG)
10982 {
10983 try
10984 {
10985 EXE_execute_triggers(tdbb, trigs, rpb, rec, op, StmtNode::PRE_TRIG);
10986 }
10987 catch (const Exception&)
10988 {
10989 tdbb->getTransaction()->tra_rpblist->PopRpb(rpb, rpblevel);
10990 throw;
10991 }
10992 }
10993
10994 tdbb->getTransaction()->tra_rpblist->PopRpb(rpb, rpblevel);
10995}
10996
10997// 1. Remove assignments of DEFAULT to computed fields.
10998// 2. Remove assignments to identity column when OVERRIDING USER VALUE is specified in INSERT.

Callers 2

eraseMethod · 0.85
modifyMethod · 0.85

Calls 5

traRpbListClass · 0.85
EXE_execute_triggersFunction · 0.85
PushRpbMethod · 0.80
PopRpbMethod · 0.80
getTransactionMethod · 0.45

Tested by

no test coverage detected