code: public @NotNull OptionalLong findOptionalLong(@NotNull SqlQuery query) {
          Optional<Long> value = findOptional(Long.class, query);
          return value.isPresent() ? OptionalLong.of(value.get()) : OptionalLong.empty();
      }
docs: Finds a unique result from database, converting the database row to long 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