Appends a new row to insert

@param array|SQLAssignmentRow $data A list of data to include for this row
@return $this The self reference to this query
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;
    }
602095
protected function prepareInsertData(array $data)
    {
        $dbData       = [];
        $extraColumns = $this->extraColumns ? $this->extraColumns : [];

        foreach ($data as $key => $value) {
            $dbData[] = array_merge($extraColumns, [
                $this->keyColumn   => $key,
                $this->valueColumn => $value,
            ]);
        }

        return $dbData;
    }
802323
public function batchInsert(array $data)
    {
        $ids = [];
        foreach ($data as $item) {
            if (isset($item['id'])) {
                if (array_key_exists($item['id'], $this->table->data['data'])) {
                    continue;
                }
            } else {
                $item = ['id' => $this->generateId()] + $item;
            }

            $ids[] = $this->insert($item);
        }

        return $ids;
    }
726085
public function insert($data)
  {
    $this->stmt['action'] = 'INSERT';
    $this->stmt['cols'] = array_merge($this->stmt['cols'], $data);
    return $this;
  }
1074577
public function addDataSql(string $data)
    {
        $this->sql_data = true;
        $this->sql_params = [];

        $args_count = \func_num_args();
        $args = \func_get_args();

        for ($i = 1; $i < $args_count; $i++) {
            $this->sql_params[] = $args[$i];
        }

        $this->data = $data;

        return $this;
    }
841966
public function addRow($data, $rowId = null)
    {
        if (($rowId === null) && isset($data['id'])) {
            $rowId = $data['id'];
        }

        if ($rowId === null) {
            $rowId = count($this->rows);
        }

        $this->rows[$rowId] = $data;

        return $this;
    }
1242278
public function insert($key, array $data)
    {
        if (key_exists($key, $this->items)) {
            $this->items[$key] = $data;
        } else {
            $this->items[$key] = $data;
        }
        return $this;
    }
370720
public function append($data)
	{
		if($data instanceof AbstractToken)
		{
			$this->tokens[] = $data;
		}
		elseif($data instanceof AbstractTokenContainer)
		{
			$this->tokens = array_merge($this->tokens, $data->toArray());
		}
		elseif($data instanceof AbstractTokenCursor)
		{
			while($data->valid())
			{
				$this->tokens[] = $data->current();
				
				$data->next();
			}
		}
		else
		{
			throw new \InvalidArgumentException('Cannot append data to token buffer: ' . gettype($data));
		}
		
		return $this;
	}
1008998
public function setColumns(array $data)
    {
        unset($this->query['columns']);
        foreach ($data as $field => $value) {
            $this->addColumn($field, $value);
        }
        return $this;
    }
1341657
public function insert($data)
    {
        if(empty($data))
            throw new Exception("Can't insert an empty row");

        return $this->_connection->execute(sprintf(
            'INSERT INTO %s SET %s',
            $this->_name->quoted(),
            $this->_buildSet($data)
            ), array_values($data)
        );
    }
921869
protected function insertRow()
    {   
        $assignedValues = $this->getAssignedValues();

        $columns = implode(', ', $assignedValues['columns']);
        $values = '\''.implode('\', \'', $assignedValues['values']).'\'';

        $tableName = $this->getTableName($this->className);

        $connection = Connection::connect();

        $insert = $connection->prepare('insert into '.$tableName.'('.$columns.') values ('.$values.')');
        var_dump($insert);
        if ($insert->execute()) { 
            return 'Row inserted successfully'; 
        } else { 
            var_dump($insert->errorInfo()); 
        } 
    }
160963
public function insert($data)
    {
        $row = $this->getTable()->insert($data);
        if (!$row instanceof IRow) {
            return $row;
        }

        if ($this->auditLogRepository) {
            $to = $this->filterValues($this->excludeColumns((array)$data));

            $data = [
                'version' => '1',
                'from' => [],
                'to' => $to,
            ];
            $this->pushAuditLog(AuditLogRepository::OPERATION_CREATE, $row->getSignature(), $data);
        }

        return $row;
    }
370619
public function upsert($data)
    {
        if(empty($data))
            throw new Exception("Can't insert an empty row");

        return $this->_connection->execute(sprintf(
            'INSERT INTO %s SET %2$s ON DUPLICATE KEY UPDATE %2$s',
            $this->_name->quoted(),
            $this->_buildSet($data)
            ), array_merge(array_values($data),array_values($data))
        );
    }
1200295
public function addData($data)
    {
        $data = (array) $data;

        if (empty($data)) {
            return $this;
        }

        foreach ($data as $key => $value) {
            $this->setData($key, $value);
        }

        return $this;
    }
433240
private function insertData($data)
    {
        $inserted = Yii::$app->db->createCommand()->batchInsert(
            $this->getName(),
            $this->cleanUpBatchInsertFields($this->getFields()),
            $this->cleanUpMatchRow($data)
        )->execute();

        return $inserted;
    }
1207895
public function add($data = [])
    {
        $this->connection();
        $db = DB::table($this->table);
        $id = $db->insertGetId($data);
        $this->debug->debug(__FUNCTION__, 'SQL Queries: ' . $db->toSql());
        $this->debug->debug(__FUNCTION__, 'Result Insert ID: ' . $id);

        return $id;
    }
865927
public function add(array $data): Insert
    {
        if (!isset($data[0]) && count($this->fields) == 0) {
            $this->fields(array_keys($data));
        }

        $this->data[] = $data;
        return $this;
    }