template::util::set_to_list (public, deprecated)

 template::util::set_to_list set [ args... ]

Defined in packages/acs-templating/tcl/deprecated-procs.tcl

Deprecated. Invoking this procedure generates a warning.

Turns an ns_set into a key-value list, excluding any number of specified keys. Useful for turning the contents on an ns_set into a form that may be cached or manipulated as a native Tcl data structure. DEPRECATED: this proc can be replaced with trivial ns_set and plain tcl idioms

Parameters:
set (required)
A reference to an ns_set.
Returns:
A list in the form { key value key value key value ... }
See Also:
  • ns_set

Testcases:
No testcase defined.
Source code:
ad_log_deprecated proc template::util::set_to_list

    set result [list]

    for { set i 0 } { $i < [ns_set size $set] } { incr i } {

        set key [ns_set key $set $i]
        if { $key in $args } { continue }

        lappend result $key [ns_set value $set $i]
    }

    return $result
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: