You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on Connor McDonald's post More triggers are better I've checked the scope of the guideline. Here the results:
✅ ⠀Simple DML trigger (as in Connor's example)
✅ ⠀Compound DML trigger (same code as above in the before each row section)
⛔️ ⠀Instead of Trigger on views (not possible to assign :new values, no locks on the child table)
Maybe it's worth to mention that in the description of the rule.
BTW. Regarding the implementation of this validator check: The check is implemented only partially. I cannot find what's the primary key based on the trigger code (static code analysis without access to Oracle's data dictionary). Therefore I just assume that the primary key is assigned in the trigger. This might lead to false positives when the primary key is not assigned in the trigger code.
The text was updated successfully, but these errors were encountered:
In the fix for #91 I split the old G-7730 - G-7730 is now general rule of trying to avoid multiple DML events in one trigger, while new G-7740 is specific case concerning this child lock behaviour in case of PK assignment (G-7740 being marked as not possible to validate with PL/SQL Cop).
I'll add this scope explanation to G-7740.
Based on Connor McDonald's post More triggers are better I've checked the scope of the guideline. Here the results:
✅ ⠀Simple DML trigger (as in Connor's example)
✅ ⠀Compound DML trigger (same code as above in the
before each row
section)⛔️ ⠀Instead of Trigger on views (not possible to assign
:new
values, no locks on the child table)Maybe it's worth to mention that in the description of the rule.
BTW. Regarding the implementation of this validator check: The check is implemented only partially. I cannot find what's the primary key based on the trigger code (static code analysis without access to Oracle's data dictionary). Therefore I just assume that the primary key is assigned in the trigger. This might lead to false positives when the primary key is not assigned in the trigger code.
The text was updated successfully, but these errors were encountered: