public class SimpleFunction extends Object implements Expression
Expressions.| Modifier and Type | Method and Description |
|---|---|
SimpleFunction |
as(SqlIdentifier alias)
Expose this function result under a column
alias. |
SimpleFunction |
as(String alias)
Expose this function result under a column
alias. |
static SimpleFunction |
create(String functionName,
List<Expression> expressions)
|
boolean |
equals(Object obj)
|
List<Expression> |
getExpressions() |
String |
getFunctionName() |
int |
hashCode()
Generate a hash code from this
Segment. |
String |
toString()
Return a SQL string representation of this
Segment. |
void |
visit(Visitor visitor)
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static SimpleFunction create(String functionName, List<Expression> expressions)
functionName - must not be null.expressions - zero or many Expressions, must not be null.public SimpleFunction as(String alias)
alias.alias - column alias name, must not null or empty.SimpleFunction.public SimpleFunction as(SqlIdentifier alias)
alias.alias - column alias name, must not null.SimpleFunction.public String getFunctionName()
public List<Expression> getExpressions()
public String toString()
SegmentSegment.
The representation is intended for debugging purposes and an approximation to the generated SQL. While it might
work in the context of a specific dialect, you should not that the Segment.toString() representation works across
multiple databases.public int hashCode()
SegmentSegment.
Hashcode typically derives from the Segment.toString() representation so two Segments yield the same
Segment.hashCode() if their Segment.toString() representation matches.public boolean equals(Object obj)
SegmentSegment is equal to another Segment.
Equality is typically given if the Segment.toString() representation matches.Copyright © 2017–2021 Pivotal Software, Inc.. All rights reserved.