util::json::sql_values_to_json_values (public)

 util::json::sql_values_to_json_values row

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

Converts empty values to "null", consistent with how oracle, mysql, and the nspostgres bindvar hack treats them.

Parameters:
row - A row (list) returned by a sql SELECT.
Returns:
A new list with empty strings converted to null.

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

Testcases:
No testcase defined.
Source code:
    set new_row {}
    foreach value $row {
        if { $value eq "" } {
            lappend new_row null
        } else {
            lappend new_row $value
        }
    }
    return $new_row
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: