Class GridSqlQuery

    • Constructor Detail

      • GridSqlQuery

        public GridSqlQuery()
    • Method Detail

      • offset

        public GridSqlAst offset()
        Returns:
        Offset.
      • offset

        public void offset​(GridSqlAst offset)
        Parameters:
        offset - Offset.
      • clearSort

        public void clearSort()
      • addSort

        public void addSort​(GridSqlSortColumn sortCol)
        Parameters:
        sortCol - The sort column.
      • visibleColumns

        protected abstract int visibleColumns()
        Returns:
        Number of visible columns.
      • column

        protected abstract GridSqlAst column​(int col)
        Parameters:
        col - Column index.
        Returns:
        Expression for column index.
      • resultType

        public GridSqlType resultType()
        Specified by:
        resultType in interface GridSqlAst
        Returns:
        Optional expression result type (if this is an expression and result type is known).
      • child

        public <E extends GridSqlAst> E child()
        Get the first child.
        Specified by:
        child in interface GridSqlAst
        Returns:
        Child element.
      • child

        public <E extends GridSqlAst> E child​(int childIdx)
        Get child by index.
        Specified by:
        child in interface GridSqlAst
        Parameters:
        childIdx - Index of the requested child.
        Returns:
        Child element.
      • maskNull

        protected static <E extends GridSqlAst> E maskNull​(GridSqlAst x,
                                                           GridSqlAst dflt)
        Parameters:
        x - Element.
        Returns:
        Empty placeholder if the element is null.
      • child

        public <E extends GridSqlAst> void child​(int childIdx,
                                                 E child)
        Set child.
        Specified by:
        child in interface GridSqlAst
        Parameters:
        childIdx - Index of the requested child.
        child - Child element.
      • skipMergeTable

        public abstract boolean skipMergeTable()
        Returns:
        If this is a simple query with no conditions, expressions, sorting, etc...
      • getSortLimitSQL

        protected void getSortLimitSQL​(org.h2.util.StatementBuilder buff)
        Parameters:
        buff - Statement builder.
      • hasOffsetLimit

        public boolean hasOffsetLimit()
        Whether offset or limit exists.
        Returns:
        true If we have OFFSET LIMIT.