code: public @NotNull OptionalInt findOptionalInt(@NotNull SqlQuery query) {
          Optional<Integer> value = findOptional(Integer.class, query);
          return value.isPresent() ? OptionalInt.of(value.get()) : OptionalInt.empty();
      }
docs: Finds a unique result from database, converting the database row to int using default mechanisms.
  Returns empty if there are no results or if single null result is returned.
  
  @throws NonUniqueResultException if there are multiple result rows