Routines
| Name | Type | Language | Deterministic | Return Type | Security Restriction | Comments |
|---|---|---|---|---|---|---|
| trig_b_i_syst_hierarchies_validate_inactive() | FUNCTION | plpgsql | false | trigger | INVOKER | Prevents Hierarchy records from being inserted in an already “active” state. General Usage Hierarchy records should be inserted “inactive” and then later made “active” once the record and its associate Hierarchy Item records are complete and valid. |
| trig_b_u_syst_hierarchies_validate_structured() | FUNCTION | plpgsql | false | trigger | INVOKER | A trigger function which ensures that changing a hierarchy between being “structured” and “unstructured” is only possible when the Hierarchy record is in an “inactive” state. Trigger Function Details:
|
| trig_b_u_syst_hierarchy_items_hierarchy_inactive_check() | FUNCTION | plpgsql | false | trigger | DEFINER | Ensures that, if a functionally significant column is changed during an update operation, that the parent Hierarchy record is set to an “inactive” state. Trigger Function Details:
|
| trig_b_iu_syst_hierarchy_items_depth_maint() | FUNCTION | plpgsql | false | trigger | INVOKER | Manages the Trigger Function Details:
General Usage When a new Hierarchy Item record is inserted without specifying a When a new Hierarchy Item record is inserted specifying an explicit Updated records follow the same patterns as inserted records, except that we do not expect that the update will attempt to NULL the |
| trig_b_d_syst_hierarchy_items_hierarchy_inactive_check() | FUNCTION | plpgsql | false | trigger | INVOKER | Verifies that the parent Hierarchy is in an “inactive” prior to allowing deletion of the Hierarchy Item record. Trigger Function Details:
|
| trig_b_iu_syst_enum_items_validate_functional_types() | FUNCTION | plpgsql | false | trigger | INVOKER | Ensures that if the parent syst_enums record has syst_enum_functional_types records defined, a syst_enum_items record will reference one of those functional types. Trigger Function Details:
General Usage Note that this trigger function is intended to be use by constraint triggers. |
| trig_a_iu_syst_enum_items_maintain_sort_order() | FUNCTION | plpgsql | false | trigger | INVOKER | Automatically maintains the sort order of syst_enum_item records in cases where sort ordering collides with existing syst_enum_items records for the same enum_id. Trigger Function Details:
General Usage On insert or update when the new sort_order value matches that of an existing record for the enumeration, the system will sort the match record after the new/updated record. This will cascade for all syst_enum_items records matching the enum_id until the last one is updated. |
| trig_b_i_syst_enum_functional_type_validate_new_allowed() | FUNCTION | plpgsql | false | trigger | INVOKER | Checks to see if this is the first functional type being added for the enumeration and, if so, that no syst_enum_items records already exist. Trigger Function Details:
General Usage Adding a first functional type for an enumeration which already has defined enumeration items implies that the enumeration items must be assigned a functional type in the same operation to keep data consistency. In practice, this would be difficult since there would almost certainly have to be multiple functional types available in order to avoid making bogus assignments; it would be much more difficult to manage such a process as compared to simply disallowing the scenario. |
| trig_b_u_syst_hierarchies_validate_state_change() | FUNCTION | plpgsql | false | trigger | INVOKER | Checks that a Hierarchy record’s state may be changed while ensuring that such a change doesn’t allow for data inconsistencies with either of the Hierarchy or the data of Hierarchy implementing Components. Trigger Function Details:
General Usage Setting the Hierarchy to an “active” state requires that the Hierarchy and its associated Hierarchy Items are complete and fully self-consistent. For the “inactive” check, the Hierarchy may not be in use which is defined as being referenced in the data of Hierarchy implementing Components. |
| trig_b_d_syst_hierarchies_validate_prereqs() | FUNCTION | plpgsql | false | trigger | INVOKER | Validates that a Hierarchy is no longer referenced by the data of Hierarchy implementing Components prior to allowing that Hierarchy being deleted. Trigger Function Details:
General Usage Note that references from associated Hierarchy Item records do not count as “references” and that deleting their parent Hierarchy record will cascade to the Hierarchy Item records. |
| trig_b_i_syst_hierarchy_items_hierarchy_prereqs() | FUNCTION | plpgsql | false | trigger | INVOKER | Validates that the Hierarchy conditions of being in an “inactive” state and that the Hierarchy is a “structured” Hierarchy are true. Trigger Function Details:
|
| trig_b_i_syst_enum_items_maintain_sort_order() | FUNCTION | plpgsql | false | trigger | INVOKER | For INSERTed records with a null sort_order value, this trigger will assign a default value assuming the new record should be inserted at the end of the sort. Trigger Function Details:
General Usage If the inserted record was already assigned a sort_order value, the inserted value is respected. |