diff --git a/mysql/build.gradle.kts b/mysql/build.gradle.kts index 0321367..a872117 100644 --- a/mysql/build.gradle.kts +++ b/mysql/build.gradle.kts @@ -8,8 +8,8 @@ dependencies { with(commonDependencies.vertx) { implementation(platformStackDepchain()) } // needed implementation(cpnProject(project, ":core")) - runtimeOnly(commonDependencies.postgreSql()) - implementation(commonDependencies.vertx.moduleWithoutVersion("pg-client")) + runtimeOnly(commonDependencies.postgreSql()) // TODO change to the MySQL JDBC dependency + implementation(commonDependencies.vertx.moduleWithoutVersion("mysql-client")) implementation(commonDependencies.kotlinCommon.core()) // for `Untested` - implementation(commonDependencies.kotlinCommon.vertx()) // for `PgPoolOptions.setUpConventionally` + implementation(commonDependencies.kotlinCommon.vertx()) // for `PgPoolOptions.setUpConventionally` // TODO check if this is necessary for MySQL, and remove if not } diff --git a/mysql/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/postgresql/exposed/ExposedDatabases.kt b/mysql/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/postgresql/exposed/ExposedDatabases.kt index c17199d..623f632 100644 --- a/mysql/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/postgresql/exposed/ExposedDatabases.kt +++ b/mysql/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/postgresql/exposed/ExposedDatabases.kt @@ -13,21 +13,21 @@ import java.sql.Connection * @see exposedDatabaseConnect */ @ExperimentalEvscApi -fun ConnectionConfig.Socket.exposedDatabaseConnectPostgresql( +fun ConnectionConfig.Socket.exposedDatabaseConnectMysql( setupConnection: (Connection) -> Unit = {}, databaseConfig: DatabaseConfig? = null, manager: (Database) -> TransactionManager = { ThreadLocalTransactionManager(it) } ) = exposedDatabaseConnect( - "postgresql", "org.postgresql.Driver", setupConnection, databaseConfig, manager + "mysql", "com.mysql.cj.jdbc.Driver", setupConnection, databaseConfig, manager ) @ExperimentalEvscApi @JvmName("exposedDatabaseConnectPostgresqlWithParameterConnectionConfig") -fun exposedDatabaseConnectPostgresql( +fun exposedDatabaseConnectMysql( socketConnectionConfig: ConnectionConfig.Socket, setupConnection: (Connection) -> Unit = {}, databaseConfig: DatabaseConfig? = null, manager: (Database) -> TransactionManager = { ThreadLocalTransactionManager(it) } ) = - socketConnectionConfig.exposedDatabaseConnectPostgresql(setupConnection, databaseConfig, manager) + socketConnectionConfig.exposedDatabaseConnectMysql(setupConnection, databaseConfig, manager)