klyn.data.Query.single
method
public single() as T throws NoResultException, NonUniqueResultException
Description

Returns the sole result row.

At most two rows are requested from the provider to detect excess cardinality without materializing the complete result.

Returns

Sole row.

Throws
  • NoResultException when empty.
  • NonUniqueResultException when multiple rows exist.
Example
user = byIdQuery.single()