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

Support ClickHouse in BuiltInBindMarkersFactoryProvider #33947

Open
eddumelendez opened this issue Nov 22, 2024 · 0 comments
Open

Support ClickHouse in BuiltInBindMarkersFactoryProvider #33947

eddumelendez opened this issue Nov 22, 2024 · 0 comments
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: waiting-for-triage An issue we've not yet triaged or decided on

Comments

@eddumelendez
Copy link
Contributor

eddumelendez commented Nov 22, 2024

ClickHouse provides an r2dbc driver. Building a project with Testcontainers fails because of the following exception:

Caused by: org.springframework.r2dbc.core.binding.BindMarkersFactoryResolver$NoBindMarkersFactoryException: Cannot determine a BindMarkersFactory for ClickHouse using ConnectionPool[ClickHouse]

Add ClickHouse to the list

static {
BUILTIN.put("H2", BindMarkersFactory.indexed("$", 1));
BUILTIN.put("MariaDB", BindMarkersFactory.anonymous("?"));
BUILTIN.put("Microsoft SQL Server", BindMarkersFactory.named("@", "P", 32,
BuiltInBindMarkersFactoryProvider::filterBindMarker));
BUILTIN.put("MySQL", BindMarkersFactory.anonymous("?"));
BUILTIN.put("Oracle", BindMarkersFactory.named(":", "P", 32,
BuiltInBindMarkersFactoryProvider::filterBindMarker));
BUILTIN.put("PostgreSQL", BindMarkersFactory.indexed("$", 1));
}

My workaround was to created my own provider and register it in spring.factories but it fails because it also needs to support the ClickHouse dialect in spring-data-r2dbc.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 22, 2024
@sbrannen sbrannen added the in: data Issues in data modules (jdbc, orm, oxm, tx) label Nov 23, 2024
@sbrannen sbrannen changed the title Support ClickHouse in BuiltInBindMarkersFactoryProvider Support ClickHouse in BuiltInBindMarkersFactoryProvider Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) status: waiting-for-triage An issue we've not yet triaged or decided on
Projects
None yet
Development

No branches or pull requests

3 participants