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

FindQuery

interface FindQuery<T : Any>

Simple mixin query for selecting a single row from a given table by id. The default implementation can be used with a call to the impl function, or a different implementation may be provided.

Functions

find

abstract suspend fun find(id: String, connection: SqlClient): T

Companion Object Functions

impl

Provides the default implementation for FindQuery. 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> impl(schema: String, table: String): FindQuery<T>

Inheritors

FindQueryImpl

The default implementation for FindQuery. It returns a single row in the table by id.

class FindQueryImpl<T : Any> : FindQuery<T>, Deserializer