ores.sql.schema.notify_trigger_drop
Table of Contents
Drop counterpart of the notify trigger. sql profile; output projects/ores.sql/drop/{component}/{component}_{entity_plural}_notify_trigger_drop.sql. PostgreSQL `NOTIFY` trigger: fires a channel notification on every `INSERT`, `UPDATE`, or `DELETE` so the application layer can push real-time updates over NATS.
See the Template variable reference for the complete list of available variables and their semantics. See SQL naming conventions for the official object-name patterns all SQL templates follow.
1. Template
The full template source. Edit here and re-tangle with
compass build --direct tangle_codegen_templates to regenerate
library/templates/sql_schema_notify_trigger_drop.mustache.
{{! GENERATED FILE — tangled from projects/ores.codegen/library/templates/sql_schema.org. Edit the org source. }}
{{! Template to generate SQL drop script for a domain entity notify trigger }}
{{{sql_license}}}
{{#domain_entity}}
/*
* AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
* Template: sql_schema_notify_trigger_drop.mustache
* To modify, update the template and regenerate.
*/
drop trigger if exists {{sql_name_base}}_notify_trg on "{{sql_name_base}}_tbl";
drop function if exists {{sql_name_base}}_notify_fn;
{{/domain_entity}}
{{#junction}}
/*
* AUTO-GENERATED FILE - DO NOT EDIT MANUALLY
* Template: sql_schema_notify_trigger_drop.mustache
* To modify, update the template and regenerate.
*/
drop trigger if exists {{events_channel}}_notify_close_trg on "{{events_channel}}_tbl";
drop trigger if exists {{events_channel}}_notify_trg on "{{events_channel}}_tbl";
drop function if exists {{events_channel}}_notify_fn;
{{/junction}}
2. See also
- Parent facet: ores.sql.schema
- Template variable reference