Compare commits

..

3 Commits

Author SHA1 Message Date
Auxilor
13772002e8 Updated to 6.25.1 2022-02-17 17:03:16 +00:00
Auxilor
c9b84889e7 Fixed recursive caching bug 2022-02-17 17:03:10 +00:00
Auxilor
1513578266 Fixed recursive caching bug 2022-02-17 17:01:42 +00:00
2 changed files with 8 additions and 4 deletions

View File

@@ -305,10 +305,14 @@ private class ImplementedMySQLHandler(
} }
private fun getOrCreateRow(uuid: UUID): ResultRow { private fun getOrCreateRow(uuid: UUID): ResultRow {
return rows.get(uuid) { fun select(uuid: UUID): ResultRow? {
val row = transaction { return transaction {
table.select { table.id eq uuid }.limit(1).singleOrNull() table.select { table.id eq uuid }.limit(1).singleOrNull()
} }
}
return rows.get(uuid) {
val row = select(uuid)
return@get if (row != null) { return@get if (row != null) {
row row
@@ -316,7 +320,7 @@ private class ImplementedMySQLHandler(
transaction { transaction {
table.insert { it[id] = uuid } table.insert { it[id] = uuid }
} }
getOrCreateRow(uuid) select(uuid)
} }
} }
} }

View File

@@ -1,3 +1,3 @@
version = 6.25.0 version = 6.25.1
plugin-name = eco plugin-name = eco
kotlin.code.style = official kotlin.code.style = official