Class ExpressionCompiler
java.lang.Object
org.datanucleus.store.query.expression.ExpressionCompiler
Compiler for expressions. Responsible for taking a Node tree and creating an Expression tree.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate Expression
compileExpression
(Node node) Primary entry point for compiling a node for the filter, grouping, having, result clauses.compileFromExpression
(Node node, boolean classIsExpression) Primary entry point for compiling a node for the from clause.private Expression
compileOrAndExpression
(Node node) This method deals with the OR/AND conditions.compileOrderExpression
(Node node) Primary entry point for compiling a node for the order clause.private Expression
compilePrimaryExpression
(Node node) private Expression
private Expression
compileUnaryExpression
(Node node) private List
<Expression> Convenience method to extract properties for this node and return the associated list of expressions.private boolean
isOperator
(Node node, String operator) void
setMethodAliases
(Map<String, String> aliasByPrefix) void
setSymbolTable
(SymbolTable symtbl)
-
Field Details
-
symtbl
SymbolTable symtbl -
aliasByPrefix
-
-
Constructor Details
-
ExpressionCompiler
public ExpressionCompiler()
-
-
Method Details
-
setMethodAliases
-
setSymbolTable
-
compileOrderExpression
Primary entry point for compiling a node for the order clause.- Parameters:
node
- The node- Returns:
- Its compiled expression
-
compileFromExpression
Primary entry point for compiling a node for the from clause.- Parameters:
node
- The nodeclassIsExpression
- whether the class of the from node is an expression relating to the outer query- Returns:
- Its compiled expression
-
compileExpression
Primary entry point for compiling a node for the filter, grouping, having, result clauses.- Parameters:
node
- The node- Returns:
- Its compiled expression
-
compileOrAndExpression
This method deals with the OR/AND conditions. A condition specifies a combination of one or more expressions and logical (Boolean) operators and returns a value of TRUE, FALSE, or unknown- Parameters:
node
- The Node to process
-
compileRelationalExpression
-
compileAdditiveMultiplicativeExpression
-
compileUnaryExpression
-
compilePrimaryExpression
-
getExpressionsForPropertiesOfNode
Convenience method to extract properties for this node and return the associated list of expressions.- Parameters:
node
- The node- Returns:
- The list of expressions for the properties (or null if no properties)
-
isOperator
-