Interface LimitClause


public interface LimitClause
A clause representing Dialect-specific LIMIT.
Since:
1.1
Author:
Mark Paluch, Jens Schauder
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static enum 
    Enumeration of where to render the clause within the SQL statement.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the LimitClause.Position where to apply the clause.
    getLimit(long limit)
    Returns the LIMIT clause to limit results.
    getLimitOffset(long limit, long offset)
    Returns a combined LIMIT/OFFSET clause that limits results and starts consumption at the given offset.
    getOffset(long offset)
    Returns the OFFSET clause to consume rows at a given offset.
  • Method Details

    • getLimit

      String getLimit(long limit)
      Returns the LIMIT clause to limit results.
      Parameters:
      limit - the maximum number of lines returned when the resulting SQL snippet is used.
      Returns:
      rendered limit clause.
      See Also:
    • getOffset

      String getOffset(long offset)
      Returns the OFFSET clause to consume rows at a given offset.
      Parameters:
      offset - the numbers of rows that get skipped when the resulting SQL snippet is used.
      Returns:
      rendered offset clause.
      See Also:
    • getLimitOffset

      String getLimitOffset(long limit, long offset)
      Returns a combined LIMIT/OFFSET clause that limits results and starts consumption at the given offset.
      Parameters:
      limit - the maximum number of lines returned when the resulting SQL snippet is used.
      offset - the numbers of rows that get skipped when the resulting SQL snippet is used.
      Returns:
      rendered limit clause.
      See Also:
    • getClausePosition

      LimitClause.Position getClausePosition()
      Returns the LimitClause.Position where to apply the clause.