Appearance
DbalRowWriter
php
final readonly class StanislasPoisson\FrenchPostalCode\Symfony\Doctrine\DbalRowWriter implements RowWriterWrites the rows of the loader with DBAL: one statement per block of rows.
DBAL has no portable upsert, so the statement depends on the platform: ON DUPLICATE KEY UPDATE for MySQL and MariaDB, ON CONFLICT DO UPDATE for PostgreSQL and SQLite. Another platform is refused, not guessed.
Source: src/Symfony/Doctrine/DbalRowWriter.php
Methods
__construct()
php
public function __construct(Connection $connection, string $prefix)count()
php
public function count(string $table): intlinkReplacedCities()
php
public function linkReplacedCities(array $links): void| Parameter | Description |
|---|---|
$links | identifier of a city => identifier of the city that replaces it |
transaction()
php
public function transaction(callable $callback): voidupsert()
php
public function upsert(string $table, array $rows, array $updateColumns): void