Class ::xo::db::sql::category_synonym (public)
::xo::db::Class ::xo::db::sql::category_synonym
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo::db::sql {}
::nsf::object::alloc ::xo::db::Class ::xo::db::sql::category_synonym {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_synonym
set :security_inherit_p t
set :sql_package_name category_synonym
set :supertype acs_object
set :with_table true}
::xo::db::sql::category_synonym proc del {{-dbn {}} -synonym_id:required} {
foreach var [list SYNONYM_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_synonym__del($_SYNONYM_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::category_synonym proc search {{-dbn {}} -search_text:required -locale:required} {
foreach var [list SEARCH_TEXT LOCALE] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select category_synonym__search($_SEARCH_TEXT, $_LOCALE)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::category_synonym proc new {{-dbn {}} -name:required -locale:required -category_id:required -synonym_id:required -childof} {
foreach var [list NAME LOCALE CATEGORY_ID SYNONYM_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_synonym__new($_NAME, $_LOCALE, $_CATEGORY_ID, $_SYNONYM_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::category_synonym proc edit {{-dbn {}} -synonym_id:required -new_name:required -locale:required} {
foreach var [list SYNONYM_ID NEW_NAME LOCALE] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select category_synonym__edit($_SYNONYM_ID, $_NEW_NAME, $_LOCALE)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::category_synonym proc get_similarity {{-dbn {}} -len1:required -len2:required -matches:required} {
foreach var [list LEN1 LEN2 MATCHES] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select category_synonym__get_similarity($_LEN1, $_LEN2, $_MATCHES)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::category_synonym proc reindex {{-dbn {}} -synonym_id:required -name:required -locale:required} {
foreach var [list SYNONYM_ID NAME LOCALE] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select category_synonym__reindex($_SYNONYM_ID, $_NAME, $_LOCALE)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::category_synonym proc convert_string {{-dbn {}} -name:required} {
foreach var [list NAME] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select category_synonym__convert_string($_NAME)
"
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 ]