mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-11-17 13:53:49 +00:00
refactor
This commit is contained in:
parent
1d01b65b5f
commit
fa061f88e2
@ -3,9 +3,7 @@ package dev.inmo.micro_utils.repos.exposed.keyvalue
|
|||||||
import dev.inmo.micro_utils.pagination.*
|
import dev.inmo.micro_utils.pagination.*
|
||||||
import dev.inmo.micro_utils.repos.ReadKeyValueRepo
|
import dev.inmo.micro_utils.repos.ReadKeyValueRepo
|
||||||
import dev.inmo.micro_utils.repos.exposed.*
|
import dev.inmo.micro_utils.repos.exposed.*
|
||||||
import dev.inmo.micro_utils.repos.exposed.utils.selectPaginated
|
|
||||||
import org.jetbrains.exposed.sql.*
|
import org.jetbrains.exposed.sql.*
|
||||||
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
|
|
||||||
import org.jetbrains.exposed.sql.transactions.transaction
|
import org.jetbrains.exposed.sql.transactions.transaction
|
||||||
|
|
||||||
open class ExposedReadKeyValueRepo<Key, Value>(
|
open class ExposedReadKeyValueRepo<Key, Value>(
|
||||||
|
@ -15,13 +15,13 @@ abstract class AbstractExposedKeyValuesRepo<Key, Value>(
|
|||||||
) {
|
) {
|
||||||
protected val _onNewValue: MutableSharedFlow<Pair<Key, Value>> = MutableSharedFlow()
|
protected val _onNewValue: MutableSharedFlow<Pair<Key, Value>> = MutableSharedFlow()
|
||||||
override val onNewValue: Flow<Pair<Key, Value>>
|
override val onNewValue: Flow<Pair<Key, Value>>
|
||||||
get() = _onNewValue
|
get() = _onNewValue.asSharedFlow()
|
||||||
protected val _onValueRemoved: MutableSharedFlow<Pair<Key, Value>> = MutableSharedFlow()
|
protected val _onValueRemoved: MutableSharedFlow<Pair<Key, Value>> = MutableSharedFlow()
|
||||||
override val onValueRemoved: Flow<Pair<Key, Value>>
|
override val onValueRemoved: Flow<Pair<Key, Value>>
|
||||||
get() = _onValueRemoved
|
get() = _onValueRemoved.asSharedFlow()
|
||||||
protected val _onDataCleared: MutableSharedFlow<Key> = MutableSharedFlow()
|
protected val _onDataCleared: MutableSharedFlow<Key> = MutableSharedFlow()
|
||||||
override val onDataCleared: Flow<Key>
|
override val onDataCleared: Flow<Key>
|
||||||
get() = _onDataCleared
|
get() = _onDataCleared.asSharedFlow()
|
||||||
|
|
||||||
protected abstract fun insert(k: Key, v: Value, it: InsertStatement<Number>)
|
protected abstract fun insert(k: Key, v: Value, it: InsertStatement<Number>)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user