Class SQLExprTableSource
- java.lang.Object
-
- com.alibaba.druid.sql.ast.SQLObjectImpl
-
- com.alibaba.druid.sql.ast.statement.SQLTableSourceImpl
-
- com.alibaba.druid.sql.ast.statement.SQLExprTableSource
-
- All Implemented Interfaces:
SQLObject,SQLReplaceable,SQLTableSource
- Direct Known Subclasses:
DorisExprTableSource,OracleSelectTableReference,OscarFunctionTableSource,PGFunctionTableSource
public class SQLExprTableSource extends SQLTableSourceImpl implements SQLReplaceable
-
-
Field Summary
Fields Modifier and Type Field Description protected List<SQLName>columnsprotected SQLExprexprprotected List<SQLName>partitionsprotected SQLTableSamplingsamplingprotected SchemaObjectschemaObject-
Fields inherited from class com.alibaba.druid.sql.ast.statement.SQLTableSourceImpl
alias, aliasHashCode64, flashback, hints, needAsTokenForAlias, pivot, unpivot
-
Fields inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
attributes, hint, parent, sourceColumn, sourceLine
-
-
Constructor Summary
Constructors Constructor Description SQLExprTableSource()SQLExprTableSource(SQLExpr expr)SQLExprTableSource(SQLExpr expr, String alias)SQLExprTableSource(String tableName)
-
Method Summary
-
Methods inherited from class com.alibaba.druid.sql.ast.statement.SQLTableSourceImpl
findTableSource, findTableSourceWithColumn, findTableSourceWithColumn, getAlias, getAlias2, getFlashback, getHints, getHintsSize, getPivot, getUnpivot, isNeedAsTokenForAlias, setAlias, setFlashback, setHints, setNeedAsTokenForAlias, setPivot, setUnpivot
-
Methods inherited from class com.alibaba.druid.sql.ast.SQLObjectImpl
accept, acceptChild, acceptChild, addAfterComment, addAfterComment, addBeforeComment, addBeforeComment, cloneTo, computeDataType, containsAttribute, getAfterCommentsDirect, getAttribute, getAttributes, getAttributesDirect, getBeforeCommentsDirect, getHint, getParent, getParent, getSourceColumn, getSourceLine, hasAfterComment, hasBeforeComment, output, putAttribute, setHint, setParent, setSource, setSourceLine, toString
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.alibaba.druid.sql.ast.SQLObject
accept, addAfterComment, addAfterComment, addBeforeComment, addBeforeComment, containsAttribute, getAfterCommentsDirect, getAttribute, getAttributes, getAttributesDirect, getBeforeCommentsDirect, getParent, getParent, getSourceColumn, getSourceLine, hasAfterComment, hasBeforeComment, output, putAttribute, setParent, setSource
-
Methods inherited from interface com.alibaba.druid.sql.ast.statement.SQLTableSource
resolveColum
-
-
-
-
Field Detail
-
expr
protected SQLExpr expr
-
sampling
protected SQLTableSampling sampling
-
schemaObject
protected SchemaObject schemaObject
-
-
Method Detail
-
getExpr
public SQLExpr getExpr()
-
setExpr
public void setExpr(SQLExpr x)
-
setExpr
public void setExpr(String name)
-
getSampling
public SQLTableSampling getSampling()
-
setSampling
public void setSampling(SQLTableSampling x)
-
getName
public SQLName getName()
-
getTableName
public String getTableName(boolean normalize)
-
getTableName
public String getTableName()
-
getSchema
public String getSchema()
-
getCatalog
public String getCatalog()
-
setCatalog
public boolean setCatalog(String catalog)
-
setSchema
public void setSchema(String schema)
-
setSimpleName
public void setSimpleName(String name)
-
getPartitionSize
public int getPartitionSize()
-
addPartition
public void addPartition(SQLName partition)
-
accept0
protected void accept0(SQLASTVisitor visitor)
- Overrides:
accept0in classSQLTableSourceImpl
-
computeAlias
public String computeAlias()
- Specified by:
computeAliasin interfaceSQLTableSource- Overrides:
computeAliasin classSQLTableSourceImpl
-
clone
public SQLExprTableSource clone()
- Specified by:
clonein interfaceSQLObject- Specified by:
clonein interfaceSQLTableSource- Overrides:
clonein classSQLTableSourceImpl
-
cloneTo
public void cloneTo(SQLExprTableSource x)
-
getSchemaObject
public SchemaObject getSchemaObject()
-
setSchemaObject
public void setSchemaObject(SchemaObject schemaObject)
-
containsAlias
public boolean containsAlias(String alias)
- Specified by:
containsAliasin interfaceSQLTableSource- Overrides:
containsAliasin classSQLTableSourceImpl
-
containsAlias
public boolean containsAlias(long aliasHash)
-
findColumn
public SQLColumnDefinition findColumn(String columnName)
- Specified by:
findColumnin interfaceSQLTableSource- Overrides:
findColumnin classSQLTableSourceImpl
-
findColumn
public SQLColumnDefinition findColumn(long columnNameHash)
- Specified by:
findColumnin interfaceSQLTableSource- Overrides:
findColumnin classSQLTableSourceImpl
-
resolveColumn
public SQLObject resolveColumn(long columnNameHash)
- Specified by:
resolveColumnin interfaceSQLTableSource- Overrides:
resolveColumnin classSQLTableSourceImpl
-
findTableSourceWithColumn
public SQLTableSource findTableSourceWithColumn(String columnName)
- Specified by:
findTableSourceWithColumnin interfaceSQLTableSource- Overrides:
findTableSourceWithColumnin classSQLTableSourceImpl
-
findTableSourceWithColumn
public SQLTableSource findTableSourceWithColumn(long columnName_hash, String name, int option)
- Specified by:
findTableSourceWithColumnin interfaceSQLTableSource- Overrides:
findTableSourceWithColumnin classSQLTableSourceImpl
-
findTableSource
public SQLTableSource findTableSource(long alias_hash)
- Specified by:
findTableSourcein interfaceSQLTableSource- Overrides:
findTableSourcein classSQLTableSourceImpl
-
replace
public boolean replace(SQLExpr expr, SQLExpr target)
- Specified by:
replacein interfaceSQLReplaceable
-
aliasHashCode64
public long aliasHashCode64()
- Specified by:
aliasHashCode64in interfaceSQLTableSource- Overrides:
aliasHashCode64in classSQLTableSourceImpl
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classSQLTableSourceImpl
-
hashCode
public int hashCode()
- Overrides:
hashCodein classSQLTableSourceImpl
-
-