Connection::makeSequenceName

public Connection::makeSequenceName($table, $field)

Creates the appropriate sequence name for a given table and serial field.

This information is exposed to all database drivers, although it is only useful on some of them. This method is table prefix-aware.

Parameters

string $table: The table name to use for the sequence.

string $field: The field name to use for the sequence.

Return value

string A table prefix-parsed string for the sequence name.

File

core/lib/Drupal/Core/Database/Connection.php, line 476

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

public function makeSequenceName($table, $field) {
  return $this->prefixTables('{' . $table . '}_' . $field . '_seq');
}
doc_Drupal
2016-10-29 08:55:52
Comments
Leave a Comment

Please login to continue.