util::json::json_value_to_sql_value (public, deprecated)

 util::json::json_value_to_sql_value value

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

Deprecated. Invoking this procedure generates a warning.

For new code, use database bind variables and map JSON booleans and null to the types expected by the target column. While mysql happily treats false as 0, real SQL does not. And we need to protect against apostrophes in strings. And handle null. You get the idea.

Parameters:
value (required)
A value from a parsed JSON string
Returns:
Something that works in Real SQL, not to be confused with MySQL. This includes not trying to insert '' into columns of type real, when "null" is meant (we mimic Oracle bindvar/PG bindvar emulation semantics). The Ilias RTE JavaScript returns '' rather than null for JS null variables.

Partial Call Graph (max 5 caller/called nodes):
ad_log_deprecated ad_log_deprecated (public) util::json::json_value_to_sql_value util::json::json_value_to_sql_value util::json::json_value_to_sql_value->ad_log_deprecated

Testcases:
No testcase defined.
[ show source ]
Show another procedure: