data class Connector(val url: String, val username: String, val pw: String) {
fun connect(): Database = Database.connect(url, "com.impossibl.postgres.jdbc.PGDriver", username, pw)
}
n
nanodeath
08/26/2020, 8:41 PM
I probably wouldn't put that method on there. it's not really related to the data class. if you really want that syntax though, an extension method would be a better fit.