spring-projects / spring-projects/spring-data-relational

Improve SelectBuilder to require less casting

Open
#957 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
827
Forks
394
PR merge metrics
No merged PRs in 30d

Description

Using the SelectBuilder often requires casting because type information is lost in the API.

One example: https://github.com/spring-projects/spring-data-jdbc/blob/79923b66dc67f49a294a68eeab82a76b5dfaddc1/spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcCountQueryCreator.java#L53

We should try to improve the API to require less casting.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SelectBuilder API and the cited usage in spring-data-jdbc/src/main/java/org/springframework/data/jdbc/repository/query/JdbcCountQueryCreator.java at line 53. Determine a concrete scope for preserving type information and reducing casts; done means the cited usage requires less casting without an agreed API design gap remaining.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.