Class TablesContext


  • public final class TablesContext
    extends Object
    Tables context.
    • Constructor Detail

      • TablesContext

        public TablesContext​(org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment tableSegment,
                             DatabaseType databaseType)
      • TablesContext

        public TablesContext​(Collection<org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment> tableSegments,
                             DatabaseType databaseType)
    • Method Detail

      • getTableNames

        public Collection<String> getTableNames()
        Get table names.
        Returns:
        table names
      • findTableNamesByColumnSegment

        public Map<String,​String> findTableNamesByColumnSegment​(Collection<org.apache.shardingsphere.sql.parser.sql.common.segment.dml.column.ColumnSegment> columns,
                                                                      ShardingSphereSchema schema)
        Find expression table name map by column segment.
        Parameters:
        columns - column segment collection
        schema - schema meta data
        Returns:
        expression table name map
      • findTableNamesByColumnProjection

        public Map<String,​String> findTableNamesByColumnProjection​(Collection<ColumnProjection> columns,
                                                                         ShardingSphereSchema schema)
        Find expression table name map by column projection.
        Parameters:
        columns - column segment collection
        schema - schema meta data
        Returns:
        expression table name map
      • getDatabaseName

        public Optional<String> getDatabaseName()
        Get database name.
        Returns:
        database name
      • getSchemaName

        public Optional<String> getSchemaName()
        Get schema name.
        Returns:
        schema name