xo::db::sql::url proc insert_or_update (public)
xo::db::sql::url insert_or_update [ -dbn dbn ] -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
Defined in /var/www/openacs.org/packages/xotcl-core/tcl/05-db-procs.tcl
Automatically generated method
- Switches:
- -dbn (optional)
- -url_title (required)
- -host_url (required)
- -complete_url (required)
- -meta_keywords (required)
- -meta_description (required)
- -creation_user (required)
- -creation_ip (required)
- -context_id (required)
- Testcases:
- No testcase defined.
Source code: #function_args: {URL_TITLE {}} {HOST_URL {}} {COMPLETE_URL {}} {META_KEYWORDS {}} {META_DESCRIPTION {}} {CREATION_USER {}} {CREATION_IP {}} {CONTEXT_ID {}} foreach var [list 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__insert_or_update($_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