Class ::xo::db::sql::notification_request (public)
::xo::db::Class ::xo::db::sql::notification_request
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo::db::sql {}
::nsf::object::alloc ::xo::db::Class ::xo::db::sql::notification_request {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::notification_request
set :security_inherit_p t
set :sql_package_name notification_request
set :supertype acs_object
set :with_table true}
::xo::db::sql::notification_request proc new {{-dbn {}} -request_id:required {-object_type notification_request} -type_id:required -user_id:required -object_id:required -interval_id:required -delivery_method_id:required -format:required {-dynamic_p f} -creation_date:required -creation_user:required -creation_ip:required -context_id:required -childof} {
foreach var [list REQUEST_ID OBJECT_TYPE TYPE_ID USER_ID OBJECT_ID INTERVAL_ID DELIVERY_METHOD_ID FORMAT DYNAMIC_P 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 notification_request__new($_REQUEST_ID, $_OBJECT_TYPE, $_TYPE_ID, $_USER_ID, $_OBJECT_ID, $_INTERVAL_ID, $_DELIVERY_METHOD_ID, $_FORMAT, $_DYNAMIC_P, $_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::notification_request proc delete_all_for_user {{-dbn {}} -user_id:required} {
foreach var [list USER_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select notification_request__delete_all_for_user($_USER_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::notification_request proc delete_all {{-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 notification_request__delete_all($_OBJECT_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::notification_request proc delete {{-dbn {}} -request_id:required} {
foreach var [list REQUEST_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select notification_request__delete($_REQUEST_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 ]