galaxy.model.triggers package

Submodules

galaxy.model.triggers.history_update_time_field module

Database trigger installation and removal

galaxy.model.triggers.history_update_time_field.install_timestamp_triggers(engine)[source]

Install update_time propagation triggers for history table

galaxy.model.triggers.history_update_time_field.drop_timestamp_triggers(engine)[source]

Remove update_time propagation triggers for history table

galaxy.model.triggers.history_update_time_field.get_timestamp_install_sql(variant)[source]

Generate a list of SQL statements for installation of timestamp triggers

galaxy.model.triggers.history_update_time_field.get_timestamp_drop_sql(variant)[source]

Generate a list of statements to drop the timestamp update triggers

galaxy.model.triggers.history_update_time_field.build_pg_timestamp_fn(fn_name, target_table, source_key, target_key='id')[source]

Generates a PostgreSQL history update timestamp function

galaxy.model.triggers.history_update_time_field.build_pg_trigger(source_table, fn_name, when='AFTER')[source]

Assigns a PostgreSQL trigger to indicated table, calling user-defined function

galaxy.model.triggers.history_update_time_field.build_timestamp_trigger(operation, source_table, target_table, source_key, target_key='id', when='AFTER')[source]

Creates a non-PostgreSQL update_time trigger

galaxy.model.triggers.history_update_time_field.build_drop_trigger(operation, source_table, when='AFTER')[source]

Drops a non-PostgreSQL trigger by name

galaxy.model.triggers.history_update_time_field.get_trigger_name(operation, source_table, when)[source]

Non-PostgreSQL trigger name

galaxy.model.triggers.update_audit_table module

galaxy.model.triggers.update_audit_table.install(engine)[source]

Install history audit table triggers

galaxy.model.triggers.update_audit_table.remove(engine)[source]

Uninstall history audit table triggers

galaxy.model.triggers.update_audit_table.get_trigger_name(label, operation, when, statement=False)[source]

galaxy.model.triggers.utils module

galaxy.model.triggers.utils.execute_statements(engine, raw_sql)[source]