Package net.sf.jsqlparser.schema
Class Column
java.lang.Object
net.sf.jsqlparser.parser.ASTNodeAccessImpl
net.sf.jsqlparser.schema.Column
- All Implemented Interfaces:
Serializable
,Expression
,Model
,ASTNodeAccess
,MultiPartName
A column. It can have the table name it belongs to.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ArrayConstructor
private String
private String
private Table
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(ExpressionVisitor expressionVisitor) getFullyQualifiedName
(boolean aliases) getName
(boolean aliases) Deprecated.getTable()
Retrieve the information regarding theTable
thisColumn
does belong to, if any can be inferred.setArrayConstructor
(ArrayConstructor arrayConstructor) void
setColumnName
(String string) void
setCommentText
(String commentText) void
toString()
withColumnName
(String columnName) withCommentText
(String commentText) 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
-
table
-
columnName
-
commentText
-
arrayConstructor
-
-
Constructor Details
-
Column
public Column() -
Column
-
Column
-
Column
-
-
Method Details
-
getArrayConstructor
-
setArrayConstructor
-
getTable
Retrieve the information regarding theTable
thisColumn
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:
SELECT x FROM Foo
Column
calledx
, this method would returnnull
, and not the info about the tableFoo
. On the other hand, consider:SELECT t.x FROM Foo t
Table
object for a table calledt
. But because the inference is local, such object will not know thatt
is just an alias forFoo
.- Returns:
- an instance of
Table
representing the table this column does belong to, if it can be inferred. Can benull
.
-
setTable
-
getColumnName
-
setColumnName
-
getFullyQualifiedName
- Specified by:
getFullyQualifiedName
in interfaceMultiPartName
-
getFullyQualifiedName
-
getName
Deprecated. -
accept
- Specified by:
accept
in interfaceExpression
-
toString
-
withTable
-
withColumnName
-
withCommentText
-
setCommentText
-
getCommentText
-