Insert or update technical data
$technicalDatas an array of name => value

@param array $technicalDatas
432992
public function insertOrUpdateTechnicalDatas($technicalDatas)
    {
        $technicalFields = media_subdef::getTechnicalFieldsList();
        $sqlValues = null;

        foreach($technicalDatas as $name => $value){
            if(array_key_exists($name, $technicalFields)){
                if(is_null($value)){
                    $value = 0;
                }
                $sqlValues[] = [$this->getRecordId(), $name, $value, $value];
            }
        }

        if($sqlValues){
            $connection = $this->getDataboxConnection();
            $connection->transactional(function (Connection $connection) use ($sqlValues) {
                $statement = $connection->prepare('INSERT INTO technical_datas (record_id, name, value) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE value = ?');
                array_walk($sqlValues, [$statement, 'execute']);
            });

            $this->delete_data_from_cache(self::CACHE_TECHNICAL_DATA);
        }
    }
1101996
public function insert(array $data) {
        $this->notifyObservers('beforeInsert', array($this, &$data));
        $pkData = parent::insert($data);
        $this->notifyObservers('afterInsert', array($this, $data, $pkData));
        return $pkData;
    }
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;
    }
914503
public function update($mIds, array $aData = []): bool
    {
        $mResult = parent::update($mIds, $aData);
        if ($mResult) {
            $aIds = (array) $mIds;
            foreach ($aIds as $iId) {
                $this->saveBreadcrumbs($iId);
            }
            $this->saveOrder();
        }
        return $mResult;
    }
284696
public function setTemplateData(array $templateData)
    {
        if (!isset($this->templateData)) {
            $this->templateData = [];
        }

        $this->templateData = array_merge($this->templateData, $templateData);

        return $this;
    }
496635
protected function doUpdate(array $entityData)
    {
        $user = $this->find($entityData['id']);

        return $this->populate($user, $entityData);
    }
894367
public function insert($insertData) {
		$this->provider('cache')->cacheClear('db', $this->getDao()->getTableName());
        $obj = $this->getConnection();
        $obj->insert($this->getDao()->getTableName(), $insertData);
        return $obj->count;
	}
327230
public function updatePrimaryDbValueFromDbData()
    {
        $dbDataPrimaryValue = $this->getDbDataPrimaryValue();

        if ($dbDataPrimaryValue !== $this->getDbDataPrimaryDefaultValue()) {
            $this->setPrimaryDbValue($dbDataPrimaryValue);
        }
    }
1117903
public function put($calendarData)
    {
        if (is_resource($calendarData)) {
            $calendarData = stream_get_contents($calendarData);
        }
        $etag = $this->caldavBackend->updateCalendarObject($this->calendarInfo['id'], $this->objectData['uri'], $calendarData);
        $this->objectData['calendardata'] = $calendarData;
        $this->objectData['etag'] = $etag;

        return $etag;
    }
961249
public function insert($table_name, array $data) {
            Event::dispatch(EventData::forBefore(Event::BEFORE_INSERT, $table_name, $data), $data);

            $q = $this->config->getSystemIdentifierQuote();
            $fields = [];
            $data_values = "";
            $statement_params = [];
            $null_params = [];

            foreach ($data as $field_name => $value) {
                $fields[] = "\n$q" . $field_name . $q;
                if (strtolower($value) == 'null' || is_null($value)) {
                    $data_values .= 'NULL,';
                    $null_params[ $field_name ] = 'NULL';
                } else {
                    $data_values .= ':' . $field_name . ',';
                    $statement_params[ ':' . $field_name ] = $value;
                }
            }

            $full_param_list = array_merge($statement_params, $null_params);

            $fields = implode(',', $fields);
            $data_values = substr($data_values, 0, -1);
            $sql_query = "INSERT INTO \n$q" . $table_name . "$q ( " . $fields . " )\n VALUES (" . $data_values . ")";
            if ($this->config->db_type === 'pgsql') {
                $sql_query .= "\nRETURNING id;\n";
            }

            try {
                $stmt = $this->db_connection->prepare($sql_query);
                if ($statement_params) {
                    foreach ($statement_params as $k => $v) {
                        $stmt->bindValue($k, $v);
                    }
                }
                $stmt->execute();
            } catch (Exception $ex) {
                Event::dispatch(EventData::forException($ex, $sql_query, $full_param_list));
                throw new QueryException($ex->getMessage(), $ex->getCode(), $ex);
            }

            if ($this->config->db_type === 'pgsql') {
                $insert_id = $stmt->fetchColumn(0);
            } else {
                $insert_id = $this->db_connection->lastInsertId();
            }

            $rows_affected = empty($insert_id) ? 0 : 1;
            Event::dispatch(EventData::forAfter(Event::AFTER_INSERT, $table_name, $full_param_list, $sql_query, $rows_affected, $insert_id));

            return $insert_id;
        }
957964
public function _updateUserData( array $aPostData )
    {
        if ( $oUser = $this->_updateUserProfileData( $aPostData ) ) {
            $this->_updateUserActiveShippingAddress( $oUser, $aPostData );
        }
    }
328525
protected function updateData(array $data, $attribute, $attributeValue)
    {
        if ($this->nameConverter) {
            $attribute = $this->nameConverter->normalize($attribute);
        }

        $data[$attribute] = $attributeValue;

        return $data;
    }
332599
function addData($data, $col_id = 0, $row_id = 0) {
        foreach ($data as $row) {
            if ($row === self::CONSOLE_TABLE_HORIZONTAL_RULE) {
                $this->_data[$row_id] = self::CONSOLE_TABLE_HORIZONTAL_RULE;
                $row_id++;
                continue;
            }
            $starting_col = $col_id;
            foreach ($row as $cell) {
                $this->_data[$row_id][$starting_col++] = $cell;
            }
            $this->_updateRowsCols();
            $this->_max_cols = max($this->_max_cols, $starting_col);
            $row_id++;
        }
    }
436381
public function updateRow($entry, $newRowData)
    {
        $newCustomArr = array();
        foreach ($newRowData as $k => $v) {
            $newCustom = new Zend_Gdata_Spreadsheets_Extension_Custom();
            $newCustom->setText($v)->setColumnName($k);
            $newCustomArr[] = $newCustom;
        }
        $entry->setCustom($newCustomArr);

        return $entry->save();
    }
586962
public void insert(final DeviceData deviceData, final DevVarDoubleStringArray argin) {
        DevVarDoubleStringArrayHelper.insert(deviceData.getAny(), argin);
    }
1314417
public function checkData(array $currentData, array $newData)
    {
        return ($currentData && $newData && $currentData !== $newData)
            ? $this->updateData($newData)
            : $newData;
    }
1247499
protected function setData($data, $datasource = '', $isActionBoundDatasource = false)
    {
        if(empty($datasource) && !empty($this->currentDatasource))
            $datasource = $this->currentDatasource;

        if(!is_array($data) && !empty($data))
            $data = array($data);

        if($isActionBoundDatasource) {
            self::$actionBoundDatasource = $datasource;

            // NOTE: referenceData always overrides data
            if(count($refData = (array)$this->referenceData()) > 0)
                $data = ArrayUtils::arrayMultiMergeKeys($data, $refData);
        }

        self::$data[$datasource] = $data;
    }