Class SQLFunction
java.lang.Object
ortus.boxlang.compiler.ast.BoxNode
ortus.boxlang.compiler.ast.sql.SQLNode
ortus.boxlang.compiler.ast.sql.select.expression.SQLExpression
ortus.boxlang.compiler.ast.sql.select.expression.SQLFunction
- All Implemented Interfaces:
BoxVisitable
- Direct Known Subclasses:
SQLCountFunction
Abstract Node class representing SQL function call
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionSQLFunction(Key name, List<SQLExpression> arguments, Position position, String sourceText) Constructor -
Method Summary
Modifier and TypeMethodDescriptionAccept method for replacing visitor support.voidAccept method for visitor support.protected Object[]buildAggregateValues(QoQSelectExecution QoQExec, List<int[]> intersections, SQLExpression argument) evaluate(QoQSelectExecution QoQExec, int[] intersection) Evaluate the expressionevaluateAggregate(QoQSelectExecution QoQExec, List<int[]> intersections) Evaluate the expression aginst a partition of dataGet the arguments of the functiongetName()Get the name of the functiongetType(QoQSelectExecution QoQExec) What type does this expression evaluate tobooleanIs function aggregatebooleanisBoolean(QoQSelectExecution QoQExec) Runtime check if the expression evaluates to a boolean value and works for columns as wellbooleanisNumeric(QoQSelectExecution QoQExec) Runtime check if the expression evaluates to a numeric value and works for columns as wellvoidsetArguments(List<SQLExpression> arguments) Set the arguments of the functionvoidSet the name of the functiontoMap()Methods inherited from class ortus.boxlang.compiler.ast.sql.select.expression.SQLExpression
isLiteralMethods inherited from class ortus.boxlang.compiler.ast.BoxNode
addComment, associateComments, endsOnSameLineAs, enumToMap, getAncestors, getChildren, getComments, getDescendants, getDescendantsOfType, getDescendantsOfType, getDescription, getDocComment, getFirstAncestorOfType, getFirstAncestorOfType, getFirstNodeOfType, getFirstNodeOfType, getFirstNodeOfTypes, getParent, getPosition, getSourceText, isAfter, isBefore, isInside, replaceChildren, replaceChildren, setComments, setParent, setPosition, setSourceText, startsOnEndLineOf, toJSON, toString
-
Constructor Details
-
SQLFunction
Constructor- Parameters:
position- position of the statement in the source codesourceText- source code of the statement
-
-
Method Details
-
getName
Get the name of the function- Returns:
- the name of the function
-
setName
Set the name of the function- Parameters:
name- the name of the function
-
getArguments
Get the arguments of the function- Returns:
- the arguments of the function
-
setArguments
Set the arguments of the function- Parameters:
arguments- the arguments of the function
-
isBoolean
Runtime check if the expression evaluates to a boolean value and works for columns as well- Overrides:
isBooleanin classSQLExpression- Parameters:
QoQExec- Query execution state- Returns:
- true if the expression evaluates to a boolean value
-
isNumeric
Runtime check if the expression evaluates to a numeric value and works for columns as well- Overrides:
isNumericin classSQLExpression- Parameters:
QoQExec- Query execution state- Returns:
- true if the expression evaluates to a numeric value
-
isAggregate
public boolean isAggregate()Is function aggregate -
getType
What type does this expression evaluate to- Overrides:
getTypein classSQLExpression
-
evaluate
Evaluate the expression- Specified by:
evaluatein classSQLExpression
-
evaluateAggregate
Evaluate the expression aginst a partition of data- Specified by:
evaluateAggregatein classSQLExpression
-
buildAggregateValues
protected Object[] buildAggregateValues(QoQSelectExecution QoQExec, List<int[]> intersections, SQLExpression argument) -
accept
Description copied from interface:BoxVisitableAccept method for visitor support.- Parameters:
v- the visitor implementation
-
accept
Description copied from interface:BoxVisitableAccept method for replacing visitor support. Each accept returns the node, or a replacement node.- Parameters:
v- the visitor implementation
-
toMap
-