notification::get_intervals (public)
notification::get_intervals [ -localized ] -type_id type_id
Defined in packages/notifications/tcl/notification-procs.tcl
return a list of intervals that are associated with a given notification type (not all intervals are available to all notification types). The fields for each interval is: name, interval_id, n_seconds. If the localized flag is set, then the name of the interval will be localized.
- Switches:
- -localized (optional, boolean)
- -type_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: set intervals [db_list_of_lists select_intervals {}] if { $localized_p } { # build pretty names for intervals set intervals_pretty [list] foreach elm $intervals { lassign $elm elm_name elm_id lappend intervals_pretty [list [lang::util::localize ${elm_name}] $elm_id] } return $intervals_pretty } else { return $intervals }Generic XQL file: <fullquery name="notification::get_intervals.select_intervals"> <querytext> select name, notification_intervals.interval_id from notification_intervals, notification_types_intervals where notification_intervals.interval_id = notification_types_intervals.interval_id and type_id = :type_id order by n_seconds </querytext> </fullquery>packages/notifications/tcl/notification-procs.xql
PostgreSQL XQL file: packages/notifications/tcl/notification-procs-postgresql.xql
Oracle XQL file: packages/notifications/tcl/notification-procs-oracle.xql