The trigger module defines two classes, Trigger and TriggerDict, derived from DbSchemaObject and DbObjectDict, respectively.
Trigger is derived from DbSchemaObject and represents a PostgreSQL regular trigger or constraint trigger.
A procedural language trigger
Returns a full identifier for the trigger
| Returns: | string |
|---|
Convert a trigger to a YAML-suitable format
| Returns: | dictionary |
|---|
Return SQL statements to CREATE the trigger
| Returns: | SQL statements |
|---|
TriggerDict is derived from DbObjectDict. It is a dictionary that represents the collection of triggers in a database.
The collection of triggers in a database
Initalize the dictionary of triggers by converting the input map
| Parameters: |
|
|---|
Generate SQL to transform existing triggers
| Parameters: | intriggers – a YAML map defining the new triggers |
|---|---|
| Returns: | list of SQL statements |
Compares the existing trigger definitions, as fetched from the catalogs, to the input map and generates SQL statements to transform the triggers accordingly.