Module spring.data.relational
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 enumEnumeration of where to render the clause within the SQL statement. -
Method Summary
Modifier and TypeMethodDescriptionReturns theLimitClause.Positionwhere to apply theclause.getLimit(long limit) Returns theLIMITclause to limit results.getLimitOffset(long limit, long offset) Returns a combinedLIMIT/OFFSETclause that limits results and starts consumption at the givenoffset.getOffset(long offset) Returns theOFFSETclause to consume rows at a given offset.
-
Method Details
-
getLimit
Returns theLIMITclause 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 theOFFSETclause 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/OFFSETclause 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.Positionwhere to apply theclause.
-