You are here

public function Scheme::ViewExists in Drupal driver for SQL Server and SQL Azure 8.2

Check if a view exists.

Parameters

string $name:

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Scheme.php, line 191

Class

Scheme

Namespace

Drupal\Driver\Database\sqlsrv

Code

public function ViewExists($name) {
  return $this->cnn
    ->query_execute("SELECT 1 FROM INFORMATION_SCHEMA.views WHERE table_name = :name", array(
    ':name' => $name,
  ))
    ->fetchField() !== false;
}