mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-18 06:40:07 +00:00
upfix update
This commit is contained in:
parent
2516d5e381
commit
7cccf7e56e
@ -20,6 +20,8 @@ private val internalSerialFormat = Json {
|
||||
ignoreUnknownKeys = true
|
||||
}
|
||||
|
||||
typealias KeyValuesAndroidRepo<Key, Value> = OneToManyAndroidRepo<Key, Value>
|
||||
|
||||
class OneToManyAndroidRepo<Key, Value>(
|
||||
private val tableName: String,
|
||||
private val keyAsString: Key.() -> String,
|
||||
@ -244,3 +246,10 @@ fun <Key, Value> OneToManyAndroidRepo(
|
||||
{ internalSerialFormat.decodeFromString(valueSerializer, this) },
|
||||
helper
|
||||
)
|
||||
|
||||
fun <Key, Value> KeyValuesAndroidRepo(
|
||||
tableName: String,
|
||||
keySerializer: KSerializer<Key>,
|
||||
valueSerializer: KSerializer<Value>,
|
||||
helper: SQLiteOpenHelper
|
||||
) = OneToManyAndroidRepo(tableName, keySerializer, valueSerializer, helper)
|
||||
|
Loading…
Reference in New Issue
Block a user