xo::db::sql::rel_segment proc new (public)
xo::db::sql::rel_segment new [ -dbn dbn ] [ -segment_id segment_id ] \ [ -object_type object_type ] [ -creation_date creation_date ] \ [ -creation_user creation_user ] [ -creation_ip creation_ip ] \ [ -email email ] [ -url url ] -segment_name segment_name \ -group_id group_id -rel_type rel_type [ -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)
- -segment_id (optional)
- -object_type (optional, defaults to
"rel_segment"
)- -creation_date (optional, defaults to
"now()"
)- -creation_user (optional)
- -creation_ip (optional)
- -email (optional)
- -url (optional)
- -segment_name (required)
- -group_id (required)
- -rel_type (required)
- -context_id (optional)
- -childof (optional)
- Testcases:
- No testcase defined.
Source code: #function_args: {SEGMENT_ID null} {OBJECT_TYPE rel_segment} {CREATION_DATE now()} {CREATION_USER null} {CREATION_IP null} {EMAIL null} {URL null} {SEGMENT_NAME {}} {GROUP_ID {}} {REL_TYPE {}} {CONTEXT_ID null} foreach var [list SEGMENT_ID OBJECT_TYPE CREATION_DATE CREATION_USER CREATION_IP EMAIL URL SEGMENT_NAME GROUP_ID REL_TYPE 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 rel_segment__new($_SEGMENT_ID, $_OBJECT_TYPE, $_CREATION_DATE, $_CREATION_USER, $_CREATION_IP, $_EMAIL, $_URL, $_SEGMENT_NAME, $_GROUP_ID, $_REL_TYPE, $_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