apm_version_id_from_package_key (public)
apm_version_id_from_package_key [ -all ] package_key
Defined in packages/acs-tcl/tcl/apm-procs.tcl
Return the id of the (per default enabled) version of the given package_key. If no such version id can be found, returns the empty string.
- Switches:
- -all (optional, boolean)
- when specified, return the enabled or disabled version_ids of the package_key.
- Parameters:
- package_key (required)
- Returns:
- the supposedly unique version_id for the enabled package, or a list of all the enabled and disabled versions when -all flag is specified
- Author:
- Peter Marklund
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- acs_system_information_api, apm__test_callback_get_set, apm__test_callback_invoke
Source code: if {$all_p} { return [db_list get_id {}] } else { return [db_string get_enabled_id {} -default ""] }Generic XQL file: <fullquery name="apm_version_id_from_package_key.get_enabled_id"> <querytext> select version_id from apm_enabled_package_versions where package_key = :package_key </querytext> </fullquery> <fullquery name="apm_version_id_from_package_key.get_id"> <querytext> select version_id from apm_package_versions where package_key = :package_key </querytext> </fullquery>packages/acs-tcl/tcl/apm-procs.xql
PostgreSQL XQL file: packages/acs-tcl/tcl/apm-procs-postgresql.xql
Oracle XQL file: packages/acs-tcl/tcl/apm-procs-oracle.xql