code: private function convertParameterAggregate($var, $arguments)
      {
          // Treat as list.
          $var = (array) $var;
  
          if (!empty($arguments['recursive'])) {
              $var = iterator_to_array(
                  new \RecursiveIteratorIterator(
                      new \RecursiveArrayIterator(
                          $var
                      )
                  )
              );
          }
  
          if (!$var) {
              return 'NULL';
          }
  
          if (!empty($arguments['key'])) {
              $var = array_keys($var);
          } else {
              // Use values.
              $var = array_values($var);
          }
  
          if ($arguments['aggregate'] == 'set') {
              $this->addParameter(implode(',', $var));
  
              return '?';
          }
  
          $this->addParameters($var);
  
          return rtrim(str_repeat('?,', count($var)), ',');
      }
docs: Convert a parameter using an aggregate function.
  
  @param string $var       The parameter value.
  
  @param array  $arguments The arguments of the parameter.
  
  @return string