Warning

This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

galaxy.model.triggers package

Submodules

galaxy.model.triggers.history_update_time_field module

galaxy.model.triggers.update_audit_table module

galaxy.model.triggers.update_audit_table.use_statement_trigger(version: int) → bool[source]

Return True when the postgres version supports the STATEMENT variant.

Fresh installs and the pg_notify migration share this predicate to ensure the trigger function body (STATEMENT references new_table, ROW references NEW) matches the trigger definition installed at that version.

galaxy.model.triggers.update_audit_table.build_trigger_fn(function_name: str, id_field: str, *, use_statement: bool, with_notify: bool = True) → str[source]

Build the plpgsql CREATE OR REPLACE FUNCTION body for an audit trigger.

Shared between runtime install (update_audit_table.install) and alembic migrations so the two cannot drift.

galaxy.model.triggers.update_audit_table.install(engine: Engine) → None[source]

Install history audit table triggers

galaxy.model.triggers.update_audit_table.remove(engine: Engine) → None[source]

Uninstall history audit table triggers

galaxy.model.triggers.update_audit_table.get_trigger_name(label: str, operation: str, when: str, statement: bool = False) → str[source]
galaxy.model.triggers.update_audit_table.execute_statements(engine: Engine, raw_sql: str | list[str]) → None[source]

galaxy.model.triggers.utils module