- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xo::db::sql::ec_product
::xo::db::sql::ec_product create ...
Defined in
Class Relations
::xo::db::Class create ::xo::db::sql::ec_product \ -superclass ::xotcl::ObjectMethods (to be applied on the object)
delete (scripted, public)
xo::db::sql::ec_product delete [ -dbn dbn ] -product_id product_idAutomatically generated method
- Switches:
- -dbn (optional)
- -product_id (required)
- 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 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 (optional, defaults to
"t"
)- -stock_status (optional, defaults to
"o"
)- -dirname (optional)
- -available_date (optional, defaults to
"sysdate"
)- -color_list (optional)
- -size_list (optional)
- -creation_ip (optional)
- -childof (optional)
- 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 ] }
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables