code: public int upsert(DbSession dbSession, Iterable<LiveMeasureDto> dtos) {
      for (LiveMeasureDto dto : dtos) {
        dto.setUuidForUpsert(Uuids.create());
      }
      int updated = 0;
      for (List<LiveMeasureDto> chunk : Iterables.partition(dtos, 100)) {
        updated += mapper(dbSession).upsert(chunk, system2.now());
      }
      return updated;
    }
docs: Similar to {@link #insertOrUpdate(DbSession, LiveMeasureDto)}, except that:
  <ul>
  <li>it is batch session friendly (single same statement for both updates and inserts)</li>
  <li>it triggers a single SQL request</li>
  </ul>
  <p>
  <strong>This method should not be called unless {@link Dialect#supportsUpsert()} is true</strong>