Class ::xo::db::sql::authority (public)
::xo::db::Class ::xo::db::sql::authority
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo::db::sql {}
::nsf::object::alloc ::xo::db::Class ::xo::db::sql::authority {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::authority
set :security_inherit_p t
set :sql_package_name authority
set :supertype acs_object
set :with_table true}
::xo::db::sql::authority proc del {{-dbn {}} -authority_id:required} {
foreach var [list AUTHORITY_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select authority__del($_AUTHORITY_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::authority proc new {{-dbn {}} -authority_id {-object_type authority} -short_name:required -pretty_name:required {-enabled_p t} -sort_order:required -auth_impl_id -pwd_impl_id -forgotten_pwd_url -change_pwd_url -register_impl_id -register_url -help_contact_text -creation_user -creation_ip -context_id -childof} {
foreach var [list AUTHORITY_ID OBJECT_TYPE SHORT_NAME PRETTY_NAME ENABLED_P SORT_ORDER AUTH_IMPL_ID PWD_IMPL_ID FORGOTTEN_PWD_URL CHANGE_PWD_URL REGISTER_IMPL_ID REGISTER_URL HELP_CONTACT_TEXT 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 authority__new($_AUTHORITY_ID, $_OBJECT_TYPE, $_SHORT_NAME, $_PRETTY_NAME, $_ENABLED_P, $_SORT_ORDER, $_AUTH_IMPL_ID, $_PWD_IMPL_ID, $_FORGOTTEN_PWD_URL, $_CHANGE_PWD_URL, $_REGISTER_IMPL_ID, $_REGISTER_URL, $_HELP_CONTACT_TEXT, $_CREATION_USER, $_CREATION_IP, $_CONTEXT_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 ]