Fn_ParseParams.md
984 Bytes
Fn_ParseParams (function)
- Type: FUNCTION
-
Returns:
text - Deterministic: YES
- SQL data access: READS SQL DATA
Parameters
| # | Mode | Name | Type |
|---|---|---|---|
| 1 | IN | json_data |
json |
Body
Body is not pre-cached. To inspect: mysql --defaults-file=~/.my.cnf -e 'SHOW CREATE FUNCTIONFnParseParams'._
Narrative
Business context: Quotation reporting — renders a JSON parameter list as a human-readable string for display on the printed quotation. Each parameter row has a code (sParamKey), label (sParamName), and value (sParamValue); the output collapses them into name:【value】;name:【value】;… form.
What it does: uses JSON_TABLE to fan the JSON array out into rows and GROUP_CONCAT to assemble the display string. Pure transformation; no schema dependencies.
Invocation: called only by Sp_reportdata_Quo_JT — the data-prep proc behind the JT-flavoured quotation report template.