Class SelectStatementContext

    • Constructor Detail

      • SelectStatementContext

        public SelectStatementContext​(ShardingSphereMetaData metaData,
                                      List<Object> params,
                                      org.apache.shardingsphere.sql.parser.sql.common.statement.dml.SelectStatement sqlStatement,
                                      String defaultDatabaseName)
    • Method Detail

      • isContainsJoinQuery

        public boolean isContainsJoinQuery()
        Judge whether contains join query or not.
        Returns:
        whether contains join query or not
      • isContainsSubquery

        public boolean isContainsSubquery()
        Judge whether contains subquery or not.
        Returns:
        whether contains subquery or not
      • isContainsHaving

        public boolean isContainsHaving()
        Judge whether contains having or not.
        Returns:
        whether contains having or not
      • isContainsCombine

        public boolean isContainsCombine()
        Judge whether contains combine or not.
        Returns:
        whether contains combine or not
      • isContainsDollarParameterMarker

        public boolean isContainsDollarParameterMarker()
        Judge whether contains dollar parameter marker or not.
        Returns:
        whether contains dollar parameter marker or not
      • isContainsPartialDistinctAggregation

        public boolean isContainsPartialDistinctAggregation()
        Judge whether contains partial distinct aggregation.
        Returns:
        whether contains partial distinct aggregation
      • setIndexes

        public void setIndexes​(Map<String,​Integer> columnLabelIndexMap)
        Set indexes.
        Parameters:
        columnLabelIndexMap - map for column label and index
      • isSameGroupByAndOrderByItems

        public boolean isSameGroupByAndOrderByItems()
        Judge group by and order by sequence is same or not.
        Returns:
        group by and order by sequence is same or not
      • findColumnProjection

        public Optional<ColumnProjection> findColumnProjection​(int columnIndex)
        Find column projection.
        Parameters:
        columnIndex - column index
        Returns:
        find column projection
      • getSqlStatement

        public org.apache.shardingsphere.sql.parser.sql.common.statement.dml.SelectStatement getSqlStatement()
        Description copied from interface: SQLStatementContext
        Get SQL statement.
        Specified by:
        getSqlStatement in interface SQLStatementContext
        Returns:
        SQL statement
      • getAllTables

        public Collection<org.apache.shardingsphere.sql.parser.sql.common.segment.generic.table.SimpleTableSegment> getAllTables()
        Description copied from interface: TableAvailable
        Get all table segments.
        Specified by:
        getAllTables in interface TableAvailable
        Returns:
        all table segments
      • getWhereSegments

        public Collection<org.apache.shardingsphere.sql.parser.sql.common.segment.dml.predicate.WhereSegment> getWhereSegments()
        Description copied from interface: WhereAvailable
        Get where segments.
        Specified by:
        getWhereSegments in interface WhereAvailable
        Returns:
        where segments
      • getColumnSegments

        public Collection<org.apache.shardingsphere.sql.parser.sql.common.segment.dml.column.ColumnSegment> getColumnSegments()
        Description copied from interface: WhereAvailable
        Get column segments.
        Specified by:
        getColumnSegments in interface WhereAvailable
        Returns:
        column segments