Index: openacs-4/packages/acs-mail/tcl/acs-mail-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/tcl/acs-mail-procs-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-mail/tcl/acs-mail-procs-postgresql.xql 13 May 2001 03:00:25 -0000 1.1 @@ -0,0 +1,216 @@ + + + + postgresql7.1 + + + + FIX ME LOB + + insert into acs_contents + (content_id, content, searchable_p, nls_language, mime_type) + values + (:object_id,empty_blob(),:searchable_p,:nls_language,:content_type) + + + + + + + + FIX ME LOB + + update acs_contents + set content = empty_blob() + where content_id = :object_id + returning content into :1 + + + + + + + + FIX ME LOB + + insert into acs_contents + (content_id, content, searchable_p, nls_language, mime_type) + values + (:object_id,empty_blob(),:searchable_p,:nls_language,:content_type) + + + + + + + + FIX ME LOB + + update acs_contents + set content = empty_blob() + where content_id = :object_id + returning content into :1 + + + + + + + + FIX ME PLSQL + + begin + :1 := acs_mail_gc_object__new ( + gc_object_id => :object_id, + creation_user => :creation_user, + creation_ip => :creation_ip + ); + end; + + + + + + + +-- FIX ME PLSQL + +-- begin + select 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; + + + + + + + +-- FIX ME PLSQL + +-- begin + select acs_mail_body__body_p (:object_id); + end; + + + + + + + +-- FIX ME PLSQL +-- begin + select acs_mail_body__clone ( + old_body_id => :old_body_id, + body_id => :body_id, + creation_user => :creation_user, + creation_ip => :creation_ip + ); +-- end; + + + + + + + +-- FIX ME PLSQL + +-- begin + select acs_mail_body__set_content_object ( + body_id => :body_id, + content_object_id => :content_object_id + ); +-- end; + + + + + + + +-- FIX ME PLSQL + +-- begin + select acs_mail_multipart__new ( + multipart_id => :multipart_id, + multipart_kind => :multipart_kind, + creation_user => :creation_user, + creation_ip => :creation_ip + ); +-- end; + + + + + + + +-- FIX ME PLSQL + +-- begin + select acs_mail_multipart__multipart_p (:object_id); +-- end; + + + + + + + +-- FIX ME PLSQL + +-- begin + select acs_mail_multipart__add_content ( + multipart_id => :multipart_id, + content_object_id => :content_object_id + ); +-- end; + + + + + + + +-- FIX ME PLSQL + +-- begin + select acs_mail_link__new ( + mail_link_id => :mail_link_id, + body_id => :body_id, + context_id => :context_id, + creation_user => :creation_user, + creation_ip => :creation_ip + ); +-- end; + + + + + + + +-- FIX ME PLSQL + +-- begin + select acs_mail_link__link_p (:object_id); +-- end; + + + + + + Index: openacs-4/packages/acs-mail/tcl/acs-mail-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-mail/tcl/acs-mail-procs.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/acs-mail/tcl/acs-mail-procs.xql 13 May 2001 03:00:25 -0000 1.1 @@ -0,0 +1,130 @@ + + + + + + + delete from acs_contents where content_id = :object_id + + + + + + + + + delete from acs_contents where content_id = :object_id + + + + + + + + + select content, mime_type as v_content_type + from acs_contents + where content_id = :content_object_id + + + + + + + + + select mime_filename, mime_disposition, content_object_id as coid + from acs_mail_multipart_parts + where multipart_id = :content_object_id + order by sequence_number + + + + + + + + + select body_id from acs_mail_links where mail_link_id = :link_id + + + + + + + + + select header_message_id, header_reply_to, header_subject, + header_from, header_to, content_object_id + from acs_mail_bodies + where body_id = :body_id + + + + + + + + + select header_name, header_content from acs_mail_body_headers + where body_id = :body_id + + + + + + + + + select message_id, envelope_from, envelope_to + from acs_mail_queue_outgoing + + + + + + + + + delete from acs_mail_queue_outgoing + where message_id = :message_id + and envelope_from = :envelope_from + and envelope_to = :envelope_to + + + + + + + + + delete from acs_mail_queue_messages + where message_id not in + (select message_id from acs_mail_queue_outgoing) + and message_id not in + (select message_id from acs_mail_queue_incoming) + + + + + + + + + select multipart_kind from acs_mail_multiparts + where multipart_id = :object_id + + + + + + + + + select body_id from acs_mail_links where mail_link_id = :link_id + + + + + +