function PdoStore::isTableMissing
1 call to PdoStore::isTableMissing()
- PdoStore::save in vendor/
symfony/ lock/ Store/ PdoStore.php - Stores the resource if it's not locked by someone else.
File
-
vendor/
symfony/ lock/ Store/ PdoStore.php, line 232
Class
- PdoStore
- PdoStore is a PersistingStoreInterface implementation using a PDO connection.
Namespace
Symfony\Component\Lock\StoreCode
private function isTableMissing(\PDOException $exception) : bool {
$driver = $this->getDriver();
[
$sqlState,
$code,
] = $exception->errorInfo ?? [
null,
$exception->getCode(),
];
return match ($driver) { 'pgsql' => '42P01' === $sqlState,
'sqlite' => str_contains($exception->getMessage(), 'no such table:'),
'oci' => 942 === $code,
'sqlsrv' => 208 === $code,
'mysql' => 1146 === $code,
default => false,
};
}