Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13772002e8 | ||
|
|
c9b84889e7 | ||
|
|
1513578266 |
@@ -305,10 +305,14 @@ private class ImplementedMySQLHandler(
|
||||
}
|
||||
|
||||
private fun getOrCreateRow(uuid: UUID): ResultRow {
|
||||
return rows.get(uuid) {
|
||||
val row = transaction {
|
||||
fun select(uuid: UUID): ResultRow? {
|
||||
return transaction {
|
||||
table.select { table.id eq uuid }.limit(1).singleOrNull()
|
||||
}
|
||||
}
|
||||
|
||||
return rows.get(uuid) {
|
||||
val row = select(uuid)
|
||||
|
||||
return@get if (row != null) {
|
||||
row
|
||||
@@ -316,7 +320,7 @@ private class ImplementedMySQLHandler(
|
||||
transaction {
|
||||
table.insert { it[id] = uuid }
|
||||
}
|
||||
getOrCreateRow(uuid)
|
||||
select(uuid)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version = 6.25.0
|
||||
version = 6.25.1
|
||||
plugin-name = eco
|
||||
kotlin.code.style = official
|
||||
Reference in New Issue
Block a user