Skip to content

Commit d3a56e6

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

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

+5-2
Original file line numberDiff line numberDiff line change
@@ -454,16 +454,19 @@ ifdef::feature-scroll[]
454454
endif::[]
455455

456456
[[repositories.limit-query-result]]
457-
== Limiting Query Results
457+
=== Limiting Query Results
458458

459-
You can limit the results of query methods by using the `first` or `top` keywords, which you can use interchangeably.
459+
In addition to paging it is possible to limit the result size using a dedicated `Limit` parameter.
460+
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.
460461
You can append an optional numeric value to `top` or `first` to specify the maximum result size to be returned.
461462
If the number is left out, a result size of 1 is assumed.
462463
The following example shows how to limit the query size:
463464

464465
.Limiting the result size of a query with `Top` and `First`
465466
[source,java]
466467
----
468+
List<User> findByLastname(Limit limit);
469+
467470
User findFirstByOrderByLastnameAsc();
468471
469472
User findTopByOrderByAgeDesc();

0 commit comments

Comments
 (0)