Adds a new column to the index.

@param Column|array $data Column or attributes from XML.
160789
public function addColumn($data)
    {
        if ($data instanceof Column) {
            $column = $data;
            $this->columns[] = $column->getName();
            if ($column->getSize()) {
                $this->columnsSize[$column->getName()] = $column->getSize();
            }
            $this->columnObjects[] = $column;
        } else {
            $this->columns[] = $name = $data['name'];
            if (isset($data['size']) && $data['size'] > 0) {
                $this->columnsSize[$name] = $data['size'];
            }
            if ($this->getTable()) {
                $this->columnObjects[] = $this->getTable()->getColumn($name);
            }
        }
    }
968761
private function createFromCsv(array $data, string $table) : void
    {
        foreach ($data as $col) {
            $csvField = new CsvField($col);
            $dbFields = $this->factory->fieldToDb($csvField, $table);

            if (empty($dbFields)) {
                continue;
            }

            foreach ($dbFields as $dbField) {
                $this->createColumn($dbField);
            }
        }
    }
14430
public function addRow($data = null)
    {
        // Clear existing empty row
        if (($current = $this->currentRow()) && $current->isEmpty()) {
            array_pop($this->rows);
        }

        // Append data
        if ($data instanceof SQLAssignmentRow) {
            $this->rows[] = $data;
        } else {
            $this->rows[] = new SQLAssignmentRow($data);
        }
        return $this;
    }
1024291
def add_column(name, column_properties = {})
      validate_column_absence(name)
      create_column_properties(name, column_properties)
      @data_rows.each{|x|
        x << (yield Row.new(@column_indexes, x))
      }
      @column_indexes[name] = @column_indexes.size
      self # enable chaining
    end
322229
private function addDocumentsFromArray(array $data)
    {
        $_documentClass = $this->_documentClass;

        $this->_result[] = $_documentClass::createFromArray($data, $this->_options);
    }
78577
protected function fillDataArray(array &$data)
    {
        $this->query->chunk(
            static::CHUNK_SIZE,
            function ($records) use (&$data) {
                /** @var Collection|Model[] $records */

                foreach ($records as $record) {

                    $fields = [];

                    foreach ($this->columnStrategies as $key => $strategy) {
                        $fields[] = $strategy->render($record, $this->columns[$key]->source);
                    }

                    $data[] = array_combine($this->columnHeaders, $fields);
                }
            }
        );
    }
1052205
public void addRow(final String[] data) {
		if (anyStringContainsNewLine(data)) {
			final String[][] theMatrix = Util.createMatrix(data);
			for (int i = 0; i < theMatrix.length; i++) {
				addRow(theMatrix[i]);
			}
		} else {
			final Row myRow = new Row(this, data);
			rows.add(myRow);
		}

	}
647733
public function addColumn(array $data)
    {
        $columnValidation = $this->_validateColumn($data);
        if (is_string($this->_validateColumn($data))) {
            throw new CollectionException('Invalid column data. '.$columnValidation);
        }

        $this->_columns[] = $data;

        return $this;
    }
387387
public function set(array $data)
    {
        foreach ($data as $name => $value) {
            $this->setField($name, $value);
        }
    }
423303
private function addFields(array $data)
    {
        if (!empty($data)) {
            curl_setopt($this->ch, CURLOPT_POSTFIELDS, http_build_query($data));
        }
    }
4459
public function addRows($data)
    {
        foreach ($data as $key => $row) {
            $this->addRow($row, isset($row['id']) ? $row['id'] : $key);
        }

        return $this;
    }
16808
public function setOriginal($data)
    {
        if (is_array($this->column)) {
            foreach ($this->column as $key => $column) {
                $this->original[$key] = array_get($data, $column);
            }

            return;
        }

        $this->original = array_get($data, $this->column);
    }
85971
public function import($data) {
		
		if (! is_array($data)) {
			$data = $this->makeArray($data);
		}
		
		foreach($data as $key => $value) {
			$this->set($key, $value);
		}
	}
853177
public function setData($data = array())
    {
        

    	//empty local data
    	$this->rows = array();
    	//fill the local data
		foreach($data as $rowId => $cells){
			if(is_array($cells)){
				$this->addRow($rowId, $cells);
			}else if(is_string($cells)){
				$this->addRow($cells);
			}
		}

        
    }
1085966
public function addColumn(Column $column)
    {
        if ($this->hasColumn($column->getName())) {
            throw SchemaException::tableColumnAlreadyExists($this->getName(), $column->getName());
        }

        $this->columns[$column->getName()] = $column;
    }
854849
protected function addAttributes(array $data)
    {
        if (empty($data['field']['attribute'])) {
            return false;
        }

        foreach ($data['field']['attribute'] as $field_id => $field_value_ids) {
            foreach ((array) $field_value_ids as $field_value_id) {

                $options = array(
                    'type' => 'attribute',
                    'field_id' => $field_id,
                    'product_id' => $data['product_id'],
                    'field_value_id' => $field_value_id
                );

                $this->product_field->add($options);
            }
        }

        return true;
    }
347321
public function add(array $data)
    {
        $result = null;
        $this->hook->attach('category.group.add.before', $data, $result, $this);

        if (isset($result)) {
            return (int) $result;
        }

        $result = $data['category_group_id'] = $this->db->insert('category_group', $data);

        $this->setTranslations($data, $this->translation_entity, 'category_group', false);

        $this->hook->attach('category.group.add.after', $data, $result, $this);
        return (int) $result;
    }