-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
destination-mysql: convert prod code to kotlin
- Loading branch information
1 parent
ee1c21c
commit 8ba9753
Showing
20 changed files
with
584 additions
and
589 deletions.
There are no files selected for viewing
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
43 changes: 0 additions & 43 deletions
43
...rc/main/java/io/airbyte/integrations/destination/mysql/MySQLDestinationStrictEncrypt.java
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
...rc/main/kotlin/io/airbyte/integrations/destination/mysql/MySQLDestinationStrictEncrypt.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,39 @@ | ||
/* | ||
* Copyright (c) 2023 Airbyte, Inc., all rights reserved. | ||
*/ | ||
package io.airbyte.integrations.destination.mysql | ||
|
||
import com.fasterxml.jackson.databind.node.ObjectNode | ||
import io.airbyte.cdk.db.jdbc.JdbcUtils | ||
import io.airbyte.cdk.integrations.base.Destination | ||
import io.airbyte.cdk.integrations.base.IntegrationRunner | ||
import io.airbyte.cdk.integrations.base.spec_modification.SpecModifyingDestination | ||
import io.airbyte.commons.json.Jsons | ||
import io.airbyte.protocol.models.v0.ConnectorSpecification | ||
import org.slf4j.Logger | ||
import org.slf4j.LoggerFactory | ||
|
||
class MySQLDestinationStrictEncrypt : SpecModifyingDestination(MySQLDestination.sshWrappedDestination()), Destination { | ||
override fun modifySpec(originalSpec: ConnectorSpecification): ConnectorSpecification { | ||
val spec: ConnectorSpecification = Jsons.clone(originalSpec) | ||
(spec.connectionSpecification["properties"] as ObjectNode).remove(JdbcUtils.SSL_KEY) | ||
return spec | ||
} | ||
|
||
companion object { | ||
private val LOGGER: Logger = LoggerFactory.getLogger(MySQLDestinationStrictEncrypt::class.java) | ||
|
||
@Throws(Exception::class) | ||
@JvmStatic | ||
fun main(args: Array<String>) { | ||
val destination: Destination = MySQLDestinationStrictEncrypt() | ||
LOGGER.info("starting destination: {}", MySQLDestinationStrictEncrypt::class.java) | ||
try { | ||
IntegrationRunner(destination).run(args) | ||
} catch (e: Exception) { | ||
MySQLDestination.handleException(e) | ||
} | ||
LOGGER.info("completed destination: {}", MySQLDestinationStrictEncrypt::class.java) | ||
} | ||
} | ||
} |
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
211 changes: 0 additions & 211 deletions
211
...ation-mysql/src/main/java/io/airbyte/integrations/destination/mysql/MySQLDestination.java
This file was deleted.
Oops, something went wrong.
64 changes: 0 additions & 64 deletions
64
...n-mysql/src/main/java/io/airbyte/integrations/destination/mysql/MySQLNameTransformer.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.