Class CastExasolFunction
- java.lang.Object
-
- com.exasol.util.AbstractTree
-
- com.exasol.util.AbstractTreeNode
-
- com.exasol.sql.expression.function.AbstractFunction
-
- com.exasol.sql.expression.function.exasol.ExasolFunction
-
- com.exasol.sql.expression.function.exasol.CastExasolFunction
-
- All Implemented Interfaces:
Function,ValueExpression,TreeNode
public class CastExasolFunction extends ExasolFunction
This class represents the Exasol CAST function.
-
-
Field Summary
-
Fields inherited from class com.exasol.sql.expression.function.AbstractFunction
functionName, valueExpressions
-
Fields inherited from class com.exasol.util.AbstractTree
children, parent
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(ValueExpressionVisitor visitor)Accept a visitorDataTypegetType()Get the type to cast the value to.ValueExpressiongetValue()Get the value to cast.booleanhasParenthesis()Check if function needs parenthesis.static CastExasolFunctionof(ValueExpression valueExpression, DataType type)Create a newCastExasolFunctioninstance.-
Methods inherited from class com.exasol.sql.expression.function.exasol.ExasolFunction
of, of
-
Methods inherited from class com.exasol.sql.expression.function.AbstractFunction
getFunctionName
-
Methods inherited from class com.exasol.util.AbstractTreeNode
addChild, getRoot, setParent
-
Methods inherited from class com.exasol.util.AbstractTree
getChild, getChildren, getParent, isChild, isFirstSibling, isRoot, isSibling
-
-
-
-
Method Detail
-
of
public static CastExasolFunction of(ValueExpression valueExpression, DataType type)
Create a newCastExasolFunctioninstance.- Parameters:
valueExpression- value to casttype- type to cast the value to- Returns:
- new
CastExasolFunction
-
getValue
public ValueExpression getValue()
Get the value to cast.- Returns:
- value to cast
-
getType
public DataType getType()
Get the type to cast the value to.- Returns:
- type to cast the value to
-
hasParenthesis
public boolean hasParenthesis()
Description copied from interface:FunctionCheck if function needs parenthesis.- Specified by:
hasParenthesisin interfaceFunction- Overrides:
hasParenthesisin classExasolFunction- Returns:
- true if function has parenthesis with parameters
-
accept
public void accept(ValueExpressionVisitor visitor)
Description copied from interface:ValueExpressionAccept a visitor- Specified by:
acceptin interfaceValueExpression- Overrides:
acceptin classExasolFunction- Parameters:
visitor- visitor to accept
-
-