paramValuesFromDirected function
Converts DirectedParam rows to a legacy v0 binary ParamValue list
(concatenated tags, all treated as INPUT on the wire).
ParamDirection.input only — any other direction throws
UnsupportedError because the legacy path cannot represent direction
(use serializeDirectedParams and the service
executeQueryDirectedParams for OUT / INOUT).
Implementation
List<ParamValue> paramValuesFromDirected(List<DirectedParam> params) {
return params.map((d) {
if (d.direction != ParamDirection.input) {
throw UnsupportedError(
'ParamDirection.${d.direction.name} is not supported on the legacy '
'parameter path; use serializeDirectedParams() and '
'executeQueryDirectedParams() for OUT/INOUT.',
);
}
if (d.type == null) {
return toParamValue(d.value);
}
return toParamValue(typedParam(d.type!, d.value));
}).toList();
}