Class ::xo::db::sql::static_page (public)
::xo::db::Class ::xo::db::sql::static_page
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo::db::sql {}
::nsf::object::alloc ::xo::db::Class ::xo::db::sql::static_page {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::static_page
set :security_inherit_p t
set :sql_package_name static_page
set :supertype acs_object
set :with_table true}
::xo::db::sql::static_page proc get_show_comments_p {{-dbn {}} -item_id:required} {
foreach var [list 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 static_page__get_show_comments_p($_ITEM_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::static_page proc grant_permission {{-dbn {}} -item_id:required -grantee_id:required -privilege:required -recursive_p:required} {
foreach var [list ITEM_ID GRANTEE_ID PRIVILEGE RECURSIVE_P] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select static_page__grant_permission($_ITEM_ID, $_GRANTEE_ID, $_PRIVILEGE, $_RECURSIVE_P)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::static_page proc delete_stale_items {{-dbn {}} -session_id:required -package_id:required} {
foreach var [list SESSION_ID PACKAGE_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select static_page__delete_stale_items($_SESSION_ID, $_PACKAGE_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::static_page proc revoke_permission {{-dbn {}} -item_id:required -grantee_id:required -privilege:required -recursive_p:required} {
foreach var [list ITEM_ID GRANTEE_ID PRIVILEGE RECURSIVE_P] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select static_page__revoke_permission($_ITEM_ID, $_GRANTEE_ID, $_PRIVILEGE, $_RECURSIVE_P)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::static_page proc set_show_comments_p {{-dbn {}} -item_id:required -show_comments_p:required} {
foreach var [list ITEM_ID SHOW_COMMENTS_P] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select static_page__set_show_comments_p($_ITEM_ID, $_SHOW_COMMENTS_P)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::static_page proc new_folder {{-dbn {}} -folder_id:required -name:required -label:required -description:required -parent_id:required -creation_date:required -creation_user:required -creation_ip:required -context_id:required} {
foreach var [list FOLDER_ID NAME LABEL DESCRIPTION PARENT_ID 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 static_page__new_folder($_FOLDER_ID, $_NAME, $_LABEL, $_DESCRIPTION, $_PARENT_ID, $_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::static_page proc five_n_spaces {{-dbn {}} -n:required} {
foreach var [list N] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select static_page__five_n_spaces($_N)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::static_page proc new {{-dbn {}} -folder_id:required -filename:required -title:required -mtime:required -childof} {
foreach var [list FOLDER_ID FILENAME TITLE MTIME] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select static_page__new($_FOLDER_ID, $_FILENAME, $_TITLE, $_MTIME)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::static_page proc get_root_folder {{-dbn {}} -package_id:required} {
foreach var [list PACKAGE_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select static_page__get_root_folder($_PACKAGE_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::static_page proc delete_folder {{-dbn {}} -folder_id:required} {
foreach var [list FOLDER_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select static_page__delete_folder($_FOLDER_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::static_page proc delete {{-dbn {}} -static_page_id:required} {
foreach var [list STATIC_PAGE_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select static_page__delete($_STATIC_PAGE_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 ]