- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xo::db::sql::rel_segment
::xo::db::sql::rel_segment create ...
Defined in
Class Relations
::xo::db::Class create ::xo::db::sql::rel_segment \ -superclass ::xotcl::ObjectMethods (to be applied on the object)
delete (scripted, public)
xo::db::sql::rel_segment delete [ -dbn dbn ] -segment_id segment_idAutomatically generated method
- Switches:
- -dbn (optional)
- -segment_id (required)
- Testcases:
- No testcase defined.
#function_args: {SEGMENT_ID {}} foreach var [list SEGMENT_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__delete($_SEGMENT_ID) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }get (scripted, public)
xo::db::sql::rel_segment get [ -dbn dbn ] -group_id group_id \ -rel_type rel_typeAutomatically generated method
- Switches:
- -dbn (optional)
- -group_id (required)
- -rel_type (required)
- Testcases:
- No testcase defined.
#function_args: {GROUP_ID {}} {REL_TYPE {}} foreach var [list GROUP_ID REL_TYPE] { 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__get($_GROUP_ID, $_REL_TYPE) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }get_or_new (scripted, public)
xo::db::sql::rel_segment get_or_new [ -dbn dbn ] -group_id group_id \ -rel_type rel_type [ -segment_name segment_name ]Automatically generated method
- Switches:
- -dbn (optional)
- -group_id (required)
- -rel_type (required)
- -segment_name (optional)
- Testcases:
- No testcase defined.
#function_args: {GROUP_ID {}} {REL_TYPE {}} {SEGMENT_NAME null} foreach var [list GROUP_ID REL_TYPE SEGMENT_NAME] { 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__get_or_new($_GROUP_ID, $_REL_TYPE, $_SEGMENT_NAME) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }name (scripted, public)
xo::db::sql::rel_segment name [ -dbn dbn ] -segment_id segment_idAutomatically generated method
- Switches:
- -dbn (optional)
- -segment_id (required)
- Testcases:
- No testcase defined.
#function_args: {SEGMENT_ID {}} foreach var [list SEGMENT_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__name($_SEGMENT_ID) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }new (scripted, 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 ]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.
#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 ] }
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables