Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PdoStore.php

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\Store

Code

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,
    
    };
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal