Class ::xo::db::sql::calendar (public)
::xo::db::Class ::xo::db::sql::calendar
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo::db::sql {}
::nsf::object::alloc ::xo::db::Class ::xo::db::sql::calendar {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::calendar
set :security_inherit_p t
set :sql_package_name calendar
set :supertype acs_object
set :with_table true}
::xo::db::sql::calendar proc new {{-dbn {}} -calendar_id:required -calendar_name:required {-object_type calendar} -owner_id:required -private_p:required -package_id:required -context_id:required -creation_date:required -creation_user:required -creation_ip:required -childof} {
foreach var [list CALENDAR_ID CALENDAR_NAME OBJECT_TYPE OWNER_ID PRIVATE_P PACKAGE_ID CONTEXT_ID CREATION_DATE CREATION_USER CREATION_IP] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select calendar__new($_CALENDAR_ID, $_CALENDAR_NAME, $_OBJECT_TYPE, $_OWNER_ID, $_PRIVATE_P, $_PACKAGE_ID, $_CONTEXT_ID, $_CREATION_DATE, $_CREATION_USER, $_CREATION_IP)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::calendar proc delete {{-dbn {}} -calendar_id:required} {
foreach var [list CALENDAR_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select calendar__delete($_CALENDAR_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 ]