private static Object checkResult(Object result, QualifiedType<?> type) {
        if (result == null && GenericTypes.getErasedType(type.getType()).isPrimitive()) {
            throw new IllegalStateException("SQL method returns primitive " + type + ", but statement returned no results");
        }
        return result;
    }
Inspect a Method for a {@link Consumer} to execute for each produced row.

@param method the method called
@return a ResultReturner that invokes the consumer and does not return a value
sqlobject/src/main/java/org/jdbi/v3/sqlobject/statement/internal/ResultReturner.java