fix for column name of table version in exposed standard versions repo proxy

This commit is contained in:
InsanusMokrassar 2022-04-07 00:43:55 +06:00
parent b85ab7b061
commit 223fed910f
2 changed files with 1 additions and 10 deletions

View File

@ -27,13 +27,6 @@ sealed interface Either<T1, T2> {
@Deprecated("Use optionalT2 instead", ReplaceWith("optionalT2"))
val t2: T2?
get() = optionalT2.dataOrNull()
companion object {
fun <T1, T2> serializer(
t1Serializer: KSerializer<T1>,
t2Serializer: KSerializer<T2>,
): KSerializer<Either<T1, T2>> = EitherSerializer(t1Serializer, t2Serializer)
}
}
class EitherSerializer<T1, T2>(
@ -51,7 +44,6 @@ class EitherSerializer<T1, T2>(
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<T1, T2> {
return decoder.decodeStructure(descriptor) {
var type: String? = null
@ -83,7 +75,6 @@ class EitherSerializer<T1, T2>(
}
@OptIn(ExperimentalSerializationApi::class, InternalSerializationApi::class)
override fun serialize(encoder: Encoder, value: Either<T1, T2>) {
encoder.encodeStructure(descriptor) {
when (value) {

View File

@ -19,7 +19,7 @@ class ExposedStandardVersionsRepoProxy(
override val database: Database
) : StandardVersionsRepoProxy<Database>, Table("ExposedVersionsProxy"), ExposedRepo {
val tableNameColumn = text("tableName")
val tableVersionColumn = integer("tableName")
val tableVersionColumn = integer("tableVersion")
init {
initTable()