You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, your only option would be through DatabaseClient.builder().executeFunction(…) with an execute function like executeFunction(statement -> statement.fetchSize(100).execute()).
It makes sense to introduce a template function that accepts SQL for the database client and returns a GenericExecuteSpec. This hook would allow for specifying a filter function (to post-process the Statement before running it).
mp911de
changed the title
How to set fetch-size in Spring Data R2DBC?
Add Template method to R2dbcEntityTemplate to post-process GenericExecuteSpec for e.g. a filter function
Oct 27, 2023
mipo256
added a commit
to mipo256/spring-data-relational
that referenced
this issue
Sep 26, 2024
Use FilterFunction instead of nullable fetchSize to avoid unconditional capturing lambdas and improve defaulting.
Add since tag.
See #1652
Original pull request: #1898
Is there a way to set the fetch size for R2DBC repositories or R2dbcEntityTemplate?
With JDBC you can do it on JdbcTemplate, but the R2DBC spec only provides this on the statement level, and you can't get there.
From the R2dbcEntityTemplate you can get to the DatabaseClient, but not to the statement.
Is there a way to do this somehow?
The text was updated successfully, but these errors were encountered: