Fixed base
This commit is contained in:
parent
ce4019a1e6
commit
764f95014a
@ -21,9 +21,11 @@ abstract class DataSource(val config: DatabaseConnectionConfig) {
|
|||||||
abstract fun toConnectionUrl(): String
|
abstract fun toConnectionUrl(): String
|
||||||
|
|
||||||
fun toPortedAddress(): String {
|
fun toPortedAddress(): String {
|
||||||
return if (!config.address.contains(":") && config.port?.isBlank() != true) {
|
var baseAddress = config.address
|
||||||
"$config.address:$config.port"
|
if (!config.port.isNullOrBlank()) {
|
||||||
} else config.address
|
baseAddress += ":${config.port}"
|
||||||
|
}
|
||||||
|
return baseAddress
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract fun toDatabase(): Database
|
abstract fun toDatabase(): Database
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user