Class ExprNodeUtilityValidate
java.lang.Object
com.espertech.esper.common.internal.epl.expression.core.ExprNodeUtilityValidate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExprEqualsNode
static Map<String,
ExprNamedParameterNode> getNamedExpressionsHandleDups
(List<ExprNode> parameters) static void
getValidatedSubtree
(ExprNodeOrigin origin, ExprNode[][] exprNode, ExprValidationContext validationContext) static void
getValidatedSubtree
(ExprNodeOrigin origin, ExprNode[] exprNode, ExprValidationContext validationContext) static ExprNode
getValidatedSubtree
(ExprNodeOrigin origin, ExprNode exprNode, ExprValidationContext validationContext) Validates the expression node subtree that has this node as root.static String
isMinimalExpression
(ExprNode expression) Check if the expression is minimal: does not have a subselect, aggregation and does not need view resourcesstatic ExprValidationException
makeValidationExWExpression
(ExprNodeOrigin origin, String text, ExprValidationException ex) static void
validate
(ExprNodeOrigin origin, List<Chainable> chainSpec, ExprValidationContext validationContext) static void
validateAssignment
(boolean allowLHSVariables, ExprNodeOrigin origin, OnTriggerSetAssignment spec, ExprValidationContext validationContext) static EPTypeClass
static void
validateNamed
(Map<String, ExprNamedParameterNode> namedExpressions, String[] namedParameters) static boolean
validateNamedExpectType
(ExprNamedParameterNode namedParameterNode, Class[] expectedTypes) static void
validateNoSpecialsGroupByExpressions
(ExprNode[] groupByNodes) static void
validatePlainExpression
(ExprNodeOrigin origin, ExprNode expression) static void
validatePlainExpression
(ExprNodeOrigin origin, ExprNode[] expressions) static EPTypeClass
validateReturnsNumeric
(ExprForge forge) static void
validateReturnsNumeric
(ExprForge forge, Supplier<String> msg)
-
Constructor Details
-
ExprNodeUtilityValidate
public ExprNodeUtilityValidate()
-
-
Method Details
-
validateLHSTypeAnyAllSomeIn
- Throws:
ExprValidationException
-
validateReturnsNumeric
- Throws:
ExprValidationException
-
validateReturnsNumeric
public static void validateReturnsNumeric(ExprForge forge, Supplier<String> msg) throws ExprValidationException - Throws:
ExprValidationException
-
validatePlainExpression
public static void validatePlainExpression(ExprNodeOrigin origin, ExprNode[] expressions) throws ExprValidationException - Throws:
ExprValidationException
-
validatePlainExpression
public static void validatePlainExpression(ExprNodeOrigin origin, ExprNode expression) throws ExprValidationException - Throws:
ExprValidationException
-
validateAssignment
public static void validateAssignment(boolean allowLHSVariables, ExprNodeOrigin origin, OnTriggerSetAssignment spec, ExprValidationContext validationContext) throws ExprValidationException - Throws:
ExprValidationException
-
isMinimalExpression
Check if the expression is minimal: does not have a subselect, aggregation and does not need view resources- Parameters:
expression
- to inspect- Returns:
- null if minimal, otherwise name of offending sub-expression
-
getValidatedSubtree
public static ExprNode getValidatedSubtree(ExprNodeOrigin origin, ExprNode exprNode, ExprValidationContext validationContext) throws ExprValidationException Validates the expression node subtree that has this node as root. Some of the nodes of the tree, including the root, might be replaced in the process.- Parameters:
origin
- validate originexprNode
- nodevalidationContext
- context- Returns:
- the root node of the validated subtree, possibly different than the root node of the unvalidated subtree
- Throws:
ExprValidationException
- when the validation fails
-
makeValidationExWExpression
public static ExprValidationException makeValidationExWExpression(ExprNodeOrigin origin, String text, ExprValidationException ex) -
validateNamedExpectType
public static boolean validateNamedExpectType(ExprNamedParameterNode namedParameterNode, Class[] expectedTypes) throws ExprValidationException - Throws:
ExprValidationException
-
getNamedExpressionsHandleDups
public static Map<String,ExprNamedParameterNode> getNamedExpressionsHandleDups(List<ExprNode> parameters) throws ExprValidationException - Throws:
ExprValidationException
-
validateNamed
public static void validateNamed(Map<String, ExprNamedParameterNode> namedExpressions, String[] namedParameters) throws ExprValidationException- Throws:
ExprValidationException
-
getValidatedSubtree
public static void getValidatedSubtree(ExprNodeOrigin origin, ExprNode[] exprNode, ExprValidationContext validationContext) throws ExprValidationException - Throws:
ExprValidationException
-
getValidatedSubtree
public static void getValidatedSubtree(ExprNodeOrigin origin, ExprNode[][] exprNode, ExprValidationContext validationContext) throws ExprValidationException - Throws:
ExprValidationException
-
validate
public static void validate(ExprNodeOrigin origin, List<Chainable> chainSpec, ExprValidationContext validationContext) throws ExprValidationException - Throws:
ExprValidationException
-
getEqualsNodeIfAssignment
-
validateNoSpecialsGroupByExpressions
public static void validateNoSpecialsGroupByExpressions(ExprNode[] groupByNodes) throws ExprValidationException - Throws:
ExprValidationException
-