vertx-kuickstart-core / dev.fuelyour.vertxkuickstartcore.repositories / UpdateQuery

UpdateQuery

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.

Functions

update

abstract suspend fun update(id: String, toUpdate: T, connection: SqlClient): R

Companion Object Functions

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>

Inheritors

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