postgresql7.1
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__enable(:version_id);
SELECT apm__register_application (
:package_key,
:pretty_name,
:pretty_plural,
:package_uri,
:singleton_p,
:spec_file_path,
:spec_file_mtime);
SELECT apm__register_service (
:package_key,
:pretty_name,
:pretty_plural,
:package_uri,
:singleton_p,
:spec_file_path,
:spec_file_mtime);
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__new(
:version_id,
:package_key,
:version_name,
:version_uri,
:summary,
:description_format,
:description,
:release_date,
:vendor,
:vendor_uri,
't',
't');
select apm_package__new(
NULL,
:package_name,
:package_key,
'apm_package',
now(),
NULL,
NULL,
acs__magic_object_id('default_context')
)