Update all records
178655
public function update_all($data)
    {
        $data = $this->trigger('before_update', $data);
        $result = $this->_database->set($data)
                           ->update($this->_table);
        $this->trigger('after_update', array($data, $result));

        return $result;
    }
142662
def _update_record(self, identifier, rtype=None, name=None, content=None):
        """"""
        records = self._raw_records(identifier, rtype, name, content)
        self._update_records(records, {
            'type': rtype,
            'hostname': self._relative_name(name),
            'destination': content,
            'priority': self._get_lexicon_option('priority'),
        })
        LOGGER.debug('update_record: %s', True)
        return True
1118297
def update_record(self, name, new_data, condition, update_only=False,
                      debug=False):
        
        # add numeric index column temporarily
        self.df['num'] = list(range(len(self.df)))
        df_data = self.df
        condition2 = (df_data.index == name)
        # edit first of existing data that meets condition
        if len(df_data[condition & condition2]) > 0:  #we have one or more records to update or delete
            # list of all rows where condition is true and index == name
            inds = df_data[condition & condition2]['num']
            #inds = df_data[condition]['num'] # list of all rows where condition is true
            existing_data = dict(df_data.iloc[inds.iloc[0]]) # get first record of existing_data from dataframe
            existing_data.update(new_data) # update existing data with new interpretations
            # update row
            self.update_row(inds.iloc[0], existing_data)
            # now remove all the remaining records of same condition
            if len(inds) > 1:
                for ind in inds[1:]:
                    print("deleting redundant records for:", name)
                    df_data = self.delete_row(ind)
        else:
            if update_only:
                print("no record found for that condition, not updating ", name)
            else:
                print('no record found - creating new one for ', name)
                # add new row
                df_data = self.add_row(name, new_data)
        # sort so that all rows for an item are together
        df_data.sort_index(inplace=True)
        # redo temporary index
        df_data['num'] = list(range(len(df_data)))
        self.df = df_data
        return df_data
436912
def update(self, data=None, priority=None, ttl=None, comment=None):
        
        return self.manager.update_record(self.domain_id, self, data=data,
            priority=priority, ttl=ttl, comment=comment)
236429
def group_records_by_type(records):
    """"""
    update_records, delete_records = [], []
    for r in records:
        if isinstance(r, str):
            break

        if r['detail']['eventName'] in UPDATE_EVENTS:
            update_records.append(r)
        else:
            delete_records.append(r)
    return update_records, delete_records
1174074
def save_records(self, records):
        '''
        
        '''
        for record in records:
            if not isinstance(record, Record):
                record = Record(*record)
            self.save_record(*record)
1241137
def _update_record(self, record_id, name, address, ttl):
        """"""
        data = json.dumps({'record': {'name': name,
                                      'content': address,
                                      'ttl': ttl}})
        headers = {'Content-Type': 'application/json'}
        request = self._session.put(self._baseurl + '/%d' % record_id,
                                    data=data, headers=headers)
        if not request.ok:
            raise RuntimeError('Failed to update record: %s - %s' %
                               (self._format_hostname(name), request.json()))
        record = request.json()
        if 'record' not in record or 'id' not in record['record']:
            raise RuntimeError('Invalid record JSON format: %s - %s' %
                               (self._format_hostname(name), request.json()))
        return record['record']
856923
def _update_record(self, identifier=None, rtype=None, name=None, content=None):
        """"""
        return self._change_record_sets('UPSERT', rtype, name, content)
55915
public static void updateAll(DataStore dataStore, Iterable<Update> updates) {
        updateAll(dataStore, updates.iterator(), ImmutableSet.<String>of());
    }
500756
def update(self, field_dict, where_clause=None):
        '''
        
        '''
        query = '''
        UPDATE %s SET %s
        ''' % (
            self._name,
            ','.join('%s=:%s' % (k, k) for k in field_dict)
        )
        if where_clause:
            query += ' WHERE %s' % (where_clause)
        self._cursor.execute(query, field_dict)
        self._connection.commit()
646006
def updateAllKeys(self):
        """"""
        for kf, key in zip(self.kf_list, self.sorted_key_list()):
            kf.update(key, self.dct[key])
659028
def update_records(self, headers, zoneID, updateRecords):
        """"""
        IP = requests.get(self.GET_EXT_IP_URL).text
        message = True
        errorsRecords = []
        sucessRecords = []
        for record in updateRecords:
            updateEndpoint = '/' + zoneID + '/dns_records/' + record[0]
            updateUrl = self.BASE_URL + updateEndpoint
            data = json.dumps({
                'id': zoneID,
                'type': record[2],
                'name': record[1],
                'content': IP,
                'proxied': record[4]
                })
            if record[3] != IP and record[2] == 'A':
                result = requests.put(updateUrl,
                    headers=headers, data=data).json()
                if result['success'] == True:
                    sucessRecords.append(record[1])
                else:
                    errorsRecords.append(record[1])
                if errorsRecords != []:
                    message = ("There was an error updating these records: "
                        + str(errorsRecords) + " , the rest is OK.")
                else:
                    message = ("These records got updated: "
                        + str(sucessRecords))
        return message
807805
public function updateUuids()
    {
        $allRecords = $this->all();

        if ($allRecords) {
            foreach($allRecords as $record) {
                $activeRecord = $this->find($record->id);
                $activeRecord->update([
                    $this->getUuidColumn() => uuid()
                ]);
            }
        }
    }
183833
def batch_upsert_records(session, table, records):
    """"""
    if not records:
        return
    for record_batch in _batch_postgres_query(table, records):
        stmt = insert(table.__table__)
        stmt = stmt.on_conflict_do_update(
            constraint=table.__table__.primary_key,
            set_={
                "keys": stmt.excluded.get("keys"),
                "values": stmt.excluded.get("values"),
            },
        )
        session.execute(stmt, record_batch)
        session.commit()
810298
def update_record(self, domain, record, data=None, priority=None, ttl=None,
            comment=None):
        
        return domain.update_record(record, data=data, priority=priority,
                ttl=ttl, comment=comment)
1346752
def update(self,o):
        """"""

        self.open()

        try:
            self._db.update(o._db)
        except AttributeError:
            self._db.update(o)
516591
def update(connection, silent, hgnc_file_path, hcop_file_path, low_memory):
    """"""
    database.update(connection=connection,
                    silent=silent,
                    hgnc_file_path=hgnc_file_path,
                    hcop_file_path=hcop_file_path,
                    low_memory=low_memory)