calendar::apm::before_uninstantiate (private)
calendar::apm::before_uninstantiate -package_id package_id
Defined in packages/calendar/tcl/apm-callback-procs.tcl
Cleanup calendars from this package instance upon uninstantiation.
- Switches:
- -package_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: # get calendar ids set calendar_list [db_list get_calendar_ids { SELECT calendar_id FROM calendars WHERE package_id = :package_id }] # delete calendars foreach calendar_id $calendar_list { # delete all calendar items db_foreach get_calendar_items { SELECT cal_item_id FROM cal_items WHERE on_which_calendar = :calendar_id } { calendar::item::delete -cal_item_id $cal_item_id } # delete item types db_foreach get_item_types { SELECT item_type_id FROM cal_item_types WHERE calendar_id= :calendar_id } { calendar::item_type_delete -calendar_id $calendar_id -item_type_id $item_type_id } # delete calendar calendar::delete -calendar_id $calendar_id }XQL Not present: PostgreSQL, Oracle Generic XQL file: packages/calendar/tcl/apm-callback-procs.xql