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
|
||||
|
||||
fun toPortedAddress(): String {
|
||||
return if (!config.address.contains(":") && config.port?.isBlank() != true) {
|
||||
"$config.address:$config.port"
|
||||
} else config.address
|
||||
var baseAddress = config.address
|
||||
if (!config.port.isNullOrBlank()) {
|
||||
baseAddress += ":${config.port}"
|
||||
}
|
||||
return baseAddress
|
||||
}
|
||||
|
||||
abstract fun toDatabase(): Database
|
||||
|
||||
Loading…
Reference in New Issue
Block a user