File: create_change_trigger.template

package info (click to toggle)
flamerobin 0.9.13.ds.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,300 kB
  • sloc: cpp: 59,818; sh: 10,505; xml: 1,029; ansic: 302; makefile: 27
file content (14 lines) | stat: -rw-r--r-- 588 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{%--:Uncomment to edit template info visually.%}{%--:{%edit_info%}{%abort%}%}{%edit_conf%}{%kw:set term !! ;
create trigger%} CT_{%object_name%} {%kw:for%} {%object_quoted_name%}
{%kw:active after update position {%getconf:{%object_path%}/triggerPosition:99%}
as
begin
{%tab%}if%} ({%foreach:column:
{%tab%}{%tab%}{%kw:or%} :{%ifcontains:{%getconf:{%object_path%}/columnNames%}:{%object_name%}:{%kw:old%}.{%object_quoted_name%} {%kw:is distinct from new%}.{%object_quoted_name%}%}%})
{%tab%}{%kw:then
{%tab%}begin%}
{%tab%}{%tab%}/* do something */
{%tab%}{%kw:end
end!!

set term%} ; !!