util_dbq { -null_is_null_p f } varsWhat it does:
Given a list of variable names this routine creates variables named DBQvariable_name which can be used in sql insert and update statements.Defined in: /web/philip/packages/acs-core/utilities-procs.tclIf -null_is_null_p is t then we return the string "null" unquoted so that "update foo set var = $DBQvar where ..." will do what we want if we default var to "null".
Source code:
arg_parser_for_util_dbq $args
foreach var $vars {
upvar 1 $var val
if [info exists val] {
if { $null_is_null_p == "t"
&& $val == {null} } {
uplevel [list set DBQ$var {null}]
} else {
uplevel [list set DBQ$var "'[DoubleApos [string trim $val]]'"]
}
}
}