Skip to content

Commit

Permalink
fixed driver
Browse files Browse the repository at this point in the history
  • Loading branch information
hohonuuli committed Oct 14, 2024
1 parent 5904ede commit f040342
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ object JDBC {

class JDBC(user: String, password: String, url: String, driver: String) {

Class.forName(driver)

def this(config: DatabaseConfig) = this(config.user, config.password, config.url, config.driver)

def newConnection(): Connection = {
Class.forName(driver)
java.sql.DriverManager.getConnection(url, user, password)
}

Expand Down

0 comments on commit f040342

Please sign in to comment.