From 7cccf7e56e92345256289122421437a7ad37c6e4 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Sun, 13 Jun 2021 11:50:48 +0600 Subject: [PATCH] upfix update --- .../micro_utils/repos/onetomany/OneToManyAndroidRepo.kt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/repos/common/src/main/kotlin/dev/inmo/micro_utils/repos/onetomany/OneToManyAndroidRepo.kt b/repos/common/src/main/kotlin/dev/inmo/micro_utils/repos/onetomany/OneToManyAndroidRepo.kt index 233e08f9b05..d8c4c7d248a 100644 --- a/repos/common/src/main/kotlin/dev/inmo/micro_utils/repos/onetomany/OneToManyAndroidRepo.kt +++ b/repos/common/src/main/kotlin/dev/inmo/micro_utils/repos/onetomany/OneToManyAndroidRepo.kt @@ -20,6 +20,8 @@ private val internalSerialFormat = Json { ignoreUnknownKeys = true } +typealias KeyValuesAndroidRepo = OneToManyAndroidRepo + class OneToManyAndroidRepo( private val tableName: String, private val keyAsString: Key.() -> String, @@ -244,3 +246,10 @@ fun OneToManyAndroidRepo( { internalSerialFormat.decodeFromString(valueSerializer, this) }, helper ) + +fun KeyValuesAndroidRepo( + tableName: String, + keySerializer: KSerializer, + valueSerializer: KSerializer, + helper: SQLiteOpenHelper +) = OneToManyAndroidRepo(tableName, keySerializer, valueSerializer, helper)