From 223fed910f6a2e27940aef405e2687eef37debad Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 7 Apr 2022 00:43:55 +0600 Subject: [PATCH] fix for column name of table version in exposed standard versions repo proxy --- .../kotlin/dev/inmo/micro_utils/common/Either.kt | 9 --------- .../exposed/versions/ExposedStandardVersionsRepoProxy.kt | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/Either.kt b/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/Either.kt index 2bf9c57ade4..595967582d1 100644 --- a/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/Either.kt +++ b/common/src/commonMain/kotlin/dev/inmo/micro_utils/common/Either.kt @@ -27,13 +27,6 @@ sealed interface Either { @Deprecated("Use optionalT2 instead", ReplaceWith("optionalT2")) val t2: T2? get() = optionalT2.dataOrNull() - - companion object { - fun serializer( - t1Serializer: KSerializer, - t2Serializer: KSerializer, - ): KSerializer> = EitherSerializer(t1Serializer, t2Serializer) - } } class EitherSerializer( @@ -51,7 +44,6 @@ class EitherSerializer( private val t1EitherSerializer = EitherFirst.serializer(t1Serializer, t2Serializer) private val t2EitherSerializer = EitherSecond.serializer(t1Serializer, t2Serializer) - @OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class) override fun deserialize(decoder: Decoder): Either { return decoder.decodeStructure(descriptor) { var type: String? = null @@ -83,7 +75,6 @@ class EitherSerializer( } - @OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class) override fun serialize(encoder: Encoder, value: Either) { encoder.encodeStructure(descriptor) { when (value) { diff --git a/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/versions/ExposedStandardVersionsRepoProxy.kt b/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/versions/ExposedStandardVersionsRepoProxy.kt index 0c5a6c1e39d..6d4836a49e2 100644 --- a/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/versions/ExposedStandardVersionsRepoProxy.kt +++ b/repos/exposed/src/jvmMain/kotlin/dev/inmo/micro_utils/repos/exposed/versions/ExposedStandardVersionsRepoProxy.kt @@ -19,7 +19,7 @@ class ExposedStandardVersionsRepoProxy( override val database: Database ) : StandardVersionsRepoProxy, Table("ExposedVersionsProxy"), ExposedRepo { val tableNameColumn = text("tableName") - val tableVersionColumn = integer("tableName") + val tableVersionColumn = integer("tableVersion") init { initTable()