Trigger
Trigger Decorator
The Trigger
decorator is used to create triggers in the database. It takes a TriggerDecoratorInterface
object as a parameter.
Parameters of TriggerDecoratorInterface
name:
Type:
string
Description: The name of the trigger.
actionTiming:
Type:
TriggerActionTimingPostgres | TriggerActionTimingMysql
Description: Defines the timing of the trigger execution (before or after an operation).
eventManipulation:
Type:
TriggerEventManipulationPostgres | TriggerEventManipulationMysql
Description: Defines the event that activates the trigger (INSERT, UPDATE, DELETE).
condition:
Type:
string
Description: The condition under which the trigger will execute.
forEachRow:
Type:
boolean
Description: Indicates whether the trigger should execute for each row being modified.
statement:
Type:
string
Description: The SQL query executed when the trigger is activated.
Last updated