-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Enable Single Query Loading for simple aggregates. #1572
Conversation
Single Query Loading loads as the name suggests complete aggregates using a single select. While the ultimate goal is to support this for all aggregates, this commit enables it only for simple aggregate and also only for some operations. A simple aggregate is an aggregate that only reference up to one other entity and does not have embedded entities. The supported operations are those available via `CrudRepository`: `findAll`, `findById`, and `findAllByIds`. Single Query Loading does NOT work with the supported in memory databases H2 and HSQLDB, since these do not properly support windowing functions, which are essential for Single Query Loading. To turn on Single Query Loading call `RelationalMappingContext.setSingleQueryLoadingEnabled(true)`. Closes #1446 See #1450 See #1445
Extract Single Query Loading branching to SingleQueryFallbackDataAccessStrategy. Inline AggregateReaderFactory into SingleQueryDataAccessStrategy. Move CachingSqlGenerator to AggregateReader as caching root. Introduce DataAccessStrategyFactory to encapsulate configuration.
Fix Javadoc tag ordering. Remove superfluous MappingContext parameters when Converter is available. Simplify code. Reformat code.
Applied a first round of polishing. I want to add another splitter implementation for the result set to read result segments into a map-of-maps structure for easier result processing. Essentially, moving the problem of the ResultSet advancing into an aggregated form to decouple advancing from mapping. That way, we have individual components that can be tested independently and we can have adapters for JDBC/R2DBC while the conversion part remains API-agnostic. |
Transform the tabular structure into a graph of RowDocument associated with nested documents and lists. So far, this only works for singular top-level properties and embeddables holding single values.
We now support nested entities and entities in Lists.
Remove debugging statements, simplify tests.
To "decouple advancing from mapping" is really a nice approach. Thanks, @mp911de . |
Move RowDocumentExtractor into its own class hierarchy and decouple it from AggregateResultSetExtractor. Generify RowDocumentExtractor to allow various types of results in preparation for R2DBC. Introduce Iterator of RowDocument to simplify iteration.
Add container license acceptance for updated container images.
Single Query Loading loads as the name suggests complete aggregates using a single select. While the ultimate goal is to support this for all aggregates, this commit enables it only for simple aggregate and also only for some operations. A simple aggregate is an aggregate that only reference up to one other entity and does not have embedded entities. The supported operations are those available via `CrudRepository`: `findAll`, `findById`, and `findAllByIds`. Single Query Loading does NOT work with the supported in memory databases H2 and HSQLDB, since these do not properly support windowing functions, which are essential for Single Query Loading. To turn on Single Query Loading call `RelationalMappingContext.setSingleQueryLoadingEnabled(true)`. Closes #1446 See #1450 See #1445 Original pull request: #1572
Extract Single Query Loading branching to SingleQueryFallbackDataAccessStrategy. Inline AggregateReaderFactory into SingleQueryDataAccessStrategy. Move CachingSqlGenerator to AggregateReader as caching root. Introduce DataAccessStrategyFactory to encapsulate configuration. Fix Javadoc tag ordering. Remove superfluous MappingContext parameters when Converter is available. Simplify code. Reformat code. Reorder Functions methods. Tweak Javadoc, move composite function into SingleQuerySqlGenerator. See #1446 See #1450 See #1445 Original pull request: #1572
That's merged and polished now. |
Single Query Loading loads as the name suggests complete aggregates using a single select.
While the ultimate goal is to support this for all aggregates, this commit enables it only for simple aggregate and also only for some operations.
A simple aggregate is an aggregate that only reference up to one other entity and does not have embedded entities.
The supported operations are those available via
CrudRepository
:findAll
,findById
, andfindAllByIds
.Single Query Loading does NOT work with the supported in memory databases H2 and HSQLDB, since these do not properly support windowing functions, which are essential for Single Query Loading.
To turn on Single Query Loading call
RelationalMappingContext.setSingleQueryLoadingEnabled(true)
.Closes #1446
See #1450
See #1445