oracle8.1.6 declare instance_id apm_packages.package_id%TYPE; begin instance_id := apm_package.new( instance_name => :package_name, package_key => :package_key, context_id => acs.magic_object_id('default_context') ); end; begin :1 := apm_package_version.new( version_id => :version_id, package_key => :package_key, version_name => :version_name, version_uri => :version_uri, summary => :summary, description_format => :description_format, description => :description, release_date => :release_date, vendor => :vendor, vendor_uri => :vendor_uri, installed_p => 't', data_model_loaded_p => 't' ); end; begin apm_package_type.drop_type( package_key => :package_key, cascade_p => 't' ); end; begin apm_package_version.delete(version_id => :version_id); end; update apm_package_versions set installed_p = decode(version_id, :version_id, 't', 'f') where package_key = :package_key begin apm_package_version.enable( version_id => :version_id ); end; begin apm_package_version.disable( version_id => :version_id ); end; begin apm.register_application ( package_key => :package_key, package_uri => :package_uri, pretty_name => :pretty_name, pretty_plural => :pretty_plural, initial_install_p => :initial_install_p, singleton_p => :singleton_p, spec_file_path => :spec_file_path, spec_file_mtime => :spec_file_mtime ); end; begin apm.register_service ( package_key => :package_key, package_uri => :package_uri, pretty_name => :pretty_name, pretty_plural => :pretty_plural, initial_install_p => :initial_install_p, singleton_p => :singleton_p, spec_file_path => :spec_file_path, spec_file_mtime => :spec_file_mtime ); end; begin :1 := apm_package_version.edit( version_id => :version_id, version_name => :version_name, version_uri => :version_uri, summary => :summary, description_format => :description_format, description => :description, release_date => :release_date, vendor => :vendor, vendor_uri => :vendor_uri, installed_p => 't', data_model_loaded_p => 't' ); end; declare main_site_id site_nodes.node_id%TYPE; instance_id apm_packages.package_id%TYPE; node_id site_nodes.node_id%TYPE; begin main_site_id := site_node.node_id('/'); instance_id := apm_package.new( package_key => :package_key, context_id => main_site_id ); node_id := site_node.new( parent_id => main_site_id, name => :package_key, directory_p => 't', pattern_p => 't', object_id => instance_id ); end; begin apm_package_version.upgrade(version_id => :version_id); end; begin :1 := apm_package_version.upgrade_p( path => :path, initial_version_name => :initial_version_name, final_version_name => :final_version_name ); end; begin :1 := apm_package_version.sortable_version_name('$f1_version_from'); end; begin :1 := apm_package_version.sortable_version_name('$f1_version_from'); end; select apm_package_version.version_name_greater(service_version, :dependency_version) as version_p from apm_package_dependencies d, apm_package_types a, apm_package_versions v where d.dependency_type = 'provides' and d.version_id = v.version_id and d.service_uri = :dependency_uri and v.installed_p = 't' and a.package_key = v.package_key select version_id from apm_package_versions where package_key = :package_key and version_id = apm_package.highest_version(:package_key) select apm_package_version.version_name_greater(:version_name, version_name) upgrade_p from apm_package_versions where package_key = :package_key and version_id = apm_package.highest_version (:package_key)