Package net.sf.jsqlparser.expression
Class Function
java.lang.Object
net.sf.jsqlparser.parser.ASTNodeAccessImpl
net.sf.jsqlparser.expression.Function
- All Implemented Interfaces:
Serializable
,Expression
,Model
,ASTNodeAccess
- Direct Known Subclasses:
TableFunction
A function as MAX,COUNT...
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private Column
private Expression
private boolean
private boolean
private boolean
private KeepExpression
private NamedExpressionList
<?> private List
<OrderByElement> private ExpressionList
<?> private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ExpressionVisitor expressionVisitor) <E extends Expression>
EgetAttribute
(Class<E> type) Deprecated.getKeep()
getName()
the parameters might be named parameters, e.g.The list of parameters of the function (if any, else null) If the parameter is "*", allColumns is set to trueboolean
boolean
true if the function is "distinct"boolean
Return true if it's in the form "{fn function_body() }"boolean
boolean
isUnique()
true if the function is "unique"void
setAllColumns
(boolean b) void
setAttribute
(Expression attributeExpression) void
setAttribute
(Column attributeColumn) void
setAttributeName
(String attributeName) void
setDistinct
(boolean b) void
setEscaped
(boolean isEscaped) void
setIgnoreNulls
(boolean ignoreNulls) This is at the moment only necessary for AnalyticExpression initialization and not for normal functions.void
setKeep
(KeepExpression keep) void
void
void
setNamedParameters
(NamedExpressionList<?> list) void
setOrderByElements
(List<OrderByElement> orderByElements) void
setParameters
(Expression... expressions) void
setParameters
(ExpressionList<?> list) void
setUnique
(boolean b) toString()
withAllColumns
(boolean allColumns) withAttribute
(Expression attribute) withAttribute
(Column attributeColumn) withAttributeName
(String attributeName) Deprecated.withDistinct
(boolean distinct) withIgnoreNulls
(boolean ignoreNulls) withKeep
(KeepExpression keep) withNamedParameters
(NamedExpressionList<?> namedParameters) withParameters
(Expression... parameters) withParameters
(ExpressionList<?> parameters) withUnique
(boolean unique) Methods inherited from class net.sf.jsqlparser.parser.ASTNodeAccessImpl
appendTo, getASTNode, setASTNode
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.sf.jsqlparser.parser.ASTNodeAccess
getASTNode, setASTNode
-
Field Details
-
nameparts
-
parameters
-
namedParameters
-
allColumns
private boolean allColumns -
distinct
private boolean distinct -
unique
private boolean unique -
isEscaped
private boolean isEscaped -
attributeExpression
-
attributeColumn
-
orderByElements
-
keep
-
ignoreNulls
private boolean ignoreNulls
-
-
Constructor Details
-
Function
public Function()
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceExpression
-
getName
-
getMultipartName
-
setName
-
withName
-
withName
-
setName
-
isAllColumns
public boolean isAllColumns() -
setAllColumns
public void setAllColumns(boolean b) -
isIgnoreNulls
public boolean isIgnoreNulls() -
setIgnoreNulls
public void setIgnoreNulls(boolean ignoreNulls) This is at the moment only necessary for AnalyticExpression initialization and not for normal functions. Therefore there is no deparsing for it for normal functions. -
isDistinct
public boolean isDistinct()true if the function is "distinct"- Returns:
- true if the function is "distinct"
-
setDistinct
public void setDistinct(boolean b) -
isUnique
public boolean isUnique()true if the function is "unique"- Returns:
- true if the function is "unique"
-
setUnique
public void setUnique(boolean b) -
getParameters
The list of parameters of the function (if any, else null) If the parameter is "*", allColumns is set to true- Returns:
- the list of parameters of the function (if any, else null)
-
setParameters
-
setParameters
-
getNamedParameters
the parameters might be named parameters, e.g. substring('foobar' from 2 for 3)- Returns:
- the list of named parameters of the function (if any, else null)
-
setNamedParameters
-
isEscaped
public boolean isEscaped()Return true if it's in the form "{fn function_body() }"- Returns:
- true if it's java-escaped
-
setEscaped
public void setEscaped(boolean isEscaped) -
getAttribute
-
setAttribute
-
getAttributeName
Deprecated. -
setAttributeName
-
getAttributeColumn
-
setAttribute
-
withAttribute
-
getKeep
-
setKeep
-
toString
-
withAttribute
-
withAttributeName
Deprecated. -
withKeep
-
withIgnoreNulls
-
withParameters
-
withParameters
-
withNamedParameters
-
withAllColumns
-
withDistinct
-
withUnique
-
getOrderByElements
-
setOrderByElements
-
getAttribute
-