xo::db::sql::url proc new (public)
xo::db::sql::url new [ -dbn dbn ] -url_id url_id \ -url_title url_title [ -host_url host_url ] \ -complete_url complete_url [ -meta_keywords meta_keywords ] \ [ -meta_description meta_description ] \ [ -creation_user creation_user ] [ -creation_ip creation_ip ] \ [ -context_id context_id ] [ -childof childof ]
Defined in /var/www/openacs.org/packages/xotcl-core/tcl/05-db-procs.tcl
Automatically generated method
- Switches:
- -dbn (optional)
- -url_id (required)
- -url_title (required)
- -host_url (optional)
- -complete_url (required)
- -meta_keywords (optional)
- -meta_description (optional)
- -creation_user (optional)
- -creation_ip (optional)
- -context_id (optional)
- -childof (optional)
- Testcases:
- No testcase defined.
Source code: #function_args: {URL_ID {}} {URL_TITLE {}} {HOST_URL null} {COMPLETE_URL {}} {META_KEYWORDS null} {META_DESCRIPTION null} {CREATION_USER null} {CREATION_IP null} {CONTEXT_ID null} foreach var [list URL_ID URL_TITLE HOST_URL COMPLETE_URL META_KEYWORDS META_DESCRIPTION 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 url__new($_URL_ID, $_URL_TITLE, $_HOST_URL, $_COMPLETE_URL, $_META_KEYWORDS, $_META_DESCRIPTION, $_CREATION_USER, $_CREATION_IP, $_CONTEXT_ID) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }XQL Not present: Generic, PostgreSQL, Oracle