function Connection::escapeTable

Same name in this branch
  1. 8.9.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::escapeTable()
Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::escapeTable()
  2. 10 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::escapeTable()
  3. 9 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::escapeTable()

File

core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php, line 267

Class

Connection
PostgreSQL implementation of \Drupal\Core\Database\Connection.

Namespace

Drupal\Core\Database\Driver\pgsql

Code

public function escapeTable($table) {
  $escaped = parent::escapeTable($table);
  // Ensure that each part (database, schema and table) of the table name is
  // properly and independently escaped.
  $parts = explode('.', $escaped);
  $parts = array_map([
    $this,
    'doEscape',
  ], $parts);
  $escaped = implode('.', $parts);
  return $escaped;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.