Class ::xo::db::sql::fs_url (public)
::xo::db::Class ::xo::db::sql::fs_url
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo::db::sql {}
::nsf::object::alloc ::xo::db::Class ::xo::db::sql::fs_url {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::fs_url
set :security_inherit_p t
set :sql_package_name fs_url
set :supertype acs_object
set :with_table true}
::xo::db::sql::fs_url proc new {{-dbn {}} -url_id:required {-object_type fs_url} -url:required -folder_id:required -name:required -description:required -creation_date:required -creation_user:required -creation_ip:required -context_id:required -childof} {
foreach var [list URL_ID OBJECT_TYPE URL FOLDER_ID NAME DESCRIPTION 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 fs_url__new($_URL_ID, $_OBJECT_TYPE, $_URL, $_FOLDER_ID, $_NAME, $_DESCRIPTION, $_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::fs_url proc delete {{-dbn {}} -url_id:required} {
foreach var [list URL_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select fs_url__delete($_URL_ID)
"
db_with_handle -dbn $dbn db {
return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
}
}
::xo::db::sql::fs_url proc copy {{-dbn {}} {-url_id target_object_id}} {
foreach var [list URL_ID] {
set varname [string tolower $var]
if {[info exists $varname]} {
set $var [set $varname]
set _$var :$var
} else {
set _$var null
}
}
set sql "
select fs_url__copy($_URL_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 ]