Add a new record into the upgrades information table about the
        applied delta

        Parameters
        ----------
        delta: Delta
            the applied delta file
511467
def __update_upgrades_table(self, delta):
        """"""

        query = """
        INSERT INTO {} (
            --id,
            version,
            description,
            type,
            script,
            checksum,
            installed_by,
            --installed_on,
            execution_time,
            success
        ) VALUES(
            '{}',
            '{}',
            {},
            '{}',
            '{}',
            '{}',
            1,
            TRUE
        ) """.format(
            self.upgrades_table, delta.get_version(), delta.get_name(),
            delta.get_type(), delta.get_file(), delta.get_checksum(),
            self.__get_dbuser())

        self.cursor.execute(query)
        self.connection.commit()
952417
def _add_text_record(self, witness):
        
        filename = witness.get_filename()
        name, siglum = witness.get_names()
        self._logger.info('Adding record for text {}'.format(filename))
        checksum = witness.get_checksum()
        token_count = len(witness.get_tokens())
        with self._conn:
            cursor = self._conn.execute(
                constants.INSERT_TEXT_SQL,
                [name, siglum, checksum, token_count, ''])
        return cursor.lastrowid
1215280
def create_new_migration_record(self):
        
        migration_record = self.migration_model(
            name=self.name,
            version=self.latest_migration)
        self.session.add(migration_record)
        self.session.commit()
949774
def updateRecordValues(self):
        
        record = self.record()
        if not record:
            return
        
        # update the record information
        tree = self.treeWidget()
        if not isinstance(tree, XTreeWidget):
            return
        
        for column in record.schema().columns():
            c = tree.column(column.displayName())
            if c == -1:
                continue
            
            elif tree.isColumnHidden(c):
                continue
            
            else:
                val = record.recordValue(column.name())
                self.updateColumnValue(column, val, c)
        
        # update the record state information
        if not record.isRecord():
            self.addRecordState(XOrbRecordItem.State.New)
        
        elif record.isModified():
            self.addRecordState(XOrbRecordItem.State.Modified)
1280292
public int addAndGetLo(int delta) {
        while (true) {
            long encoded = get();
            int lo = getLo(encoded) + delta;
            long update = encodeLo(encoded, lo);
            if (compareAndSet(encoded, update))
                return lo;
        }
    }
397400
def _update_info(self):
        
        super(TableHDU, self)._update_info()
        if self._info['hdutype'] == IMAGE_HDU:
            mess = "Extension %s is not a Table HDU" % self.ext
            raise ValueError(mess)
        if 'colinfo' in self._info:
            self._colnames = [i['name'] for i in self._info['colinfo']]
            self._colnames_lower = [
                i['name'].lower() for i in self._info['colinfo']]
            self._ncol = len(self._colnames)
1077116
def add_or_update_records(cls, tables: I2B2Tables, records: List["ObservationFact"]) -> Tuple[int, int]:
        
        return cls._add_or_update_records(tables.crc_connection, tables.observation_fact, records)
918187
def update_record(self, zeroconf, now, record):
        """"""
        if record is not None and not record.is_expired(now):
            if record.type == _TYPE_A:
                if record.name == self.name:
                    if not record.address in self.address:
                        self.address.append(record.address)
            elif record.type == _TYPE_SRV:
                if record.name == self.name:
                    self.server = record.server
                    self.port = record.port
                    self.weight = record.weight
                    self.priority = record.priority
                    self.address = []
                    self.update_record(zeroconf, now,
                            zeroconf.cache.get_by_details(self.server,
                                _TYPE_A, _CLASS_IN))
            elif record.type == _TYPE_TXT:
                if record.name == self.name:
                    self.set_text(record.text)
1327962
def _update_record(self, identifier, rtype=None, name=None, content=None):
        
        result = False

        # TODO: some providers allow content-based updates without supplying an
        # ID, and therefore `identifier` is here optional. If we don't receive
        # an ID, look it up.
        if not identifier and rtype and name:
            records = self._list_records(rtype, name)
            if len(records) == 1:
                identifier = records[0]["id"]

        if identifier and content:
            with localzone.manage(self.filename, self.origin, autosave=True) as zone:
                if zone.update_record(identifier, content):  # pylint: disable=no-member
                    result = True

        LOGGER.debug("update_record: %s", result)
        return result
321706
def addDataset(self):
        
        self._openRepo()
        dataset = datasets.Dataset(self._args.datasetName)
        dataset.setDescription(self._args.description)
        dataset.setAttributes(json.loads(self._args.attributes))
        self._updateRepo(self._repo.insertDataset, dataset)
439789
private void upgradeDelta(TableEntry10 table, 
                            TableUpgrade upgradeTable,
                            Page10 page,
                            Delta10 delta)
    throws IOException
  {
    try (ReadStream is = openRead(page.segment().address(),
                                  page.segment().length())) {
      is.position(delta.address());
      
      long tail = delta.address() + delta.length();
      
      while (is.position() < tail) {
        upgradeDelta(is, table, upgradeTable, page);
      }
    }
  }
962425
def increment(self, counter_name, delta):
    
    current_value = self.counters.get(counter_name, 0)
    new_value = current_value + delta
    self.counters[counter_name] = new_value
    return new_value
447744
def update(self, source_file, configuration, declarations, included_files):
        

        record = record_t(
            source_signature=file_signature(source_file),
            config_signature=configuration_signature(configuration),
            included_files=included_files,
            included_files_signature=list(
                map(
                    file_signature,
                    included_files)),
            declarations=declarations)
        # Switched over to holding full record in cache so we don't have
        # to keep creating records in the next method.
        self.__cache[record.key()] = record
        self.__cache[record.key()].was_hit = True
        self.__needs_flushed = True
536064
def do_add_existing
      parent_record = nested_parent_record(:update)
      @record = active_scaffold_config.model.find(params[:associated_id])
      if parent_record && @record
        parent_record.send(nested.association.name) << @record
        parent_record.save
      else
        false
      end
    end
465908
def _add(self, ctx, table_name, record_id, column_values):
        
        vsctl_table = self._get_table(table_name)
        ovsrec_row = ctx.must_get_row(vsctl_table, record_id)
        for column, value in column_values:
            ctx.add_column(ovsrec_row, column, value)
        ctx.invalidate_cache()
737124
def add_records(self, domain, records):
        
        url = self.API_TEMPLATE + self.RECORDS.format(domain=domain)
        self._patch(url, json=records)
        self.logger.debug('Added records @ {}'.format(records))

        # If we didn't get any exceptions, return True to let the user know
        return True
36872
def update_record(self, identifier, rtype=None, name=None, content=None, **kwargs):
        
        if not rtype and kwargs.get('type'):
            warnings.warn('Parameter "type" is deprecated, use "rtype" instead.',
                          DeprecationWarning)
            rtype = kwargs.get('type')

        return self._update_record(identifier, rtype=rtype, name=name, content=content)