xo::db::list_to_values (public)

 xo::db::list_to_values list [ type ]

Defined in packages/xotcl-core/tcl/05-db-procs.tcl

Convert a Tcl list into a quoted SQL VALUES expression Example:

% list_to_values {1 2 3 4 5}
    (VALUES (1), (2), (3), (4), (5))

Parameters:
list (required)
type (optional, defaults to "text")

Partial Call Graph (max 5 caller/called nodes):
%3 test_test_misc_core test_misc_core (test xotcl-core) xo::db::list_to_values xo::db::list_to_values test_test_misc_core->xo::db::list_to_values

Testcases:
test_misc_core
Source code:
    set valueList [lmap e $list {set _ ([ns_dbquotevalue $e $type])}]
    return "(VALUES [join $valueList ,])"
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: