Skip to content
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

Refactor toJavaxSqlDataSource #87

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions custom-change-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ dependencies {
implementation(project(":dsl"))
// liquibase
implementation("org.liquibase:liquibase-core:$liquibaseVersion")
// reflection
api("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")

// test
testImplementation("io.kotest:kotest-framework-engine-jvm:$kotestVersion")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package momosetkn.liquibase.kotlin.change.custom.core

import momosetkn.sql.DatasourceProxy
import momosetkn.sql.NotCloseConnectionProxy

fun liquibase.database.Database.toJavaxSqlDataSource(): DatasourceProxy {
val liquibaseJdbcConnection = this.connection as liquibase.database.jvm.JdbcConnection
val javaSqlConnection = liquibaseJdbcConnection.underlyingConnection
return DatasourceProxy(NotCloseConnectionProxy(javaSqlConnection))
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import momosetkn.liquibase.kotlin.change.custom.core.CustomTaskChangeDefineImpl
import momosetkn.liquibase.kotlin.change.custom.core.ForwardOnlyTaskCustomChange
import momosetkn.liquibase.kotlin.change.custom.core.RollbackTaskCustomChange
import momosetkn.liquibase.kotlin.change.custom.core.addCustomChange
import momosetkn.liquibase.kotlin.change.custom.komapper.toJavaxSqlDataSource
import momosetkn.liquibase.kotlin.change.custom.core.toJavaxSqlDataSource
import momosetkn.liquibase.kotlin.dsl.ChangeSetDsl

fun ChangeSetDsl.customExposedMigrationChange(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import momosetkn.liquibase.kotlin.change.custom.core.CustomTaskChangeDefineImpl
import momosetkn.liquibase.kotlin.change.custom.core.ForwardOnlyTaskCustomChange
import momosetkn.liquibase.kotlin.change.custom.core.RollbackTaskCustomChange
import momosetkn.liquibase.kotlin.change.custom.core.addCustomChange
import momosetkn.liquibase.kotlin.change.custom.komapper.toJavaxSqlDataSource
import momosetkn.liquibase.kotlin.change.custom.core.toJavaxSqlDataSource
import momosetkn.liquibase.kotlin.dsl.ChangeSetDsl

fun ChangeSetDsl.customJooqChange(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import momosetkn.liquibase.kotlin.change.custom.core.CustomTaskChangeDefineImpl
import momosetkn.liquibase.kotlin.change.custom.core.ForwardOnlyTaskCustomChange
import momosetkn.liquibase.kotlin.change.custom.core.RollbackTaskCustomChange
import momosetkn.liquibase.kotlin.change.custom.core.addCustomChange
import momosetkn.liquibase.kotlin.change.custom.core.toJavaxSqlDataSource
import momosetkn.liquibase.kotlin.dsl.ChangeSetDsl

fun ChangeSetDsl.customKomapperJdbcChange(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import momosetkn.liquibase.kotlin.change.custom.core.CustomTaskChangeDefineImpl
import momosetkn.liquibase.kotlin.change.custom.core.ForwardOnlyTaskCustomChange
import momosetkn.liquibase.kotlin.change.custom.core.RollbackTaskCustomChange
import momosetkn.liquibase.kotlin.change.custom.core.addCustomChange
import momosetkn.liquibase.kotlin.change.custom.komapper.toJavaxSqlDataSource
import momosetkn.liquibase.kotlin.change.custom.core.toJavaxSqlDataSource
import momosetkn.liquibase.kotlin.dsl.ChangeSetDsl

fun ChangeSetDsl.customKtormChange(
Expand Down