向结果集中添加一个新记录
@param Record $record
510999
public function add(Record $record): void
    {
        $class = $this->recordClass;
        $this->rows[] = new $class($record->toArray());
    }
803498
protected function write(array $record)
    {
        if ($this->url && !file_exists($this->url)) {
            $this->stream = null;
        }
        parent::write($record);
    }
1315286
public void init(Record record, Record recordToUpdate, boolean bRefreshAfterUpdate, boolean bUpdateOnClose, boolean bUpdateOnUpdate)
    {
        m_recordToUpdate = recordToUpdate;
        m_bRefreshAfterUpdate = bRefreshAfterUpdate;
        m_bUpdateOnClose = bUpdateOnClose;
        m_bUpdateOnUpdate = bUpdateOnUpdate;
        super.init(record);
    }
683452
protected function updateRecordStats(Record $record, $score)
    {
        $record->setAvgScore(
            (($record->getAvgScore() * $record->getNbFinish()) + $score) / ($record->getNbFinish() + 1)
        );
        $record->setNbFinish($record->getNbFinish() + 1);
    }
769044
protected function reload_from_record($record, $clean = false) {
        $this->id           = $record->id;
        if (!property_exists($record, 'description')) {
            if (property_exists($record, 'comment')) {
                $record->description = $record->comment;
                unset($record->comment);
            }
        }
        if ($clean) {
            $this->name         = clean_param($record->name, PARAM_TEXT);
            $this->description  = clean_text($record->description);
        } else {
            $this->name         = $record->name;
            $this->description  = $record->description;
        }
        $this->pathmatch    = $record->pathmatch;
        $this->enabled      = $record->enabled;
        if (isset($record->sortorder)) {
            $this->sortorder = $record->sortorder;
        }
        $this->config       = json_decode($record->configdata);
        $this->dirty        = false;
        $this->steps        = [];

        return $this;
    }
635072
public function update(Record $record, Entity $entity)
    {
        (new UpdateRecord($record, $entity, $this))->execute();

        return $this;
    }
416045
protected function write(array $record): void
    {
        if ($record['level'] < Logger::NOTICE) {
            $this->handleDebugRecord($record);
        } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Throwable) {
            $this->handleExceptionRecord($record);
        } else {
            $this->handleErrorRecord($record);
        }
    }
268948
public function addRecord($record)
    {
        if ((isset($this->DBFHeader)) && (is_array($this->DBFHeader))) {
            $record->updateDBFInfo($this->DBFHeader);
        }

        $this->fileLength += ($record->getContentLength() + 4);
        $this->records[] = $record;
        $this->records[count($this->records) - 1]->recordNumber = count($this->records);

        $this->updateBBox('x', $record->SHPData);
        $this->updateBBox('y', $record->SHPData);

        if (in_array($this->shapeType, [11, 13, 15, 18, 21, 23, 25, 28])) {
            $this->updateBBox('m', $record->SHPData);
        }

        if (in_array($this->shapeType, [11, 13, 15, 18])) {
            $this->updateBBox('z', $record->SHPData);
        }

        return count($this->records) - 1;
    }
817858
public function add(RecordInterface $record): self
    {
        $this->assertValid($record);
        $this->loadData(true)->instances[] = $record;

        return $this;
    }
651952
def setRecord(self, record):
        
        self._record = record
        if record is not None:
            self.loadValues(record.recordValues(autoInflate=True))
        else:
            self.loadValues({})
37218
public function add(string $name, Record $record): void
    {
        $this->validateIdFormat($name);
        $this->preventOverwrite($name);
        $this->records[$name] = $record;
    }
677921
public function processRecord(Record $record)
    {
        $extraData = $record->getExtra();
        $extraData['memoryUsage'] = memory_get_usage(true);
        $record->setExtra($extraData);
    }
664079
public function setValue($value, $record = null) {
		if ($value != $this->value) {
			$this->changed = true;
		}
		$this->value = $value;
	}
513519
public static function update($table, $record, $condition = null)
    {
        if(empty($record) || empty($condition)) return null;

        $query = array("UPDATE $table SET ");
        array_push($query, implode('=? , ', array_keys($record)));
        array_push($query, "=? WHERE $condition");
        return implode($query);
    }
1083245
public function setValue($value, $record = null)
    {
        FrontendEditing::setValue($this, $value, $record);
        parent::setValue($value, $record);
    }
516911
protected function removeRecord (Record $record) 
    {
        $index = array_search($record, $this->_records, true);
        if ($index === false) {
            throw new InvalidArgumentException("{$this} does not contain {$record}");
        }
        unset($this->_records[$index]);
    }
133504
public function fillRecord(Record $record)
    {
        /**
         * Get record from right entity.
         */
        $rightRecord = $this->getRightRecord(
            $this->getRightEntity(),
            $this->primaryKey,
            $record->{$this->foreignKey}
        );

        /**
         * Set relation.
         */
        $record->setRelation($this->fill, $rightRecord);

        /**
         * Fill relations.
         */
        $this->fillRecordWithRelations($record);
    }