code: public static <INPUT extends Comparable<INPUT>> void executeLargeUpdates(Collection<INPUT> inputs, Consumer<List<INPUT>> consumer,
      IntFunction<Integer> partitionSizeManipulations) {
      Iterable<List<INPUT>> partitions = toUniqueAndSortedPartitions(inputs, partitionSizeManipulations);
      for (List<INPUT> partition : partitions) {
        consumer.accept(partition);
      }
    }
docs: Partition by 1000 elements a list of input and execute a consumer on each part.
  
  The goal is to prevent issue with ORACLE when there's more than 1000 elements in a 'in ('X', 'Y', ...)'
  and with MsSQL when there's more than 2000 parameters in a query
  
  @param inputs the whole list of elements to be partitioned
  @param consumer the mapper method to be executed, for example {@code mapper(dbSession)::selectByUuids}
  @param partitionSizeManipulations the function that computes the number of usages of a partition, for example
  {@code partitionSize -> partitionSize / 2} when the partition of elements
  in used twice in the SQL request.