Class AbstractDbmsLimitHandler

    • Constructor Detail

      • AbstractDbmsLimitHandler

        public AbstractDbmsLimitHandler​(int length)
        Parameters:
        length - The expected maximum length of the string representation for the LIMIT/OFFSET SQL
    • Method Detail

      • supportsLimit

        public boolean supportsLimit()
        Specified by:
        supportsLimit in interface com.blazebit.persistence.spi.DbmsLimitHandler
      • supportsLimitOffset

        public boolean supportsLimitOffset()
        Specified by:
        supportsLimitOffset in interface com.blazebit.persistence.spi.DbmsLimitHandler
      • limitIncludesOffset

        public boolean limitIncludesOffset()
        Specified by:
        limitIncludesOffset in interface com.blazebit.persistence.spi.DbmsLimitHandler
      • supportsVariableLimit

        protected abstract boolean supportsVariableLimit()
        Returns whether the dbms supports parameters for LIMIT and OFFSET via prepared statements.
        Returns:
        True if parameters allowed, otherwise false
      • applySql

        public String applySql​(String sql,
                               boolean isSubquery,
                               Integer limit,
                               Integer offset)
        Specified by:
        applySql in interface com.blazebit.persistence.spi.DbmsLimitHandler
      • applySqlInlined

        public String applySqlInlined​(String sql,
                                      boolean isSubquery,
                                      Integer limit,
                                      Integer offset)
        Specified by:
        applySqlInlined in interface com.blazebit.persistence.spi.DbmsLimitHandler
      • bindLimitParametersAtStartOfQuery

        public int bindLimitParametersAtStartOfQuery​(Integer limit,
                                                     Integer offset,
                                                     PreparedStatement statement,
                                                     int index)
                                              throws SQLException
        Specified by:
        bindLimitParametersAtStartOfQuery in interface com.blazebit.persistence.spi.DbmsLimitHandler
        Throws:
        SQLException