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:
stringDescription: The name of the trigger.
actionTiming:
Type:
TriggerActionTimingPostgres | TriggerActionTimingMysqlDescription: Defines the timing of the trigger execution (before or after an operation).
eventManipulation:
Type:
TriggerEventManipulationPostgres | TriggerEventManipulationMysqlDescription: Defines the event that activates the trigger (INSERT, UPDATE, DELETE).
condition:
Type:
stringDescription: The condition under which the trigger will execute.
forEachRow:
Type:
booleanDescription: Indicates whether the trigger should execute for each row being modified.
statement:
Type:
stringDescription: The SQL query executed when the trigger is activated.
Last updated