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
(boolean) (optional)
when specified, return the enabled or disabled version_ids of the package_key.
Parameters:
package_key
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):
%3 test_acs_system_information_api acs_system_information_api (test acs-tcl) apm_version_id_from_package_key apm_version_id_from_package_key test_acs_system_information_api->apm_version_id_from_package_key test_apm__test_callback_get_set apm__test_callback_get_set (test acs-tcl) test_apm__test_callback_get_set->apm_version_id_from_package_key test_apm__test_callback_invoke apm__test_callback_invoke (test acs-tcl) test_apm__test_callback_invoke->apm_version_id_from_package_key db_list db_list (public) apm_version_id_from_package_key->db_list db_string db_string (public) apm_version_id_from_package_key->db_string apm::package_version::attributes::get_instance_name apm::package_version::attributes::get_instance_name (private) apm::package_version::attributes::get_instance_name->apm_version_id_from_package_key apm_get_callback_proc apm_get_callback_proc (public) apm_get_callback_proc->apm_version_id_from_package_key apm_package_delete apm_package_delete (public) apm_package_delete->apm_version_id_from_package_key apm_package_install apm_package_install (public) apm_package_install->apm_version_id_from_package_key apm_set_callback_proc apm_set_callback_proc (public) apm_set_callback_proc->apm_version_id_from_package_key

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

[ hide source ] | [ make this the default ]
Show another procedure: