%3 ::xotcl::Object ::xotcl::Object ::xo::db::sql::rel_segment ::xo::db::sql::rel_segment → delete → get → get_or_new → name → new ::xo::db::sql::rel_segment->::xotcl::Object

Class ::xo::db::sql::rel_segment

::xo::db::sql::rel_segment[i] create ...

Defined in

Class Relations

  • class: ::xo::db::Class[i]
  • superclass: ::xotcl::Object[i]
::xo::db::Class create ::xo::db::sql::rel_segment \
     -superclass ::xotcl::Object

Methods (to be applied on the object)

  • delete (scripted, public)

     xo::db::sql::rel_segment[i] delete [ -dbn dbn ] -segment_id segment_id 

    Automatically 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[i] get [ -dbn dbn ] -group_id group_id  \
        -rel_type rel_type 

    Automatically 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[i] 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[i] name [ -dbn dbn ] -segment_id segment_id 

    Automatically 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[i] 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 ]
    }