testcontainers/testcontainers-java

Add getR2dbcUrl helper method to JdbcDatabaseContainer

開放

#8,797 建立於 2024年6月23日

 (13 則留言) (0 個反應) (0 位負責人)Java (1,588 個分叉)batch import
good first issuemodules/r2dbctype/enhancement

倉庫指標

星標
 (7,535 顆星)
PR 合併指標
 (平均合併 2天 17小時) (30 天內合併 2 個 PR)

描述

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

貢獻者指南