use of org.mule.runtime.extension.api.dsql.QueryTranslator in project mule by mulesoft.
the class NativeQueryParameterValueResolver method resolve.
/**
* {@inheritDoc}
*/
@Override
public String resolve(ValueResolvingContext context) throws MuleException {
String query = super.resolve(context);
if (!isDsqlQuery(query)) {
return query;
}
DsqlQuery dsqlQuery = dsqlParser.parse(query);
// creates new instances to avoid state related problems of the translator implementation.
QueryTranslator queryTranslator = instantiateTranslator(translatorClass);
return dsqlQuery.translate(queryTranslator);
}
Aggregations