-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update MySQLClients.kt but some problems may be raised, thus a furthe…
…r discussion required
- Loading branch information
1 parent
d4ddc19
commit bf1b0d3
Showing
15 changed files
with
86 additions
and
77 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...enchmarks/kotlin/com/huanshankeji/exposed/benchmark/WithContainerizedDatabaseBenchmark.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
public final class com/huanshankeji/exposedvertxsqlclient/mysql/DatabaseClientKt { | ||
public static final fun withSQLTransaction (Lcom/huanshankeji/exposedvertxsqlclient/DatabaseClient;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
} | ||
|
||
public final class com/huanshankeji/exposedvertxsqlclient/mysql/exposed/ExposedDatabasesKt { | ||
public static final fun exposedDatabaseConnectMySQL (Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig$Socket;Lkotlin/jvm/functions/Function1;Lorg/jetbrains/exposed/sql/DatabaseConfig;Lkotlin/jvm/functions/Function1;)Lorg/jetbrains/exposed/sql/Database; | ||
public static synthetic fun exposedDatabaseConnectMySQL$default (Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig$Socket;Lkotlin/jvm/functions/Function1;Lorg/jetbrains/exposed/sql/DatabaseConfig;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/jetbrains/exposed/sql/Database; | ||
public static final fun exposedDatabaseConnectMySQLWithParameterConnectionConfig (Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig$Socket;Lkotlin/jvm/functions/Function1;Lorg/jetbrains/exposed/sql/DatabaseConfig;Lkotlin/jvm/functions/Function1;)Lorg/jetbrains/exposed/sql/Database; | ||
public static synthetic fun exposedDatabaseConnectMySQLWithParameterConnectionConfig$default (Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig$Socket;Lkotlin/jvm/functions/Function1;Lorg/jetbrains/exposed/sql/DatabaseConfig;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lorg/jetbrains/exposed/sql/Database; | ||
} | ||
|
||
public final class com/huanshankeji/exposedvertxsqlclient/mysql/local/LocalConnectionConfigKt { | ||
public static final field DEFAULT_MYSQL_UNIX_DOMAIN_SOCKET_PATH Ljava/lang/String; | ||
public static final fun defaultMySQLLocalConnectionConfig (Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/huanshankeji/exposedvertxsqlclient/local/LocalConnectionConfig; | ||
public static synthetic fun defaultMySQLLocalConnectionConfig$default (Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/huanshankeji/exposedvertxsqlclient/local/LocalConnectionConfig; | ||
} | ||
|
||
public final class com/huanshankeji/exposedvertxsqlclient/mysql/vertx/mysqlclient/MySQLClientsKt { | ||
public static final fun createGenericPgClientWithBuilder (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig;Lio/vertx/sqlclient/ClientBuilder;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Lio/vertx/sqlclient/SqlClient; | ||
public static final fun createPgClient (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Lio/vertx/sqlclient/SqlClient; | ||
public static synthetic fun createPgClient$default (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lio/vertx/sqlclient/SqlClient; | ||
public static final fun createPgConnection (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; | ||
public static synthetic fun createPgConnection$default (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;Lkotlin/coroutines/Continuation;ILjava/lang/Object;)Ljava/lang/Object; | ||
public static final fun createPgPool (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Lio/vertx/sqlclient/Pool; | ||
public static synthetic fun createPgPool$default (Lio/vertx/core/Vertx;Lcom/huanshankeji/exposedvertxsqlclient/ConnectionConfig;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;ILjava/lang/Object;)Lio/vertx/sqlclient/Pool; | ||
public static final fun setUpConventionally (Lio/vertx/mysqlclient/impl/MySQLPoolOptions;)V | ||
} | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
mysql/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/mysql/DatabaseClient.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package com.huanshankeji.exposedvertxsqlclient.mysql | ||
|
||
import com.huanshankeji.exposedvertxsqlclient.DatabaseClient | ||
import com.huanshankeji.exposedvertxsqlclient.withTypedTransaction | ||
import io.vertx.sqlclient.Pool | ||
import io.vertx.sqlclient.SqlConnection | ||
|
||
suspend fun <T> DatabaseClient<Pool>.withSQLTransaction(function: suspend (DatabaseClient<SqlConnection>) -> T): T = | ||
withTypedTransaction(function) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...postgresql/local/LocalConnectionConfig.kt → ...ient/mysql/local/LocalConnectionConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
package com.huanshankeji.exposedvertxsqlclient.postgresql.local | ||
package com.huanshankeji.exposedvertxsqlclient.mysql.local | ||
|
||
import com.huanshankeji.exposedvertxsqlclient.ExperimentalEvscApi | ||
import com.huanshankeji.exposedvertxsqlclient.local.LocalConnectionConfig | ||
|
||
// TODO consider moving to "kotlin-common" | ||
|
||
const val DEFAULT_POSTGRESQL_UNIX_DOMAIN_SOCKET_PATH = "/var/run/postgresql" | ||
const val DEFAULT_MYSQL_UNIX_DOMAIN_SOCKET_PATH = "/var/run/mysql" | ||
|
||
@ExperimentalEvscApi | ||
fun defaultPostgresqlLocalConnectionConfig( | ||
fun defaultMySQLLocalConnectionConfig( | ||
socketConnectionPort: Int? = null, user: String, socketConnectionPassword: String, database: String | ||
) = | ||
LocalConnectionConfig( | ||
socketConnectionPort, DEFAULT_POSTGRESQL_UNIX_DOMAIN_SOCKET_PATH, user, socketConnectionPassword, database | ||
socketConnectionPort, DEFAULT_MYSQL_UNIX_DOMAIN_SOCKET_PATH, user, socketConnectionPassword, database | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 0 additions & 9 deletions
9
mysql/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/postgresql/DatabaseClient.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.