Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13772002e8 | ||
|
|
c9b84889e7 | ||
|
|
1513578266 |
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
Reference in New Issue
Block a user