singleOrNull

abstract suspend fun <T : Any> singleOrNull(returnType: KClass<T>): T?(source)

Executes the query and returns at most one row converted to returnType, or null if the query returns no rows.

Fails with an exception if the query returns more than one row.