Interface LimitClause
public interface LimitClause
A clause representing Dialect-specific
LIMIT
.- Since:
- 1.1
- Author:
- Mark Paluch, Jens Schauder
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enum
Enumeration of where to render the clause within the SQL statement. -
Method Summary
Modifier and TypeMethodDescriptionReturns theLimitClause.Position
where to apply theclause
.getLimit
(long limit) Returns theLIMIT
clause to limit results.getLimitOffset
(long limit, long offset) Returns a combinedLIMIT/OFFSET
clause that limits results and starts consumption at the givenoffset
.getOffset
(long offset) Returns theOFFSET
clause to consume rows at a given offset.
-
Method Details
-
getLimit
Returns theLIMIT
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
Returns theOFFSET
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
Returns a combinedLIMIT/OFFSET
clause that limits results and starts consumption at the givenoffset
.- 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 theLimitClause.Position
where to apply theclause
.
-