add rows and updates the fieldsPopularity array - to make the inferred fields more accurate.

@param $rows

@throws FieldValidationException
482086
public function addRows($rows)
    {
        foreach ($rows as $row) {
            $this->inputRows[] = $row;
            $inferredRow = $this->inferRow($row);
            foreach ($this->getFieldNames() as $fieldName) {
                /** @var BaseField $inferredField */
                $inferredField = $inferredRow[$fieldName];
                $inferredFieldType = $inferredField->getInferIdentifier($this->lenient);
                if (!array_key_exists($fieldName, $this->fieldsPopularity)) {
                    $this->fieldsPopularity[$fieldName] = [];
                    $this->fieldsPopularityObjects[$fieldName] = [];
                }
                if (!array_key_exists($inferredFieldType, $this->fieldsPopularity[$fieldName])) {
                    $this->fieldsPopularity[$fieldName][$inferredFieldType] = 0;
                    $this->fieldsPopularityObjects[$fieldName][$inferredFieldType] = $inferredField;
                }
                ++$this->fieldsPopularity[$fieldName][$inferredFieldType];
                arsort($this->fieldsPopularity[$fieldName]);
            }
        }
    }
721112
public function addFields(array $fields)
    {
        $fields = Validate::arrToLower($fields);
        Validate::types(array_values($fields));
        $fields = array_diff_assoc($fields, $this->schema());
        if (!empty($fields))
        {
            $config         = $this->getConfig();
            $config->schema = array_merge($this->schema(), $fields);
            $data = $this->getData();
            foreach ($data as $key => $object)
            {
                foreach($fields as $name => $type)
                    $data[$key]->{$name} = (Validate::isNumeric($type)) ? 0 : null;
            }
            $this->databaseDocument->put($data);
            $this->databaseConfig->put($config);
        }
        return true;
    }
374335
function addRow($row, $append = true) {
        if ($append) {
            $this->_data[] = array_values($row);
        } else {
            array_unshift($this->_data, array_values($row));
        }

        $this->_updateRowsCols($row);
    }
440456
protected function setFields($fields)
    {
        if(is_array($fields)) {
            foreach ( $fields as $field ) {
                if ( !in_array($field, $this->fieldsWhitelist) ) {
                    throw new \InvalidArgumentException(sprintf('The field `%s` was not recognized.', $field));
                }
            }
        } elseif($fields === true) {
            $fields = $this->fieldsWhitelist;
        } else {
            throw new \InvalidArgumentException("The argument passed to setFields was invalid");
        }

        $this->setQueryParam('fields', $fields);
    }
1056001
private function doUpdateByQueries(array $row): void
    {
        $data = $this->generateFakeData();

        $queryBuilder = $this->dbUtils->getConn()->createQueryBuilder();
        $queryBuilder = $queryBuilder->update($this->entity);
        foreach ($data as $field => $value) {
            $value = empty($row[$field]) ?
                $this->dbUtils->getEmptyValue($this->entityCols[$field]['type']) :
                $value;

            $condition = $this->dbUtils->getCondition($field, $this->entityCols[$field]);
            $queryBuilder = $queryBuilder->set($field, $condition);
            $queryBuilder = $queryBuilder->setParameter(":$field", $value);
        }
        $queryBuilder = $queryBuilder->where("{$this->priKey} = :{$this->priKey}");
        $queryBuilder = $queryBuilder->setParameter(":{$this->priKey}", $row[$this->priKey]);

        $this->returnRes === true ?
            array_push($this->queries, $this->dbUtils->getRawSQL($queryBuilder)) :
            null;

        if ($this->pretend === false) {
            $queryBuilder->execute();
        }
    }
141787
public function validateRow($row)
    {
        try {
            $this->castRow($row);

            return [];
        } catch (Exceptions\FieldValidationException $e) {
            return $e->validationErrors;
        }
    }
3321
public function setRows($rows = []) {

        if (!empty($this->cols)) {
            if (count($rows[0]) < 1) {
                throw new \Exception('Expected 2 dimensional array for rows');
            } elseif (count($this->cols) != 0 && count($this->cols) != count($rows[0])) {
                throw new \Exception('No of cols must equivelent to no heads in rows');
            }
        }
        $this->rows = $rows;
        return $this;
    }
632798
public function setFields( $fields )
	{
		if( is_array( $fields ) && count( $fields ) )
			$this->fields = $fields;
		else
			trigger_error( 'Field Array of Table Definition must no be empty.', E_USER_ERROR );
	}
60579
final protected function persistObjects(PersistenceContext $context, array $objects, array $rows)
    {
        $this->mapping->persistAll($context, $objects, $rows);
    }
552597
public function setRows($rows)
    {
        intval($rows);
        if ($rows < 1) {
            $rows = 1;
        }

        $this->rows = $rows;

        return $this;
    }
629100
public function ApplyRules($Fields) {
      foreach ($Fields as $Index => $Row) {
         $Validation = GetValue('Validation', $Row);
         if (!$Validation)
            continue;
         
         $FieldName = GetValue('Name', $Row, $Index);
         if (is_string($Validation)) {
            $this->ApplyRule($FieldName, $Validation);
         } elseif (is_array($Validation)) {
            foreach ($Validation as $Rule) {
               if (is_array($Rule)) {
                  $this->ApplyRule($FieldName, $Rule[0], $Rule[1]);
               } else {
                  $this->ApplyRule($FieldName, $Rule);
               }
            }
         }
      }
   }
1207502
public function addRows($rows, Style $style = null)
    {
        if (!is_array($rows) && false === $rows instanceof \Traversable) {
            throw new \InvalidArgumentException('Expected array or traversable object as rows');
        }

        foreach ($rows as $row) {
            $this->addRow($row, $style);
        }
    }
722865
private function hasSubmit($rows)
    {
        foreach ($rows as $row) {
            foreach ($row as $element) {
                if ($element instanceof SubmitElementInformationInterface) {
                    return true;
                }
            }
        }

        return false;
    }
668600
public void addRow(final String... cells){
        final Row row = new Row((Object[]) cells);

        if(!rows.contains(row)){
            rows.add(row);
        }
    }
108438
public function setRows($rows)
    {
        $this->rows = $rows;
        $this->rowsString = sprintf('`%s`', implode('`,`', $this->rows));

        return $this;
    }
932260
public function updateRows(array $rows): array
    {
        if (null === $this->data) {
            $this->buildIndex();
        }

        $list = [];
        foreach ($rows as $key => $row) {
            $key = (string)$key;
            if ($this->hasKey($key)) {
                $this->data[$key] = $list[$key] = $row;
            }
        }

        if ($list) {
            $this->save();
        }

        return $list;
    }
1146086
public function addRow(array $row)
    {
        if (is_array($this->fields)) {
            $assoc = $row;
            $row = [];
            foreach ($this->fields as $field) {
                $row[] = isset($assoc[$field]) ? $assoc[$field] : "";
            }
        }

        $this->data[] = $row;

        return $this;
    }