fixes in inheritance of interfaces

This commit is contained in:
InsanusMokrassar 2022-04-20 23:14:06 +06:00
parent b5eac37782
commit be4aa8daac
2 changed files with 5 additions and 5 deletions

View File

@ -5,6 +5,4 @@ import org.jetbrains.exposed.sql.*
interface ExposedCRUDRepo<ObjectType, IdType> : ExposedRepo {
val ResultRow.asObject: ObjectType
val selectById: SqlExpressionBuilder.(IdType) -> Op<Boolean>
val selectAll: Transaction.() -> Query
get() = { (this as FieldSet).selectAll() }
}

View File

@ -1,8 +1,10 @@
package dev.inmo.micro_utils.repos.exposed
import dev.inmo.micro_utils.repos.Repo
import org.jetbrains.exposed.sql.Database
import org.jetbrains.exposed.sql.*
interface ExposedRepo : Repo {
interface ExposedRepo : Repo, FieldSet {
val database: Database
}
val selectAll: Transaction.() -> Query
get() = { (this@ExposedRepo as FieldSet).selectAll() }
}