Clear row
@param mixed $record
@return \SMB\Arrayto\Base
352616
public function clearRows()
    {
        $this->downloader->clearRows();
        $this->outputter->clearRows();
        $this->writer->clearRows();

        return $this;
    }
113388
public function handle(array $record)
    {
        if (!$this->isHandling($record)) {
            return false;
        }

        if (class_exists('Drips\Debugbar\Debugbar')) {
            $debugbar = Debugbar::getInstance();
            if (!$debugbar->hasTab('logger')) {
                $debugbar->registerTab('logger', 'Logs', '<style>' . file_get_contents(__DIR__ . '/style.css') . '</style>');
            }
            $color = $this->logLevels[$record['level']];
            $channel = $record['channel'];
            $level = $record['level_name'];
            $message = $record['message'];
            $log_message = "
            <code class='drips-logger-record' style='color: $color'>
                <table>
                    <tr>
                        <td valign='top'><span class='debug-badge debug-channel'>$channel</span></td>
                        <td valign='top'><strong class='debug-badge' style='background-color: $color'>$level</strong></td>
                        <td valign='top' style='color: $color'>$message</td>
                    </tr>
                </table>
            </code>
           ";
            $debugbar->appendTab('logger', $log_message);
        }

        return false === $this->bubble;
    }
115861
public function stream_handler_for_record( array $record ) {

		list( $filename, $file_permissions ) = $this->file_name_for_record( $record );

		if ( isset( $this->handlers[ $filename ] ) ) {
			return $this->handlers[ $filename ];
		}

		$this->close();

		$handler = new StreamHandler(
			$filename,
			$this->getLevel(),
			$this->getBubble(),
			$file_permissions,
			$this->locking
		);

		$this->handlers[ $filename ] = $handler;

		return $handler;
	}
50332
private function fixBlockFieldsForPreview($record)
    {
        foreach ($record->contenttype['fields'] as $fieldSlug => $fieldSettings) {
            if ($fieldSettings['type'] === 'block') {
                $fieldValue = $this->getBlockFieldValue($record, $fieldSlug);
                if ($fieldValue) {
                    $newArray = [];
                    foreach ($fieldValue as $item) {
                        if (!empty($item)) {
                            foreach ($item as $k => &$v) {
                                $v['block'] = $k;
                            }
                            $newArray[] = $v;
                        }
                    }
                    $this->setFieldValue($record, $fieldSlug, $newArray);
                }
            }
        }

        return $record;
    }
296549
protected function preCleanRecords($records)
    {
        $new = [];
        foreach ($records as $record) {
            if (property_exists($record, $this->transactionTable)) {
                $cleaned = (array)$record->{$this->transactionTable};
                unset($cleaned[static::ID_FIELD]);
                if (property_exists($record, '_id')) {
                    $cleaned = array_merge([static::ID_FIELD => $record->_id], $cleaned);
                }
            } else {
                $cleaned = (array)$record;
            }
            $new[] = $cleaned;
        }

        return $new;
    }
989395
public function format(array $record)
    {
        $data = parent::format($record);
        return $this->toJson($data, true);
    }
408409
public function unlink(RecordInterface $record): self
    {
        $this->loadData(true);

        //Ensure reference
        $record = $this->matchOne($record) ?? $record;

        foreach ($this->instances as $index => $linked) {
            if ($this->match($linked, $record)) {
                //Removing locally
                unset($this->instances[$index]);

                if (!in_array($linked, $this->scheduled, true) || !$this->autoload) {
                    //Scheduling unlink in db when we know relation OR partial mode is on
                    $this->unlinked[] = $linked;
                }
                break;
            }
        }

        $this->instances = array_values($this->instances);

        return $this;
    }
422111
public function pushRecord(Record $record)
    {
        $this->records[] = $record;

        if (!$record->getType()->isStdin() || $record->getContent()) {
            return;
        }

        return $this->buildRequest();
    }
1360058
public function clear($clause = null)
	{
		switch ($clause)
		{
			case null:
				$this->bounded = array();

				break;
		}

		return parent::clear($clause);
	}
1243015
final public function from_record(stdClass $record) {
        $record = (array) $record;
        foreach ($record as $property => $value) {
            $this->raw_set($property, $value);
        }
        return $this;
    }
338273
public function clear($clause = '')
	{
		if (!$clause)
		{
			$this->reset();
		}
		else
		{
			$clause = 'reset' . ucfirst(strtolower($clause));

			$this->syntax->$clause();
		}

		return $this;
	}
511406
public function format(array $record)
    {
        $formattedRecord = $this->formatter->format($record);

        if (is_array($formattedRecord)) {
            list($channel, $message, $backtrace, $loglevel) = $formattedRecord;

            return [
                $channel,
                $this->formatterPrefix . $message,
                $backtrace,
                $loglevel,
            ];
        }

        return $this->formatterPrefix . $formattedRecord;
    }
1015742
public function transformRecordToEntities(Record $record)
    {
        if (get_class($record) == $this->record) {
            return $record;
        }

        $newRecord = $this->getRecord();
        $newRecord->setData($record->data());
        $newRecord->setOriginalFromData();

        if ($record->isSaved()) {
            $newRecord->setSaved();
        }

        return $newRecord;
    }
206857
protected function addRecord(array $record)
    {
        return $this->document->fputcsv($record, $this->delimiter, $this->enclosure, $this->escape);
    }
1160197
private function processDoctrineLogRecord(array $record)
    {
        if (!isset($record['context']) || empty($record['context'])) {
            return $record;
        }

        $isDatabaseQueryContext = $this->arrayContainsOnlyNumericKeys($record['context']);
        if ($isDatabaseQueryContext) {
            $record['context'] = array('query params' => $record['context']);
        }

        return $record;
    }
1189285
protected static function doesRecordContainModifier($record)
    {
        if (is_array($record)) {
            foreach ($record as $key => $value) {
                if (!empty($key) && ('$' == $key[0])) {
                    return true;
                }
            }
        }

        return false;
    }
687286
public static function insert($record)
    {
        $instance = new static();
        if ($fields = array_diff(array_keys($record), $instance->_di->modelsMetadata->getAttributes($instance))) {
            $instance->logger->debug(['insert `:1` table skip fields: :2', $instance->getSource(), array_values($fields)]);

            foreach ($fields as $field) {
                unset($record[$field]);
            }
        }

        $instance->getConnection($record)->insert($instance->getSource($record), $record);

        return 1;
    }