testcontainers/testcontainers-java

Add getR2dbcUrl helper method to JdbcDatabaseContainer

Open

#8,797 创建于 2024年6月23日

在 GitHub 查看
 (13 评论) (0 反应) (0 负责人)Java (7,535 star) (1,588 fork)batch import
good first issuemodules/r2dbctype/enhancement

描述

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

贡献者指南