summaryrefslogtreecommitdiff
path: root/opendc-common/src/main/kotlin/org/opendc/common/utils/PostgresqlDB.kt
diff options
context:
space:
mode:
authormjkwiatkowski <mati.rewa@gmail.com>2026-02-21 18:01:20 +0100
committermjkwiatkowski <mati.rewa@gmail.com>2026-02-21 18:01:20 +0100
commitdaad473975cc3e6eba0536d5a8fe750cf8b2fa7d (patch)
treef4496fcef64999005d55b5276a7a621496a8f1ad /opendc-common/src/main/kotlin/org/opendc/common/utils/PostgresqlDB.kt
parentf5da60e4275ca1172128c3994298691e12d5e1f8 (diff)
feat: removed the Config classHEADmaster
Diffstat (limited to 'opendc-common/src/main/kotlin/org/opendc/common/utils/PostgresqlDB.kt')
-rw-r--r--opendc-common/src/main/kotlin/org/opendc/common/utils/PostgresqlDB.kt7
1 files changed, 4 insertions, 3 deletions
diff --git a/opendc-common/src/main/kotlin/org/opendc/common/utils/PostgresqlDB.kt b/opendc-common/src/main/kotlin/org/opendc/common/utils/PostgresqlDB.kt
index 361925ee..03fd902c 100644
--- a/opendc-common/src/main/kotlin/org/opendc/common/utils/PostgresqlDB.kt
+++ b/opendc-common/src/main/kotlin/org/opendc/common/utils/PostgresqlDB.kt
@@ -24,7 +24,7 @@ public class PostgresqlDB {
properties = TomlMapper().readerFor(Properties().javaClass)
.readValue(PostgresqlDB::class.java.getResource("/database.toml"))
connection = DriverManager.getConnection(
- properties.getProperty("address").asJdbc(properties.getProperty("table")),
+ properties.getProperty("address").asJdbc(properties.getProperty("database")),
properties.getProperty("user"),
properties.getProperty("password"))
clear()
@@ -45,8 +45,9 @@ public class PostgresqlDB {
}
}
- private fun String.asJdbc(table : String) : String {
- return "jdbc:postgresql://$this/$table"
+ private fun String.asJdbc(database : String) : String {
+ return "jdbc:postgresql://$this/$database"
+
}
} \ No newline at end of file