-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support MySQL #18
base: main
Are you sure you want to change the base?
Support MySQL #18
Conversation
…gresql" directory
…dDatabaseConnectPostgresql` to `exposedDatabaseConnectMysql`
I merged |
Please merge from |
…r discussion required
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use "Mysql" in our own code.
mysql/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/mysql/exposed/ExposedDatabases.kt
Outdated
Show resolved
Hide resolved
mysql/src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/mysql/exposed/ExposedDatabases.kt
Show resolved
Hide resolved
.../src/main/kotlin/com/huanshankeji/exposedvertxsqlclient/mysql/local/LocalConnectionConfig.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Yongshun Shreck Ye <[email protected]>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some code is not completely adapted. Try searching the words "pg" and "postgre" in the "mysql" directory to make sure no PostgreSQL code is not adapted.
import io.vertx.sqlclient.Pool | ||
import io.vertx.sqlclient.SqlConnection | ||
|
||
suspend fun <T> DatabaseClient<Pool>.withSQLTransaction(function: suspend (DatabaseClient<SqlConnection>) -> T): T = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one should be withMysqlTransaction
and the connection type should be MySQLConnection
.
) | ||
|
||
@ExperimentalEvscApi | ||
@JvmName("exposedDatabaseConnectMySQLWithParameterConnectionConfig") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JvmName("exposedDatabaseConnectMySQLWithParameterConnectionConfig") | |
@JvmName("exposedDatabaseConnectMysqlWithParameterConnectionConfig") |
*/ | ||
// made not inline anymore for easier debugging | ||
@ExperimentalEvscApi | ||
fun <SqlClientT : SqlClient, ClientBuilderT : ClientBuilder<SqlClientT>> createGenericPgClientWithBuilder( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Mysql" not "Pg".
MySQLPoolOptions(PoolOptions()) // remain to verify | ||
) | ||
|
||
fun createPgClient( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Mysql" not "Pg".
/** | ||
* @see createGenericSqlClient | ||
*/ | ||
fun createPgPool( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Mysql" not "Pg".
* @see createGenericSqlClient | ||
*/ | ||
@Untested | ||
suspend fun createPgConnection( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Mysql" not "Pg".
This PR is basically complete. We should just wait for #23 to be resolved to merge this. |
resolve #17