Skip to content

Commit d470c98

Browse files
christophstroblmp911de
authored andcommitted
Add Limit parameter to section in reference documentation.
Closes #3006 Original pull request: #3007
1 parent 2415156 commit d470c98

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/antora/modules/ROOT/pages/repositories/query-methods-details.adoc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,16 +481,19 @@ ifdef::feature-scroll[]
481481
endif::[]
482482

483483
[[repositories.limit-query-result]]
484-
== Limiting Query Results
484+
=== Limiting Query Results
485485

486-
You can limit the results of query methods by using the `first` or `top` keywords, which you can use interchangeably.
486+
In addition to paging it is possible to limit the result size using a dedicated `Limit` parameter.
487+
You can also limit the results of query methods by using the `first` or `top` keywords, which you can use interchangeably but may not be mixed with a `Limit` parameter.
487488
You can append an optional numeric value to `top` or `first` to specify the maximum result size to be returned.
488489
If the number is left out, a result size of 1 is assumed.
489490
The following example shows how to limit the query size:
490491

491492
.Limiting the result size of a query with `Top` and `First`
492493
[source,java]
493494
----
495+
List<User> findByLastname(Limit limit);
496+
494497
User findFirstByOrderByLastnameAsc();
495498
496499
User findTopByOrderByAgeDesc();

0 commit comments

Comments
 (0)