@@ -19,9 +19,12 @@ import org.jetbrains.exposed.dao.IntEntity
1919import org.jetbrains.exposed.dao.IntEntityClass
2020import org.jetbrains.exposed.dao.id.EntityID
2121import org.jetbrains.exposed.dao.id.IdTable
22- import org.jetbrains.exposed.sql.*
22+ import org.jetbrains.exposed.sql.Database
23+ import org.jetbrains.exposed.sql.ResultRow
2324import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
25+ import org.jetbrains.exposed.sql.Transaction
2426import org.jetbrains.exposed.sql.transactions.transaction
27+ import org.jetbrains.exposed.sql.update
2528import java.util.concurrent.ThreadLocalRandom
2629
2730@Serializable
@@ -82,7 +85,7 @@ fun Application.module(exposedMode: ExposedMode) {
8285
8386 routing {
8487 fun selectWorldsWithIdQuery (id : Int ) =
85- WorldTable .slice (WorldTable .id, WorldTable .randomNumber).select (WorldTable .id eq id)
88+ WorldTable .select (WorldTable .id, WorldTable .randomNumber).where (WorldTable .id eq id)
8689
8790 fun ResultRow.toWorld () =
8891 World (this [WorldTable .id].value, this [WorldTable .randomNumber])
@@ -129,7 +132,7 @@ fun Application.module(exposedMode: ExposedMode) {
129132 get(" /fortunes" ) {
130133 val result = withDatabaseContextAndTransaction {
131134 when (exposedMode) {
132- Dsl -> FortuneTable .slice (FortuneTable .id, FortuneTable .message).selectAll( )
135+ Dsl -> FortuneTable .select (FortuneTable .id, FortuneTable .message)
133136 .asSequence().map { it.toFortune() }
134137
135138 Dao -> FortuneDao .all().asSequence().map { it.toFortune() }
0 commit comments