function DatabaseSchema::prefixNonTable

Create names for indexes, primary keys and constraints.

This prevents using {} around non-table names like indexes and keys.

6 calls to DatabaseSchema::prefixNonTable()
DatabaseSchema_pgsql::addUniqueKey in drupal/includes/database/pgsql/schema.inc
Add a unique key.
DatabaseSchema_pgsql::createTableSql in drupal/includes/database/pgsql/schema.inc
Generate SQL to create a new table from a Drupal schema definition.
DatabaseSchema_pgsql::dropIndex in drupal/includes/database/pgsql/schema.inc
Drop an index.
DatabaseSchema_pgsql::dropPrimaryKey in drupal/includes/database/pgsql/schema.inc
Drop the primary key.
DatabaseSchema_pgsql::dropUniqueKey in drupal/includes/database/pgsql/schema.inc
Drop a unique key.

... See full list

File

drupal/includes/database/schema.inc, line 262

Class

DatabaseSchema
Base class for database schema definitions.

Code

function prefixNonTable($table) {
  $args = func_get_args();
  $info = $this
    ->getPrefixInfo($table);
  $args[0] = $info['table'];
  return implode('_', $args);
}