This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class CrudRepository <ID, DOMAIN, TABLE : Table> { | |
abstract val table: TABLE | |
abstract fun toDomain(row: ResultRow): DOMAIN | |
abstract fun toRow(domain: DOMAIN): TABLE.(InsertStatement<Number>) -> Unit | |
abstract fun match(id: ID): SqlExpressionBuilder.() -> Op<Boolean> | |
abstract fun extractId(domain: DOMAIN): ID | |
abstract fun updateRow(domain: DOMAIN): TABLE.(UpdateStatement) -> Unit | |
/** | |
* Get a particular record by its ID. |