Skip to content

chore!: Remove unused R2dbcPreparedStatementApi methods - #2683

Merged
Chantal Loncle (bog-walk) merged 1 commit into
mainfrom
bog-walk/drop-unused-r2dbc-api-methods
Dec 12, 2025
Merged

chore!: Remove unused R2dbcPreparedStatementApi methods#2683
Chantal Loncle (bog-walk) merged 1 commit into
mainfrom
bog-walk/drop-unused-r2dbc-api-methods

Conversation

@bog-walk

@bog-walk Chantal Loncle (bog-walk) commented Dec 7, 2025

Copy link
Copy Markdown
Member

Description

Summary of the change:

  • Remove .closeIfPossible() & .cancel() from R2dbcPreparedStatementApi interface
  • Rename R2dbcTransaction.closeExecutedStatements() to .clearExecutedStatements() & drop suspend

Detailed description:

  • Why:
    • closeIfPossible() and cancel() implementation in R2DBC is empty, because there are no io.r2dbc.spi.Statement api for cancelling/closing. Unlike JDBC, for which this exists, the concept of closing/cancelling is entirely dependent on its execution and the consumption of the results.
    • closeExecutedStatements() called closeIfPossible(), so the rename is more honest about the actual behavior
    • This cleans up code overall, but PRIMARILY, it was done for Spring R2DBC compatibility (PR feat: EXPOSED-818 Add Spring reactive transaction manager module #2685 ). The fewer unnecessary suspend functions that have to be bridged to non-suspending reactor Mono, the better the implementation.

Type of Change

Please mark the relevant options with an "X":

  • Bug fix

Updates/remove existing public API methods:

  • Is breaking change

Affected databases:

  • All

Checklist

  • Unit tests are in place
  • The build is green (including the Detekt check)
  • All public methods affected by my PR has up to date API docs
  • Documentation for my change is up to date

- Remove closeIfPossible() & cancel(), as they do nothing and have no relevant
Statement methods available.
- Rename closeExecutedStatements() to clearExecutedStatements() & no longer
needs to suspend
@bog-walk
Chantal Loncle (bog-walk) merged commit f927c3c into main Dec 12, 2025
6 checks passed
@bog-walk
Chantal Loncle (bog-walk) deleted the bog-walk/drop-unused-r2dbc-api-methods branch December 12, 2025 01:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants