public class Column extends Object implements Expression, Named
SELECT … FROM clause.
Renders to: <name> or <table(alias)>.<name>.| Modifier and Type | Method and Description |
|---|---|
static Column |
aliased(String name,
Table table,
String alias)
|
Column |
as(SqlIdentifier alias)
Creates a new aliased
Column. |
Column |
as(String alias)
Creates a new aliased
Column. |
Between |
between(Expression begin,
Expression end)
Creates a
BETWEEN Condition. |
static Column |
create(SqlIdentifier name,
Table table)
|
static Column |
create(String name,
Table table)
|
boolean |
equals(Object obj)
|
Column |
from(Table table)
|
SqlIdentifier |
getName() |
SqlIdentifier |
getReferenceName() |
Table |
getTable() |
int |
hashCode()
Generate a hash code from this
Segment. |
In |
in(Expression... expression)
|
In |
in(Select subselect)
|
Comparison |
isEqualTo(Expression expression)
Creates a
= (equals) Condition. |
Comparison |
isGreater(Expression expression)
Creates a {@code !
|
Comparison |
isGreaterOrEqualTo(Expression expression)
Creates a
<= (greater or equal to) Condition. |
Comparison |
isLess(Expression expression)
Creates a
< (less) Condition. |
Comparison |
isLessOrEqualTo(Expression expression)
CCreates a
<= (greater) Condition. |
Comparison |
isNotEqualTo(Expression expression)
Creates a {@code !
|
Condition |
isNotNull()
Creates a
IS NOT NULL condition. |
IsNull |
isNull()
Creates a
IS NULL condition. |
Like |
like(Expression expression)
Creates a
LIKE Condition. |
Between |
notBetween(Expression begin,
Expression end)
Creates a
NOT BETWEEN Condition. |
In |
notIn(Expression... expression)
|
In |
notIn(Select subselect)
|
Like |
notLike(Expression expression)
Creates a
NOT LIKE Condition. |
AssignValue |
set(Expression value)
Creates a value
assignment. |
String |
toString()
Return a SQL string representation of this
Segment. |
void |
visit(Visitor visitor)
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static Column create(String name, Table table)
name - column name, must not null or empty.table - the table, must not be null.Column.public static Column create(SqlIdentifier name, Table table)
name - column name, must not null.table - the table, must not be null.Column.public static Column aliased(String name, Table table, String alias)
name - column name, must not null or empty.table - the table, must not be null.alias - column alias name, must not null or empty.Column.public Column as(String alias)
Column.alias - column alias name, must not null or empty.Column.public Column as(SqlIdentifier alias)
Column.alias - column alias name, must not null.Column.public Comparison isEqualTo(Expression expression)
= (equals) Condition.expression - right side of the comparison.Comparison condition.public Comparison isNotEqualTo(Expression expression)
!= (not equals) Condition.expression - right side of the comparison.Comparison condition.public Between between(Expression begin, Expression end)
BETWEEN Condition.begin - begin value for the comparison.end - end value for the comparison.Between condition.public Between notBetween(Expression begin, Expression end)
NOT BETWEEN Condition.begin - begin value for the comparison.end - end value for the comparison.Between condition.public Comparison isLess(Expression expression)
< (less) Condition.expression - right side of the comparison.Comparison condition.public Comparison isLessOrEqualTo(Expression expression)
<= (greater) Condition.expression - right side of the comparison.Comparison condition.public Comparison isGreater(Expression expression)
!= (not equals) Condition.expression - right side of the comparison.Comparison condition.public Comparison isGreaterOrEqualTo(Expression expression)
<= (greater or equal to) Condition.expression - right side of the comparison.Comparison condition.public Like like(Expression expression)
LIKE Condition.expression - right side of the comparison.Like condition.public Like notLike(Expression expression)
NOT LIKE Condition.expression - right side of the comparison.Like condition.public In in(Expression... expression)
expression - right side of the comparison.In condition.public In in(Select subselect)
subselect - right side of the comparison.In condition.public In notIn(Expression... expression)
expression - right side of the comparison.In condition.public In notIn(Select subselect)
subselect - right side of the comparison.In condition.public Condition isNotNull()
IS NOT NULL condition.Condition condition.public AssignValue set(Expression value)
assignment.value - the value to assign.AssignValue assignment.public SqlIdentifier getName()
public SqlIdentifier getReferenceName()
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.