8e2528c312791c2c56c8bca365669e06ab698a88,recipes/Python/576621_Dump_Informix_schema_to_text/recipe-576621.py,,show_triggers,#,511

Before Change


	show triggers
	show_qry("triggers", TRIGGERS_INFO_SQL)
	print("\n\n")
	print("--- %s ---" % "triggers bodies")
	querystr1 = SELECT trigid, tabname, trigname
FROM systables, systriggers
WHERE tabtype="T"
AND systables.tabid >= 100

After Change


def show_triggers():
	show triggers
	show_qry("triggers", TRIGGERS_INFO_SQL)
	title = "triggers bodies"
	print_start_info(title)
	querystr1 = SELECT trigid, tabname, trigname
FROM systables, systriggers
WHERE tabtype="T"
AND systables.tabid >= 100
AND systables.tabid = systriggers.tabid
ORDER BY tabname, trigname
	querystr2 = SELECT data FROM systrigbody
WHERE trigid=%s
AND (datakey = "D")
ORDER BY seqno
	
	querystr3 = SELECT data FROM systrigbody
WHERE trigid=%s
AND (datakey = "A")
ORDER BY seqno

	rs = select_qry(querystr1)
	if rs:
		for row in rs:
			trigname = "trigger %s" % (row[2])
			trigid = row[0]
			for row in rs:
				body_def = get_body(querystr2 % trigid)
				body_txt = get_body(querystr3 % trigid)
				output_line("\n\n -- >>> %s >>> --" % trigname)
				output_line(body_def)
				output_line(body_txt)
				output_line("\n\n -- <<< %s <<< --" % trigname)
	print_stop_info(title)


def get_info_filter():
	result = ""
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: ActiveState/code
Commit Name: 8e2528c312791c2c56c8bca365669e06ab698a88
Time: 2017-11-28
Author: mn@mn.heuthesd
File Name: recipes/Python/576621_Dump_Informix_schema_to_text/recipe-576621.py
Class Name:
Method Name: show_triggers


Project Name: ActiveState/code
Commit Name: 8e2528c312791c2c56c8bca365669e06ab698a88
Time: 2017-11-28
Author: mn@mn.heuthesd
File Name: recipes/Python/576621_Dump_Informix_schema_to_text/recipe-576621.py
Class Name:
Method Name: show_procedures


Project Name: ActiveState/code
Commit Name: 8e2528c312791c2c56c8bca365669e06ab698a88
Time: 2017-11-28
Author: mn@mn.heuthesd
File Name: recipes/Python/576621_Dump_Informix_schema_to_text/recipe-576621.py
Class Name:
Method Name: show_views


Project Name: ActiveState/code
Commit Name: 8e2528c312791c2c56c8bca365669e06ab698a88
Time: 2017-11-28
Author: mn@mn.heuthesd
File Name: recipes/Python/576621_Dump_Informix_schema_to_text/recipe-576621.py
Class Name:
Method Name: show_triggers


Project Name: ActiveState/code
Commit Name: 8e2528c312791c2c56c8bca365669e06ab698a88
Time: 2017-11-28
Author: mn@mn.heuthesd
File Name: recipes/Python/576621_Dump_Informix_schema_to_text/recipe-576621.py
Class Name:
Method Name: show_indexes