Skip to content

Introduce the JdbcCriteriaExecutor interface for Criteria queries #2111

@mipo256

Description

@mipo256

In Spring Data JPA we have the JpaSpecificationExecutor, which allows to enhance the functionality of concrete repositories by adding findAll() with Specification methods and its siblings.

Currently, if the user wants to utilize the CriteriaDefintion API, he/she needs to use the JdbcAggregateTemplate. It is great, but I think, it might be a good idea to introduce the JdbcCriteriaExecutor or something like that in order to allow the users to benefit from CriteriaDefinition and its API by working solely on the repository level.

The CriteriaDefinition, although, not being as powerful as Specification API in the Spring Data JPA, is nevertheless the approach to build the queries with the dynamic WHERE conditions. So I think by adding the JdbcCriteriaExecutor we will align the approach in Spring Data JDBC with Spring Data JPA and make the usage of CriteriaDefinition more intuitive for end users.

WDYT @mp911de @schauder ? I can assist here with an implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions