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

Class ::xo::db::sql::ec_product

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

Class Relations

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

Methods (to be applied on the object)

  • delete (scripted, public)

     xo::db::sql::ec_product[i] delete [ -dbn dbn ] -product_id product_id 

    Automatically generated method

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

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::ec_product proc delete xo::db::sql::ec_product proc delete xo::db::sql::ec_product proc delete->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {PRODUCT_ID {}}
    foreach var [list PRODUCT_ID]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select ec_product__delete($_PRODUCT_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::ec_product[i] new [ -dbn dbn ] [ -product_id product_id ] \
        [ -creation_user creation_user ] -context_id context_id  \
        -product_name product_name  [ -price price ] [ -sku sku ] \
        [ -one_line_description one_line_description ] \
        [ -detailed_description detailed_description ] \
        [ -search_keywords search_keywords ] [ -present_p present_p ] \
        [ -stock_status stock_status ] [ -dirname dirname ] \
        [ -available_date available_date ] [ -color_list color_list ] \
        [ -size_list size_list ] [ -creation_ip creation_ip ] \
        [ -childof childof ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -product_id
    (optional)
    -creation_user
    (optional)
    -context_id
    (required)
    -product_name
    (required)
    -price
    (optional)
    -sku
    (optional)
    -one_line_description
    (optional)
    -detailed_description
    (optional)
    -search_keywords
    (optional)
    -present_p
    (defaults to "t") (optional)
    -stock_status
    (defaults to "o") (optional)
    -dirname
    (optional)
    -available_date
    (defaults to "sysdate") (optional)
    -color_list
    (optional)
    -size_list
    (optional)
    -creation_ip
    (optional)
    -childof
    (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::ec_product proc new xo::db::sql::ec_product proc new xo::db::sql::ec_product proc new->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {PRODUCT_ID null} {CREATION_USER null} {CONTEXT_ID {}} {PRODUCT_NAME {}} {PRICE null} {SKU null} {ONE_LINE_DESCRIPTION null} {DETAILED_DESCRIPTION null} {SEARCH_KEYWORDS null} {PRESENT_P t} {STOCK_STATUS o} {DIRNAME null} {AVAILABLE_DATE sysdate} {COLOR_LIST null} {SIZE_LIST null} {CREATION_IP null}
    foreach var [list PRODUCT_ID CREATION_USER CONTEXT_ID PRODUCT_NAME PRICE SKU ONE_LINE_DESCRIPTION DETAILED_DESCRIPTION SEARCH_KEYWORDS PRESENT_P STOCK_STATUS DIRNAME AVAILABLE_DATE COLOR_LIST SIZE_LIST CREATION_IP]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select ec_product__new($_PRODUCT_ID$_CREATION_USER$_CONTEXT_ID$_PRODUCT_NAME$_PRICE$_SKU$_ONE_LINE_DESCRIPTION$_DETAILED_DESCRIPTION$_SEARCH_KEYWORDS$_PRESENT_P$_STOCK_STATUS$_DIRNAME$_AVAILABLE_DATE$_COLOR_LIST$_SIZE_LIST$_CREATION_IP) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }