Class ::xo::db::sql::acs_content (public)
::xo::db::Class ::xo::db::sql::acs_content
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo::db::sql {}
::nsf::object::alloc ::xo::db::Class ::xo::db::sql::acs_content {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::acs_content
set :security_inherit_p t
set :sql_package_name acs_content
set :supertype acs_object
set :with_table true}
::xo::db::sql::acs_content proc update_nls_language {{-dbn {}} -content_id:required -nls_language:required} {
foreach var [list CONTENT_ID NLS_LANGUAGE] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select acs_content__update_nls_language($_CONTENT_ID, $_NLS_LANGUAGE)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::acs_content proc new {{-dbn {}} -content_id:required -mime_type:required -nls_language:required -searchable_p:required -content:required -childof} {
foreach var [list CONTENT_ID MIME_TYPE NLS_LANGUAGE SEARCHABLE_P CONTENT] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select acs_content__new($_CONTENT_ID, $_MIME_TYPE, $_NLS_LANGUAGE, $_SEARCHABLE_P, $_CONTENT)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::acs_content proc delete {{-dbn {}} -content_id:required} {
foreach var [list CONTENT_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select acs_content__delete($_CONTENT_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::acs_content proc update_searchable_p {{-dbn {}} -content_id:required -searchable_p:required} {
foreach var [list CONTENT_ID SEARCHABLE_P] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select acs_content__update_searchable_p($_CONTENT_ID, $_SEARCHABLE_P)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::acs_content proc update_mime_type {{-dbn {}} -content_id:required -mime_type:required} {
foreach var [list CONTENT_ID MIME_TYPE] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select acs_content__update_mime_type($_CONTENT_ID, $_MIME_TYPE)
"
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 ]