function DatabaseSchema_sqlite::indexExists

Overrides DatabaseSchema::indexExists

4 calls to DatabaseSchema_sqlite::indexExists()
DatabaseSchema_sqlite::addIndex in includes/database/sqlite/schema.inc
Add an index.
DatabaseSchema_sqlite::addUniqueKey in includes/database/sqlite/schema.inc
Add a unique key.
DatabaseSchema_sqlite::dropIndex in includes/database/sqlite/schema.inc
Drop an index.
DatabaseSchema_sqlite::dropUniqueKey in includes/database/sqlite/schema.inc
Drop a unique key.

File

includes/database/sqlite/schema.inc, line 575

Class

DatabaseSchema_sqlite

Code

public function indexExists($table, $name) {
    $info = $this->getPrefixInfo($table);
    return $this->connection
        ->query('PRAGMA ' . $info['schema'] . '.index_info(' . $info['table'] . '_' . $name . ')')
        ->fetchField() != '';
}

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