xo::db::sql::apm proc update_parameter (public)
xo::db::sql::apm update_parameter [ -dbn dbn ] \ -parameter_id parameter_id [ -parameter_name parameter_name ] \ [ -description description ] [ -datatype datatype ] \ [ -default_value default_value ] [ -section_name section_name ] \ [ -min_n_values min_n_values ] [ -max_n_values max_n_values ]
Defined in /var/www/openacs.org/packages/xotcl-core/tcl/05-db-procs.tcl
Automatically generated method
- Switches:
- -dbn (optional)
- -parameter_id (required)
- -parameter_name (optional)
- -description (optional)
- -datatype (optional, defaults to
"string"
)- -default_value (optional)
- -section_name (optional)
- -min_n_values (optional, defaults to
"1"
)- -max_n_values (optional, defaults to
"1"
)- Testcases:
- No testcase defined.
Source code: #function_args: {PARAMETER_ID {}} {PARAMETER_NAME null} {DESCRIPTION null} {DATATYPE string} {DEFAULT_VALUE null} {SECTION_NAME null} {MIN_N_VALUES 1} {MAX_N_VALUES 1} foreach var [list PARAMETER_ID PARAMETER_NAME DESCRIPTION DATATYPE DEFAULT_VALUE SECTION_NAME MIN_N_VALUES MAX_N_VALUES] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select apm__update_parameter($_PARAMETER_ID, $_PARAMETER_NAME, $_DESCRIPTION, $_DATATYPE, $_DEFAULT_VALUE, $_SECTION_NAME, $_MIN_N_VALUES, $_MAX_N_VALUES) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }XQL Not present: Generic, PostgreSQL, Oracle