Class ::xo::db::sql::wp_presentation (public)
::xo::db::Class ::xo::db::sql::wp_presentation
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo::db::sql {}
::nsf::object::alloc ::xo::db::Class ::xo::db::sql::wp_presentation {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::wp_presentation
set :security_inherit_p t
set :sql_package_name wp_presentation
set :supertype acs_object
set :with_table true}
::xo::db::sql::wp_presentation proc new_revision {{-dbn {}} -creation_date:required -creation_user:required -creation_ip:required -pres_item_id:required -pres_title:required -page_signature:required -copyright_notice:required -style:required -public_p:required -show_modified_p:required -audience:required -background:required} {
foreach var [list CREATION_DATE CREATION_USER CREATION_IP PRES_ITEM_ID PRES_TITLE PAGE_SIGNATURE COPYRIGHT_NOTICE STYLE PUBLIC_P SHOW_MODIFIED_P AUDIENCE BACKGROUND] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select wp_presentation__new_revision($_CREATION_DATE, $_CREATION_USER, $_CREATION_IP, $_PRES_ITEM_ID, $_PRES_TITLE, $_PAGE_SIGNATURE, $_COPYRIGHT_NOTICE, $_STYLE, $_PUBLIC_P, $_SHOW_MODIFIED_P, $_AUDIENCE, $_BACKGROUND)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::wp_presentation proc delete_audience {{-dbn {}} -audience_item_id:required} {
foreach var [list AUDIENCE_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 wp_presentation__delete_audience($_AUDIENCE_ITEM_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::wp_presentation proc get_audience {{-dbn {}} -pres_item_id:required} {
foreach var [list PRES_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 wp_presentation__get_audience($_PRES_ITEM_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::wp_presentation proc set_live_revision {{-dbn {}} -revision_id:required} {
foreach var [list REVISION_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select wp_presentation__set_live_revision($_REVISION_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::wp_presentation proc delete_background {{-dbn {}} -background_item_id:required} {
foreach var [list BACKGROUND_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 wp_presentation__delete_background($_BACKGROUND_ITEM_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::wp_presentation proc get_ad_revision {{-dbn {}} -pres_revision_id:required} {
foreach var [list PRES_REVISION_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select wp_presentation__get_ad_revision($_PRES_REVISION_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::wp_presentation proc new {{-dbn {}} -creation_date:required -creation_user:required -creation_ip:required -pres_title:required -page_signature:required -copyright_notice:required -style:required -public_p:required -show_modified_p:required -aud:required -back:required -parent_id:required -childof} {
foreach var [list CREATION_DATE CREATION_USER CREATION_IP PRES_TITLE PAGE_SIGNATURE COPYRIGHT_NOTICE STYLE PUBLIC_P SHOW_MODIFIED_P AUD BACK PARENT_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select wp_presentation__new($_CREATION_DATE, $_CREATION_USER, $_CREATION_IP, $_PRES_TITLE, $_PAGE_SIGNATURE, $_COPYRIGHT_NOTICE, $_STYLE, $_PUBLIC_P, $_SHOW_MODIFIED_P, $_AUD, $_BACK, $_PARENT_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::wp_presentation proc get_bg_revision {{-dbn {}} -pres_revision_id:required} {
foreach var [list PRES_REVISION_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select wp_presentation__get_bg_revision($_PRES_REVISION_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::wp_presentation proc delete {{-dbn {}} -pres_item_id:required} {
foreach var [list PRES_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 wp_presentation__delete($_PRES_ITEM_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::wp_presentation proc get_background {{-dbn {}} -pres_item_id:required} {
foreach var [list PRES_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 wp_presentation__get_background($_PRES_ITEM_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 ]