Update's the passed row.

@param array       $row  The row to update
@param string|null $name The name of the prepared statement that has to be executed

@return string The ID of the updated product
196759
public function execute($row, $name = null)
    {
        parent::execute($row, $name);
        return $row[MemberNames::ENTITY_ID];
    }
486371
public function update(array $row, $where = null)
    {
        // updated字段是表必备字段,并自动更新
        if ($this->enableAutoField()) {
            $row['updated'] = date('Y-m-d H:i:s');
        }

        // 执行前置钩子
        $ret = $this->before('Update', $row, $where);
        if ($ret === self::INTERRUPT) {
            return null;
        }

        //修正请求参数
        list($row, $where) = $ret;

        // 记录修改操作
        $this->statement->update($row, $where);

        //是否需要记录文本日志
        if (self::logEnabled()) {
            //复制原Statement,因为下面的Count要用.
            $statement = clone $this->statement;

            //查看满足条件的记录数
            $count = $this->count($where);

            //恢复Statement
            $this->statement = $statement;

            //记录日志,如果影响行数过多,则不记录之前,之后的数据
            $result = self::log('update', ['data' => $row, 'where' => $where], '*', $where, $count <= 20, $count <= 20);
        } else {
            $result = $this->execute2();
        }

        // 执行后置钩子
        return $this->after('Update', $result);
    }
419487
public function actionUpdate($name)
    {
        $model = $this->getModel(Rule::SCENARIO_UPDATE);
        $rule  = $this->findRule($name);

        $model->setOldName($name);
        $model->setAttributes([
            'name'  => $rule->name,
            'class' => get_class($rule),
        ]);

        if (\Yii::$app->request->isAjax && $model->load(\Yii::$app->request->post())) {
            \Yii::$app->response->format = Response::FORMAT_JSON;
            return ActiveForm::validate($model);
        }

        if ($model->load(\Yii::$app->request->post()) && $model->update()) {
            \Yii::$app->session->setFlash('success', \Yii::t('rbac', 'Rule has been updated'));
            return $this->redirect(['index']);
        }

        return $this->render('update', [
            'model' => $model,
        ]);
    }
330643
public function rowAction ($name)
    {
        $oper = $this->getRequest()->get('oper', false);
        if (!in_array($oper, array('add', 'edit', 'del'))){
            throw new \InvalidArgumentException(sprintf('Event type: %s is not valid', $oper));
        }
        
        $eventType = 'neutron_datagrid.onRow' . ucfirst($oper);
        
        $event = new RowEvent($name, $this->getRequest()->get('id'));

        $this->container->get('event_dispatcher')->dispatch($eventType, $event);
        
        return new JsonResponse(array(
            'errors'  => $event->getErrors(), 
            'success' => $event->getSuccess(), 
            'id'      => $event->getId(),
            'data'    => $event->getData()
        ));
    }
1221299
private function translateRow(&$row)
    {
        $new_row = [];

        // Translate incoming data via mapping array.
        foreach ($row as $key => $value) {
            if (array_has($this->config['mapping'], $key)) {
                $new_row[array_get($this->config['mapping'], $key)] = $value;
            }
        }

        // Replace with translated row.
        $row = $new_row;
    }
892367
function ByName($name)
    {
        $this->CheckData($name);
        if ($this->row)
            return $this->row[(string)$name];
    }
732285
public function execute($row, $name = null)
    {
        parent::execute($row, $name);
        return $row[MemberNames::LINK_ID];
    }
1260141
public function insertId ($name = null)
		{
			if ($name === null) {
				return $this->database->lastInsertId();
			} else {
				return $this->database->lastInsertId($name);
			}
		}
1208083
public function update($sql, $bindings = array())
		{
			list($statement, $result) = $this->execute($sql, $bindings);
			return $statement->rowCount();
		}
133634
protected function updateRecord($name)
    {
        try {
            return (bool) $this->db
                    ->update($this->table)
                    ->where($this->columns['name'])->eq($name)
                    ->set(array(
                        $this->columns['data'] => serialize($this->cache[$name]->toArray()),
            ));
        } catch (PDOException $e) {
            return false;
        }
    }
1112627
public function updateRow ($row, $filterColumns = true)
		{
			$id = $row[$this->getPrimaryKey()];

			if ($filterColumns) {
				$row = $this->filterColumns($row);
			}

			$this->database->createQuery()
				->update()
				->table($this->table)
				->set($row)
				->where(
					$this->database->createCondition()
						->equal($this->getPrimaryKey(), $id)
				)
				->execute();
		}
714762
public function getLastInsertId(string $name = null)
    {
        if (null === $this->pdo) {
            throw new DatabaseException('Not connected: can not retrieve last insert id');
        }

        try {
            return $this->pdo->lastInsertId($name);
        } catch (PDOException $pdoe) {
            throw new DatabaseException($pdoe->getMessage(), $pdoe);
        }
    }
1305498
public function update($query, array $data) {
        $stmt = $this->executeQuery($query, $data);

        return $stmt->rowCount();       
    }
868730
protected function initFromRow($row)
    {
        if ($row === null) {
            throw new SwatDBException(
                'Attempting to initialize dataobject with a null row.'
            );
        }

        $property_array = array_merge(
            $this->getPublicProperties(),
            $this->getSerializableProtectedProperties()
        );

        if (is_object($row)) {
            $row = get_object_vars($row);
        }

        foreach ($property_array as $name => $value) {
            // Use array_key_exists() instead of isset(), because isset() will
            // return false when the value is null. Null values on properties
            // should not be ignored - otherwise calling initFromRow() on an
            // existing dataobject can leave out of date values on properties
            // when those values were updated to null.
            if (array_key_exists($name, $row)) {
                if (
                    in_array($name, $this->date_properties) &&
                    $row[$name] !== null
                ) {
                    $this->$name = new SwatDate($row[$name]);
                } else {
                    $this->$name = $row[$name];
                }
            }
        }

        foreach ($this->internal_properties as $name => $value) {
            if (isset($row[$name])) {
                $this->internal_properties[$name] = $row[$name];
            }
        }

        $this->loaded_from_database = true;
    }
98827
public function execute($row, $name = null)
    {
        parent::execute($row, $name);
        return $row[MemberNames::PRODUCT_SUPER_ATTRIBUTE_ID];
    }
458885
public function getColumn($name)
    {
        $columnValues = array();
        foreach ($this->getRows() as $row) {
            $columnValues[] = $row->getColumn($name);
        }
        return $columnValues;
    }
55075
public static function array_row_field_to_key(array $array, $row_field_name )
    {
        if (!is_array($array)) {
            return array();
        }
        $temp_data = array();
        foreach($array as $key => $row ){
            if (isset($row[$row_field_name])) {
                $temp_data[$row[$row_field_name]] = $row;
            }
            unset($array[$key]);
        }
        return $temp_data;
    }