Index: openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl,v diff -u -r1.99 -r1.100 --- openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 8 May 2018 22:37:18 -0000 1.99 +++ openacs-4/packages/acs-tcl/tcl/00-database-procs.tcl 9 May 2018 15:33:28 -0000 1.100 @@ -504,7 +504,7 @@ # Initialize bookkeeping variables. if { ![info exists db_state(handles)] } { - set db_state(handles) {} + set db_state(handles) [list] } if { ![info exists db_state(n_handles_used)] } { set db_state(n_handles_used) 0 @@ -805,7 +805,7 @@ upvar bind bind if { [info exists bind] && [llength $bind] != 0 } { if { [llength $bind] == 1 } { - set bind_vars {} + set bind_vars [list] set len [ns_set size $bind] for {set i 0} {$i < $len} {incr i} { lappend bind_vars [ns_set key $bind $i] \ @@ -862,7 +862,7 @@ @see db_bind_var_subsitution } { - set quote_indices {} + set quote_indices [list] # Returns a list on the format # Example - for sql={'a'a'a'} returns @@ -1197,7 +1197,7 @@ return [ns_cache eval $cache_pool $cache_key { db_with_handle -dbn $dbn db { set selection [db_exec select $db $full_statement_name $sql] - set result {} + set result [list] while { [db_getrow $db $selection] } { lappend result [ns_set value $selection 0] } @@ -1208,7 +1208,7 @@ db_with_handle -dbn $dbn db { set selection [db_exec select $db $full_statement_name $sql] - set result {} + set result [list] while { [db_getrow $db $selection] } { lappend result [ns_set value $selection 0] } @@ -1251,9 +1251,9 @@ return [ns_cache eval $cache_pool $cache_key { db_with_handle -dbn $dbn db { set selection [db_exec select $db $full_statement_name $sql] - set result {} + set result [list] while { [db_getrow $db $selection] } { - set this_result {} + set this_result [list] for { set i 0 } { $i < [ns_set size $selection] } { incr i } { lappend this_result [ns_set value $selection $i] } @@ -1266,9 +1266,9 @@ db_with_handle -dbn $dbn db { set selection [db_exec select $db $full_statement_name $sql] - set result {} + set result [list] while { [db_getrow $db $selection] } { - set this_result {} + set this_result [list] for { set i 0 } { $i < [ns_set size $selection] } { incr i } { lappend this_result [ns_set value $selection $i] } @@ -1304,7 +1304,7 @@ set full_statement_name [db_qd_get_fullname $statement_name] db_with_handle -dbn $dbn db { - set result {} + set result [list] set selection [db_exec select $db $full_statement_name $sql] while {[db_getrow $db $selection]} { @@ -1779,7 +1779,7 @@ set value [ns_cache eval $cache_pool $cache_key { db_multirow_helper - set values {} + set values [list] for { set count 1 } { $count <= $counter } { incr count } { upvar $level_up "$var_name:[expr {$count}]" array_val @@ -1826,7 +1826,7 @@
# Initialize the lines variable to hold a list of order line summaries - set lines {} + set lines [list] # Start building the multirow. We add the dynamic column 'lines_pretty', which will # contain the pretty summary of the order lines. @@ -1846,7 +1846,7 @@ set lines_pretty [join $lines ", "] # Reset the lines list, so we start from a fresh with the next row - set lines {} + set lines [list] } else { # There are yet more order lines to come for this order, # continue until we've collected all the order lines @@ -1909,7 +1909,7 @@ # Remember which one (if any) is provided: set lob_argc 0 - set lob_argv {} + set lob_argv [list] set command "dml" if { [info exists clobs] } { set command "clob_dml" @@ -1940,7 +1940,7 @@ db_with_handle -dbn $dbn db { if { $lob_argc == 1 } { # Bind :1, :2, ..., :n as LOBs (where n = [llength $lob_argv]) - set bind_vars {} + set bind_vars [list] for { set i 1 } { $i <= [llength $lob_argv] } { incr i } { lappend bind_vars $i } @@ -2064,7 +2064,7 @@ set selection [db_exec 0or1row $db $full_statement_name $sql] } - set values {} + set values [list] if { $selection ne "" } { for {set i 0} { $i < [ns_set size $selection] } {incr i} { @@ -2862,7 +2862,7 @@ } } - set tables {} + set tables [list] if { [info exists pattern] } { db_foreach -dbn $dbn table_names_with_pattern \ $sql_table_names_with_pattern { @@ -2925,7 +2925,7 @@ @change-log yon@arsdigita.com 20000711 changed to return lower case column names } { - set columns {} + set columns [list] # Works for both Oracle and PostgreSQL: db_foreach -dbn $dbn table_column_names { @@ -2947,7 +2947,7 @@ @author Lars Pind (lars@pinds.com) } { - set columns {} + set columns [list] # Works for both Oracle and PostgreSQL: set n_rows [db_string -dbn $dbn column_exists { @@ -3338,7 +3338,7 @@ upvar bind bind if { [info exists bind] && [llength $bind] != 0 } { if { [llength $bind] == 1 } { - set bind_vars {} + set bind_vars [list] set len [ns_set size $bind] for {set i 0} {$i < $len} {incr i} { lappend bind_vars [ns_set key $bind $i] \