forked from Cookies_Github_mirror/AquaDX
[+] Mut
This commit is contained in:
@@ -62,7 +62,7 @@ abstract class MeowApi(val serialize: (String, Any?) -> String) {
|
||||
}
|
||||
else pageCache[cacheKey] = millis() to list
|
||||
|
||||
(mapOf("userId" to uid, "length" to lst.size, "nextIndex" to iAfter, key to lst) + add).toMutableMap()
|
||||
(mapOf("userId" to uid, "length" to lst.size, "nextIndex" to iAfter, key to lst) + add).mut
|
||||
.also { p.post?.invoke(it) }
|
||||
}
|
||||
fun String.paged(key: String, fn: PagedHandler) = pagedWithKind(key) { PagedProcessor(null, fn) }
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package icu.samnyan.aqua.sega.general
|
||||
|
||||
import ext.ls
|
||||
import jakarta.persistence.AttributeConverter
|
||||
import jakarta.persistence.Converter
|
||||
|
||||
@Converter
|
||||
class IntegerListConverter : AttributeConverter<List<Int>, String> {
|
||||
override fun convertToDatabaseColumn(lst: List<Int>?) = lst?.joinToString(";") ?: ""
|
||||
override fun convertToEntityAttribute(str: String?) = if (str.isNullOrBlank()) mutableListOf() else
|
||||
str.split(';').map { it.toInt() }.toMutableList()
|
||||
override fun convertToEntityAttribute(str: String?) = if (str.isNullOrBlank()) ls() else
|
||||
str.split(';').map { it.toInt() }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user