public final class TablesContext extends Object
| 构造器和说明 |
|---|
TablesContext(Collection<org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment> tableSegments) |
TablesContext(org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment tableSegment) |
| 限定符和类型 | 方法和说明 |
|---|---|
Map<String,String> |
findTableName(Collection<org.apache.shardingsphere.sql.parser.sql.common.segment.dml.column.ColumnSegment> columns,
ShardingSphereSchema schema)
Find table name.
|
Optional<String> |
findTableName(ColumnProjection column,
ShardingSphereSchema schema)
Find table name.
|
Optional<String> |
findTableNameFromSQL(String tableNameOrAlias)
Find table name from SQL.
|
Collection<org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment> |
getAllUniqueTables()
Get all unique table segments.
|
Optional<String> |
getSchemaName()
Get schema name.
|
Collection<String> |
getTableNames()
Get table names.
|
public TablesContext(org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment tableSegment)
public TablesContext(Collection<org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment> tableSegments)
public Collection<String> getTableNames()
public Collection<org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment> getAllUniqueTables()
public Map<String,String> findTableName(Collection<org.apache.shardingsphere.sql.parser.sql.common.segment.dml.column.ColumnSegment> columns, ShardingSphereSchema schema)
columns - column segment collectionschema - schema meta datapublic Optional<String> findTableName(ColumnProjection column, ShardingSphereSchema schema)
column - column projectionschema - schema meta datapublic Optional<String> findTableNameFromSQL(String tableNameOrAlias)
tableNameOrAlias - table name or aliasCopyright © 2021 The Apache Software Foundation. All rights reserved.