%3 ::xotcl::Object ::xotcl::Object ::xo::db::sql::url ::xo::db::sql::url → delete → insert_or_update → new ::xo::db::sql::url->::xotcl::Object

Class ::xo::db::sql::url

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

Defined in

Class Relations

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

Methods (to be applied on the object)

  • delete (scripted, public)

     xo::db::sql::url[i] delete [ -dbn dbn ] -url_id url_id 

    Automatically generated method

    Switches:
    -dbn (optional)
    -url_id (required)

    Testcases:
    No testcase defined.
    #function_args: {URL_ID {}}
    foreach var [list URL_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__delete($_URL_ID) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • insert_or_update (scripted, public)

     xo::db::sql::url[i] 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 

    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.
    #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 ]
    }
  • new (scripted, public)

     xo::db::sql::url[i] 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 ]

    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.
    #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 ]
    }