queryFirst

fun <T : Any> queryFirst(query: String, block: Query<T>.() -> Unit): T

Executes a query and retrieves the first result.

Return

The first result of the query.

Parameters

query

The SQL query to execute

block

The block of code to customize the query

Throws

If there are zero results.