public function Scheme::TableHasXmlIndex in Drupal driver for SQL Server and SQL Azure 8.2
Check if a table already has an XML index.
Parameters
string $table: Name of the table.
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ Scheme.php, line 291
Class
Namespace
Drupal\Driver\Database\sqlsrvCode
public function TableHasXmlIndex($table) {
$info = $this
->TableDetailsGet($table);
if (isset($info['indexes']) && is_array($info['indexes'])) {
foreach ($info['indexes'] as $name => $index) {
if (strcasecmp($index['type_desc'], 'XML') === 0) {
return $name;
}
}
}
return false;
}