public class Column extends net.sf.jsqlparser.parser.ASTNodeAccessImpl implements Expression, MultiPartName
| Constructor and Description |
|---|
Column() |
Column(List<String> nameParts) |
Column(String columnName) |
Column(Table table,
String columnName) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ExpressionVisitor expressionVisitor) |
String |
getColumnName() |
String |
getFullyQualifiedName() |
String |
getName(boolean aliases) |
Table |
getTable()
Retrieve the information regarding the
Table this Column does
belong to, if any can be inferred. |
void |
setColumnName(String string) |
void |
setTable(Table table) |
String |
toString() |
Column |
withColumnName(String columnName) |
Column |
withTable(Table table) |
public Column()
public Column(String columnName)
public Table getTable()
Table this Column does
belong to, if any can be inferred.
The inference is based only on local information, and not on the whole SQL command. For example, consider the following query:
Given theSELECT x FROM Foo
Column called x, this method would return null,
and not the info about the table Foo.
On the other hand, consider:
Here, we will get aSELECT t.x FROM Foo t
Table object for a table called t.
But because the inference is local, such object will not know that t is
just an alias for Foo.Table representing the
table this column does belong to, if it can be inferred. Can be null.public void setTable(Table table)
public String getColumnName()
public void setColumnName(String string)
public String getFullyQualifiedName()
getFullyQualifiedName in interface MultiPartNamepublic String getName(boolean aliases)
public void accept(ExpressionVisitor expressionVisitor)
accept in interface ExpressionCopyright © 2004–2022 JSQLParser. All rights reserved.