get_value (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__get_value(CAST(:package_id AS integer),:parameter_name)}]
return [ns_set value $s 0]
}
id_for_name (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__id_for_name(CAST(:package_key AS integer),:parameter_name)}]
return [ns_set value $s 0]
}
parameter_p (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__parameter_p(:package_key,:parameter_name)}]
return [ns_set value $s 0]
}
register_application (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__register_application(:package_key,:pretty_name,:pretty_plural,:package_uri,:initial_install_p,:singleton_p,:implements_subsite_p,:inherit_templates_p,:spec_file_path,CAST(:spec_file_mtime AS integer))}]
return [ns_set value $s 0]
}
register_p (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__register_p(:package_key)}]
return [ns_set value $s 0]
}
register_package (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__register_package(:package_key,:pretty_name,:pretty_plural,:package_uri,:package_type,:initial_install_p,:singleton_p,:implements_subsite_p,:inherit_templates_p,:spec_file_path,CAST(:spec_file_mtime AS integer))}]
return [ns_set value $s 0]
}
register_parameter (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__register_parameter(CAST(:parameter_id AS integer),:package_key,:parameter_name,:description,:scope,:datatype,:default_value,:section_name,CAST(:min_n_values AS integer),CAST(:max_n_values AS integer))}]
return [ns_set value $s 0]
}
register_service (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__register_service(:package_key,:pretty_name,:pretty_plural,:package_uri,:initial_install_p,:singleton_p,:implements_subsite_p,:inherit_templates_p,:spec_file_path,CAST(:spec_file_mtime AS integer))}]
return [ns_set value $s 0]
}
set_global_value (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__set_global_value(:package_key,:parameter_name,:attr_value)}]
return [ns_set value $s 0]
}
set_value (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__set_value(CAST(:package_id AS integer),:parameter_name,:attr_value)}]
return [ns_set value $s 0]
}
unregister_application (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__unregister_application(:package_key,:cascade_p)}]
return [ns_set value $s 0]
}
unregister_package (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__unregister_package(:package_key,:cascade_p)}]
return [ns_set value $s 0]
}
unregister_parameter (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__unregister_parameter(CAST(:parameter_id AS integer))}]
return [ns_set value $s 0]
}
unregister_service (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__unregister_service(:package_key,:cascade_p)}]
return [ns_set value $s 0]
}
update_package (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__update_package(:package_key,:pretty_name,:pretty_plural,:package_uri,:package_type,:initial_install_p,:singleton_p,:implements_subsite_p,:inherit_templates_p,:spec_file_path,CAST(:spec_file_mtime AS integer))}]
return [ns_set value $s 0]
}
update_parameter (scripted)
db_with_handle -dbn $dbn __DB {
set s [ns_pg_bind 0or1row $__DB {select apm__update_parameter(CAST(:parameter_id AS integer),:parameter_name,:description,:datatype,:default_value,:section_name,CAST(:min_n_values AS integer),CAST(:max_n_values AS integer))}]
return [ns_set value $s 0]
}