Expose CursorsStrategy and Subrange as builder options

This makes it possible to customize these settings individually,
optionally, and via QuerydslBuilderCustomizer.

See gh-597
This commit is contained in:
rstoyanchev
2023-04-12 11:18:40 +01:00
parent 1f0c5239c0
commit a0d7cc1c8c
6 changed files with 236 additions and 73 deletions

View File

@@ -863,11 +863,8 @@ Then use it to create a `DataFetcher`:
QuerydslDataFetcher.builder(repository).many();
// For paginated queries
CursorStrategy<ScrollPosition> cursorStrategy = ... ;
ScrollSubrange defaultSubrange = ... ;
DataFetcher<Iterable<Account>> dataFetcher =
QuerydslDataFetcher.builder(repository).scrollable(cursorStrategy, defaultSubrange);
QuerydslDataFetcher.builder(repository).scrollable();
----
You can now register the above `DataFetcher` through a
@@ -1066,11 +1063,8 @@ Use `QueryByExampleDataFetcher` to turn the repository into a `DataFetcher`:
QueryByExampleDataFetcher.builder(repository).many();
// For paginated queries
CursorStrategy<ScrollPosition> cursorStrategy = ... ;
ScrollSubrange defaultSubrange = ... ;
DataFetcher<Iterable<Account>> dataFetcher =
QueryByExampleDataFetcher.builder(repository).scrollable(cursorStrategy, defaultSubrange);
QueryByExampleDataFetcher.builder(repository).scrollable();
----
You can now register the above `DataFetcher` through a