ad_tcl_list_list_to_ns_set (public)

 ad_tcl_list_list_to_ns_set [ -set_id set_id ] [ -put ] kv_pairs

Defined in packages/acs-tcl/tcl/utilities-procs.tcl

Takes a list of lists of key/value pairs and ns_set updates values in an ns_set.

Switches:
-set_id
(optional)
If this switch is specified, it'll use this set instead of creating a new one.
-put
(boolean) (optional)
If this boolean switch is specified, it'll use ns_set put instead of ns_set update (update is default)
Parameters:
kv_pairs - A list of lists containing key/value pairs to be stuffed into the ns_set
Author:
Yonatan Feldman <yon@arsdigita.com>

Partial Call Graph (max 5 caller/called nodes):
%3

Testcases:
No testcase defined.
Source code:

    if { ![info exists set_id] } {
        set set_id [ns_set create]
    }

    if { $put_p } {
        set command put
    } else {
        set command update
    }

    foreach kv_pair $kv_pairs {
        ns_set $command $set_id [lindex $kv_pair 0] [lindex $kv_pair 1]
    }

    return $set_id
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/utilities-procs.xql

[ hide source ] | [ make this the default ]
Show another procedure: