Class ::xo::db::sql::category (public)
::xo::db::Class ::xo::db::sql::category
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo::db::sql {}
::nsf::object::alloc ::xo::db::Class ::xo::db::sql::category {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::category
set :security_inherit_p t
set :sql_package_name category
set :supertype acs_object
set :with_table true}
::xo::db::sql::category proc phase_out {{-dbn {}} -category_id:required} {
foreach var [list CATEGORY_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select category__phase_out($_CATEGORY_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::category proc new_translation {{-dbn {}} -category_id:required -locale:required -name:required -description:required -modifying_date:required -modifying_user:required -modifying_ip:required} {
foreach var [list CATEGORY_ID LOCALE NAME DESCRIPTION MODIFYING_DATE MODIFYING_USER MODIFYING_IP] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select category__new_translation($_CATEGORY_ID, $_LOCALE, $_NAME, $_DESCRIPTION, $_MODIFYING_DATE, $_MODIFYING_USER, $_MODIFYING_IP)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::category proc del {{-dbn {}} -category_id:required} {
foreach var [list CATEGORY_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select category__del($_CATEGORY_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::category proc name {{-dbn {}} -category_id:required} {
foreach var [list CATEGORY_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select category__name($_CATEGORY_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::category proc new {{-dbn {}} -category_id:required -tree_id:required -locale:required -name:required -description:required -parent_id:required -deprecated_p:required -creation_date:required -creation_user:required -creation_ip:required -childof} {
foreach var [list CATEGORY_ID TREE_ID LOCALE NAME DESCRIPTION PARENT_ID DEPRECATED_P 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 category__new($_CATEGORY_ID, $_TREE_ID, $_LOCALE, $_NAME, $_DESCRIPTION, $_PARENT_ID, $_DEPRECATED_P, $_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::category proc edit {{-dbn {}} -category_id:required -locale:required -name:required -description:required -modifying_date:required -modifying_user:required -modifying_ip:required} {
foreach var [list CATEGORY_ID LOCALE NAME DESCRIPTION MODIFYING_DATE MODIFYING_USER MODIFYING_IP] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select category__edit($_CATEGORY_ID, $_LOCALE, $_NAME, $_DESCRIPTION, $_MODIFYING_DATE, $_MODIFYING_USER, $_MODIFYING_IP)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::category proc change_parent {{-dbn {}} -category_id:required -tree_id:required -parent_id:required} {
foreach var [list CATEGORY_ID TREE_ID 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 category__change_parent($_CATEGORY_ID, $_TREE_ID, $_PARENT_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::category proc phase_in {{-dbn {}} -category_id:required} {
foreach var [list CATEGORY_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select category__phase_in($_CATEGORY_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 ]