Event Triggers

The eventtrig module defines two classes, EventTrigger and EventTriggerDict, derived from DbObject and DbObjectDict, respectively.

Event Trigger

EventTrigger is derived from DbObject and represents an event trigger available from PostgreSQL 9.3 onwards.

class pyrseas.dbobject.eventtrig.EventTrigger(name, description=None, **attrs)

An event trigger

EventTrigger.create(obj, *args, **kwargs)

Return SQL statements to CREATE the event trigger

Returns:SQL statements

Event Trigger Dictionary

EventTriggerDict is derived from DbObjectDict. It is a dictionary that represents the collection of event triggers in a database.

class pyrseas.dbobject.eventtrig.EventTriggerDict(dbconn=None)

The collection of event triggers in a database

EventTriggerDict.from_map(intriggers, newdb)

Initalize the dictionary of triggers by converting the input map

Parameters:
  • intriggers – YAML map defining the event triggers
  • newdb – dictionary of input database