Class ::xo::db::sql::acs_activity (public)
::xo::db::Class ::xo::db::sql::acs_activity
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo::db::sql {}
::nsf::object::alloc ::xo::db::Class ::xo::db::sql::acs_activity {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_activity
set :security_inherit_p t
set :sql_package_name acs_activity
set :supertype acs_object
set :with_table true}
::xo::db::sql::acs_activity proc object_map {{-dbn {}} -activity_id:required -object_id:required} {
foreach var [list ACTIVITY_ID 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_activity__object_map($_ACTIVITY_ID, $_OBJECT_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::acs_activity proc name {{-dbn {}} -activity_id:required} {
foreach var [list ACTIVITY_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_activity__name($_ACTIVITY_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::acs_activity proc new {{-dbn {}} -activity_id -name:required -description {-html_p f} -status_summary {-object_type acs_activity} {-creation_date now()} -creation_user -creation_ip -context_id -childof} {
foreach var [list ACTIVITY_ID NAME DESCRIPTION HTML_P STATUS_SUMMARY 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_activity__new($_ACTIVITY_ID, $_NAME, $_DESCRIPTION, $_HTML_P, $_STATUS_SUMMARY, $_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_activity proc edit {{-dbn {}} -activity_id:required -name -description -html_p -status_summary} {
foreach var [list ACTIVITY_ID NAME DESCRIPTION HTML_P STATUS_SUMMARY] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select acs_activity__edit($_ACTIVITY_ID, $_NAME, $_DESCRIPTION, $_HTML_P, $_STATUS_SUMMARY)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::acs_activity proc delete {{-dbn {}} -activity_id:required} {
foreach var [list ACTIVITY_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_activity__delete($_ACTIVITY_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::acs_activity proc object_unmap {{-dbn {}} -activity_id:required -object_id:required} {
foreach var [list ACTIVITY_ID 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_activity__object_unmap($_ACTIVITY_ID, $_OBJECT_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 ]