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) |
ArrayConstructor |
getArrayConstructor() |
String |
getColumnName() |
String |
getCommentText() |
String |
getFullyQualifiedName() |
String |
getFullyQualifiedName(boolean aliases) |
String |
getName(boolean aliases)
Deprecated.
|
Table |
getTable()
Retrieve the information regarding the
Table this Column does belong to, if
any can be inferred. |
Column |
setArrayConstructor(ArrayConstructor arrayConstructor) |
void |
setColumnName(String string) |
void |
setCommentText(String commentText) |
void |
setTable(Table table) |
String |
toString() |
Column |
withColumnName(String columnName) |
Column |
withCommentText(String commentText) |
Column |
withTable(Table table) |
appendTo, getASTNode, setASTNodepublic Column()
public Column(String columnName)
public ArrayConstructor getArrayConstructor()
public Column setArrayConstructor(ArrayConstructor arrayConstructor)
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 getFullyQualifiedName(boolean aliases)
@Deprecated public String getName(boolean aliases)
public void accept(ExpressionVisitor expressionVisitor)
accept in interface Expressionpublic void setCommentText(String commentText)
public String getCommentText()
Copyright © 2004–2023 JSQLParser. All rights reserved.