Package org.ehrbase.aql.compiler
Class AqlExpressionWithParameters
- java.lang.Object
-
- org.ehrbase.aql.compiler.AqlExpression
-
- org.ehrbase.aql.compiler.AqlExpressionWithParameters
-
public class AqlExpressionWithParameters extends AqlExpression
-
-
Field Summary
Fields Modifier and Type Field Description static StringPARAMETERS_KEY
-
Constructor Summary
Constructors Constructor Description AqlExpressionWithParameters()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AqlExpressionWithParametersparse(String expression, String jsonParameterMap)get the parameter values from a json expression in the format: "query-parameters": { "ehr_id": "7d44b88c-4199-4bad-97dc-d78268e01398", "systolic_bp": 140 }AqlExpressionWithParametersparse(String query, Map<String,Object> parameterValues)Stringsubstitute(String query, Map<String,Object> parameterValues)Substitute parameters in aql expression A parameter symbol starts with a '$' and a combination of alphanumeric with '-' or '_' If the parameter value is a string or a UUID it is single quoted.-
Methods inherited from class org.ehrbase.aql.compiler.AqlExpression
dump, getParseTree, parse
-
-
-
-
Field Detail
-
PARAMETERS_KEY
public static final String PARAMETERS_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
parse
public AqlExpressionWithParameters parse(String query, Map<String,Object> parameterValues)
-
parse
public AqlExpressionWithParameters parse(String expression, String jsonParameterMap)
get the parameter values from a json expression in the format: "query-parameters": { "ehr_id": "7d44b88c-4199-4bad-97dc-d78268e01398", "systolic_bp": 140 }- Overrides:
parsein classAqlExpression- Parameters:
expression-jsonParameterMap-- Returns:
-
substitute
public String substitute(String query, Map<String,Object> parameterValues)
Substitute parameters in aql expression A parameter symbol starts with a '$' and a combination of alphanumeric with '-' or '_' If the parameter value is a string or a UUID it is single quoted.- Parameters:
query-parameterValues-- Returns:
-
-