apm_copy_param_to_descendents (public)

 apm_copy_param_to_descendents new_package_key parameter_name

Defined in packages/acs-tcl/tcl/apm-install-procs.tcl

Copy a new parameter in a package to its descendents. Called when a package is upgraded or a parameter added in the APM.

Parameters:
new_package_key (required)
parameter_name (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_parameter_register apm_parameter_register (public) apm_copy_param_to_descendents apm_copy_param_to_descendents apm_parameter_register->apm_copy_param_to_descendents db_1row db_1row (public) apm_copy_param_to_descendents->db_1row db_exec_plsql db_exec_plsql (public) apm_copy_param_to_descendents->db_exec_plsql

Testcases:
No testcase defined.
Source code:
    db_1row param {}
    foreach descendent_package_key [nsv_get apm_package_descendents $new_package_key] {
        if { [db_exec_plsql param_exists {}] } {
            error "$parameter_name already exists in package $descendent_package_key"
        } else {
            db_exec_plsql copy_descendent_param {}
        }
    }
Generic XQL file:
<fullquery name="apm_copy_param_to_descendents.param">
    <querytext>
    select ap.*
    from apm_parameters ap
    where package_key = :new_package_key
      and parameter_name = :parameter_name
  </querytext>
</fullquery>
packages/acs-tcl/tcl/apm-install-procs.xql

PostgreSQL XQL file:
<fullquery name="apm_copy_param_to_descendents.param_exists">
    <querytext>
    select apm__parameter_p(:descendent_package_key, :parameter_name);
  </querytext>
</fullquery>

<fullquery name="apm_copy_param_to_descendents.copy_descendent_param">
    <querytext>
    select apm__register_parameter(null, :descendent_package_key, :parameter_name,
                                   :description, :scope, :datatype, :default_value,
                                   :section_name, :min_n_values, :max_n_values)
  </querytext>
</fullquery>
packages/acs-tcl/tcl/apm-install-procs-postgresql.xql

Oracle XQL file:
<fullquery name="apm_copy_param_to_descendents.param_exists">
    <querytext>
    begin
      :1 := apm.parameter_p(
               package_key => :descendent_package_key,
               parameter_name => :parameter_name);
    end;
  </querytext>
</fullquery>

<fullquery name="apm_copy_param_to_descendents.copy_descendent_param">
    <querytext>
    begin
      :1 := apm.register_parameter(
               package_key => :descendent_package_key,
               parameter_name => :parameter_name,
               description => :description,
               scope => :scope,
               datatype => :datatype,
               default_value => :default_value,
               section_name => :section_name,
               min_n_values => :min_n_values,
               max_n_values => :max_n_values);
    end;
  </querytext>
</fullquery>
packages/acs-tcl/tcl/apm-install-procs-oracle.xql

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