testcontainers/testcontainers-java

Add getR2dbcUrl helper method to JdbcDatabaseContainer

Open

#8 797 ouverte le 23 juin 2024

Voir sur GitHub
 (13 commentaires) (0 réactions) (0 assignés)Java (1 588 forks)batch import
good first issuemodules/r2dbctype/enhancement

Métriques du dépôt

Stars
 (7 535 stars)
Métriques de merge PR
 (Merge moyen 2j 17h) (2 PRs mergées en 30 j)

Description

Module

Core

Problem

I might've been chosen the wrong module, sorry for that, haven't found one for all RDBMS containers.

There is a convenient method, getJdbcUrl in JdbcDatabaseContainer. The problem however, if I'm working with R2DBC the connection string schema is different. Currently, I have to create an R2DBC connection string myself, which is a bit tedious.

Solution

It would be great to have a similar method in JdbcDatabaseContainer, like getR2dbcUrl that would construct the R2DBC compliant connection string.

Benefit

This would make integration with R2DBC drivers more seamless and provide better developer experience.

Alternatives

The alternative, I think, is to create the connection string manually, which might be fine, not a big deal, until you have to do it over and over again, in which case it became really frustrating.

Would you like to help contributing this feature?

Yes

Guide contributeur