Class ::xo::db::sql::acs_mail_body (public)
::xo::db::Class ::xo::db::sql::acs_mail_body
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo::db::sql {}
::nsf::object::alloc ::xo::db::Class ::xo::db::sql::acs_mail_body {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object
set :abstract_p f
set :auto_save false
set :name_method {}
set :object_type ::xo::db::sql::acs_mail_body
set :security_inherit_p t
set :sql_package_name acs_mail_body
set :supertype acs_object
set :with_table true}
::xo::db::sql::acs_mail_body proc set_content_object {{-dbn {}} -body_id:required -content_item_id:required} {
foreach var [list BODY_ID CONTENT_ITEM_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select acs_mail_body__set_content_object($_BODY_ID, $_CONTENT_ITEM_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::acs_mail_body proc clone {{-dbn {}} -old_body_id:required -body_id {-object_type acs_mail_body} {-creation_date now()} -creation_user -creation_ip -context_id} {
foreach var [list OLD_BODY_ID BODY_ID OBJECT_TYPE CREATION_DATE CREATION_USER CREATION_IP CONTEXT_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select acs_mail_body__clone($_OLD_BODY_ID, $_BODY_ID, $_OBJECT_TYPE, $_CREATION_DATE, $_CREATION_USER, $_CREATION_IP, $_CONTEXT_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::acs_mail_body proc body_p {{-dbn {}} -object_id:required} {
foreach var [list OBJECT_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select acs_mail_body__body_p($_OBJECT_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::acs_mail_body proc new {{-dbn {}} -body_id -body_reply_to -body_from -body_date -header_message_id -header_reply_to -header_subject -header_from -header_to -content_item_id {-object_type acs_mail_body} {-creation_date now()} -creation_user -creation_ip -context_id -childof} {
foreach var [list BODY_ID BODY_REPLY_TO BODY_FROM BODY_DATE HEADER_MESSAGE_ID HEADER_REPLY_TO HEADER_SUBJECT HEADER_FROM HEADER_TO CONTENT_ITEM_ID OBJECT_TYPE CREATION_DATE CREATION_USER CREATION_IP CONTEXT_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select acs_mail_body__new($_BODY_ID, $_BODY_REPLY_TO, $_BODY_FROM, $_BODY_DATE, $_HEADER_MESSAGE_ID, $_HEADER_REPLY_TO, $_HEADER_SUBJECT, $_HEADER_FROM, $_HEADER_TO, $_CONTENT_ITEM_ID, $_OBJECT_TYPE, $_CREATION_DATE, $_CREATION_USER, $_CREATION_IP, $_CONTEXT_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::acs_mail_body proc delete {{-dbn {}} -body_id:required} {
foreach var [list BODY_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select acs_mail_body__delete($_BODY_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
XQL Not present:Generic, PostgreSQL, Oracle
[
hide source ]
| [
make this the default ]