Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: EXPOSED-709 Remove plain SQL execution from core DatabaseDialect #2381

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bog-walk
Copy link
Member

@bog-walk bog-walk commented Jan 29, 2025

Description

Summary of the change: vendors package no longer has any metadata retrieved via Transaction.exec(). PR #2380 is open in conjunction to this one, since the extraction required a bit more.

Detailed description:

  • Why:

In preparation for R2DBC, instances of JDBC transaction-specific execution need to be removed from exposed-core and this focuses on the metadata retrieval queries in vendors, namely:
- H2 mode retrieval
- Query for all sequences in db

  • How:
    • Add new ExposedDatabaseMetadatat.databaseDialectMode property that can be called by H2Dialect.h2Mode and extract its logic to exposed-jdbc.
    • Add isDotPrefixedAndUnquoted() for identifier manager to be used when processing sequence results. Both this method and the 1 above are introduced as they will both need to be used by the new R2DBC module.
    • Move database-specific queries for sequences from overrides & place in jdbc sequences().

Type of Change

Please mark the relevant options with an "X":

  • Other: refactor

Affected databases:

  • Oracle
  • SqlServer
  • H2

Checklist

  • The build is green (including the Detekt check)
  • All public methods affected by my PR has up to date API docs

Related Issues

EXPOSED-709
R2DBC parent - EXPOSED-517

…alect

In preparation fro R2DBC, the following instances of JDBC transaction-specific execution
 have been removed from the core module:
- Retrieving H2 mode
- Retrieving all sequences in the database
@bog-walk bog-walk requested review from e5l and obabichevjb January 29, 2025 04:44
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.

1 participant