oracle8.1.6
begin
:1 := content_item.new(name => :name,
creation_ip => :creation_ip
);
end;
begin
:1 := content_revision.new(title => :title,
description => 'gzipped tarfile',
text => 'not_important',
mime_type => 'text/plain',
item_id => :item_id,
creation_user => :user_id,
creation_ip => :creation_ip
);
update cr_items
set live_revision = :1
where item_id = :item_id;
end;
update cr_revisions
set content = empty_blob()
where revision_id = :revision_id
returning content into :1
update apm_package_versions
set content_length = (select dbms_lob.getlength(content)
from cr_revisons
where revision_id = :revision_id)
where version_id = :version_id
select content
from cr_revisions
where revision_id = (select content_item.get_latest_revision(item_id)
from apm_package_versions
where version_id = :version_id)
begin
:1 := apm_package_version.add_file(
file_id => :file_id,
version_id => :version_id,
path => :path,
file_type => :file_type,
db_type => :db_type
);
end;
begin
apm_package_version.remove_file(
path => :path,
version_id => :version_id
);
end;