postgresql7.1
select apm_package_version__new(
:version_id,
:package_key,
:version_name,
:version_uri,
:summary,
:description_format,
:description,
:release_date,
:vendor,
:vendor_uri,
:auto_mount,
't',
't'
);
select apm_package_type__drop_type(
:package_key,
't'
);
select apm_package_version__delete(:version_id);
update apm_package_versions
set installed_p = (version_id = :version_id)
where package_key = :package_key
select apm_package_version__disable(
:version_id
);
select apm__register_application (
:package_key,
:pretty_name,
:pretty_plural,
:package_uri,
:initial_install_p,
:singleton_p,
:spec_file_path,
:spec_file_mtime
);
select apm__register_service (
:package_key,
:pretty_name,
:pretty_plural,
:package_uri,
:initial_install_p,
:singleton_p,
:spec_file_path,
:spec_file_mtime
);
select apm_package_version__edit(
null,
:version_id,
:version_name,
:version_uri,
:summary,
:description_format,
:description,
:release_date,
:vendor,
:vendor_uri,
:auto_mount,
't',
't'
);
select apm_package_version__upgrade(:version_id);
select apm_package_version__upgrade_p(
:path,
:initial_version_name,
:final_version_name
);
select apm_package_version__sortable_version_name('$f1_version_from');
select apm_package_version__sortable_version_name('$f2_version_from');
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 apm_package_version__version_name_greater(:provided_version, :dependency_version)
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) as upgrade_p
from apm_package_versions
where package_key = :package_key
and version_id = apm_package__highest_version (:package_key)
select apm_package_version__enable(
:version_id
);