interface UpdateQuery<T : Any, R : Any>
Simple mixin query for updating a single from a given table based on id. The default implementation can be used with
a call to the impl function, or a different implementation may be provided.
update |
abstract suspend fun update(id: String, toUpdate: T, connection: SqlClient): R |
impl |
Provides the default implementation for UpdateQuery. Can be used as follows. Note that constant values should be passed for schema and table, as doing otherwise would risk sql injection. fun <T : Any, R : Any> impl(schema: String, table: String): UpdateQuery<T, R> |
UpdateQueryImpl |
The default implementation for UpdateQuery. It updates a single row in the table by id. class UpdateQueryImpl<T : Any, R : Any> : UpdateQuery<T, R>, Serializer, Deserializer |