Index: openacs-4/packages/acs-mail/tcl/acs-mail-procs-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/tcl/acs-mail-procs-oracle.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-mail/tcl/acs-mail-procs-oracle.xql 13 May 2001 01:05:27 -0000 1.1
+++ openacs-4/packages/acs-mail/tcl/acs-mail-procs-oracle.xql 13 Aug 2001 17:59:48 -0000 1.2
@@ -4,92 +4,160 @@
oracle8.1.6
-
-
- insert into acs_contents
- (content_id, content, searchable_p, nls_language, mime_type)
- values
- (:object_id,empty_blob(),:searchable_p,:nls_language,:content_type)
+
+
+begin
+ :1 := content_item.new (
+ name => 'acs-mail message $body_id',
+ creation_user => :creation_user,
+ creation_ip => :creation_ip,
+ title => :header_subject,
+ nls_language => :nls_language,
+ text => :content,
+ storage_type => 'lob'
+ );
+end;
-
+
+
+
-
-
+
+
- update acs_contents
- set content = empty_blob()
- where content_id = :object_id
- returning content into :1
+begin
+ :1 := content_item.get_latest_revision ( :item_id );
+end;
-
+
-
-
-
- insert into acs_contents
- (content_id, content, searchable_p, nls_language, mime_type)
- values
- (:object_id,empty_blob(),:searchable_p,:nls_language,:content_type)
+
+
+
+
+
+begin
+ content_item.set_live_revision(:revision_id);
+end;
-
+
-
-
+
+
- update acs_contents
- set content = empty_blob()
- where content_id = :object_id
- returning content into :1
-
-
+begin
+ :1 := content_item.new (
+ name => 'acs-mail message $body_id',
+ creation_user => :creation_user,
+ creation_ip => :creation_ip,
+ title => :header_subject,
+ nls_language => :nls_language,
+ storage_type => 'file'
+ );
+end;
+
+
+
+
-
-
+
+
- begin
- :1 := acs_mail_gc_object.new (
- gc_object_id => :object_id,
- creation_user => :creation_user,
- creation_ip => :creation_ip
- );
- end;
+begin
+ :1 := content_item.get_latest_revision ( :item_id );
+end;"
-
+
+
+
+
+
+
+begin
+ content_item.set_live_revision(:revision_id);
+end;
+
+
+
+
+
+
+
+
+
+update cr_revisions
+ set content = empty_blob()
+ where revision_id = :revision_id
+ returning content into :1
+
+
+
+
+
+
+
+
+
+begin
+ :1 := content_item.get_latest_revision ( :content_item_id );
+end;
+
+
+
+
+
+
+
+
+
+
+select r.content, i.storage_type
+from cr_revisions r, cr_items i
+where r.revision_id = $revision_id and
+ r.item_id = i.item_id
+
+
+
+
+
+
-
+
- begin
- :1 := acs_mail_body.new (
- body_id => :body_id,
- body_reply_to => :body_reply_to,
- body_from => :body_from,
- body_date => :body_date,
- header_message_id => :header_message_id,
- header_reply_to => :header_reply_to,
- header_subject => :header_subject,
- header_from => :header_from,
- header_to => :header_to,
- content_object_id => :content_object_id,
- creation_user => :creation_user,
- creation_ip => :creation_ip
- );
- end;
+begin
+ :1 := acs_mail_body.new (
+ body_id => :body_id,
+ body_reply_to => :body_reply_to,
+ body_from => :body_from,
+ body_date => :body_date,
+ header_message_id => :header_message_id,
+ header_reply_to => :header_reply_to,
+ header_subject => :header_subject,
+ header_from => :header_from,
+ header_to => :header_to,
+ content_item_id => :content_item_id,
+ creation_user => :creation_user,
+ creation_ip => :creation_ip
+ );
+end;
-
+
+
+
@@ -117,19 +185,21 @@
-
-
+
+
- begin
- :1 := acs_mail_body.set_content_object (
- body_id => :body_id,
- content_object_id => :content_object_id
- );
- end;
+begin
+ acs_mail_body.set_content_object (
+ body_id => :body_id,
+ content_item_id => :content_item_id
+ );
+end;
-
+
+
+
@@ -147,6 +217,8 @@
+
+
@@ -157,20 +229,24 @@
+
+
-
-
+
+
- begin
- acs_mail_multipart.add_content (
- multipart_id => :multipart_id,
- content_object_id => :content_object_id
- );
- end;
+begin
+ :1 := acs_mail_multipart.add_content (
+ multipart_id => :multipart_id,
+ content_item_id => :content_item_id
+ );
+end;
-
+
+
+