Class CastExasolFunction
- java.lang.Object
-
- com.exasol.sql.expression.function.AbstractFunction
-
- com.exasol.sql.expression.function.exasol.CastExasolFunction
-
- All Implemented Interfaces:
Function
,ValueExpression
public class CastExasolFunction extends AbstractFunction
This class represents the Exasol CAST function.
-
-
Field Summary
-
Fields inherited from class com.exasol.sql.expression.function.AbstractFunction
functionName, parameters
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(FunctionVisitor visitor)
AcceptFunctionVisitor
.DataType
getType()
Get the type to cast the value to.ValueExpression
getValue()
Get the value to cast.boolean
hasParenthesis()
Check if function needs parenthesis.static CastExasolFunction
of(ValueExpression valueExpression, DataType type)
Create a newCastExasolFunction
instance.-
Methods inherited from class com.exasol.sql.expression.function.AbstractFunction
accept, getFunctionName, getParameters
-
-
-
-
Method Detail
-
of
public static CastExasolFunction of(ValueExpression valueExpression, DataType type)
Create a newCastExasolFunction
instance.- 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:Function
Check if function needs parenthesis.- Returns:
- true if function has parenthesis with parameters
-
accept
public void accept(FunctionVisitor visitor)
Description copied from interface:Function
AcceptFunctionVisitor
.- Parameters:
visitor
- visitor to accept
-
-