function DatabaseConnection::makeSequenceName

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

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

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

Return value

A table prefix-parsed string for the sequence name.

1 call to DatabaseConnection::makeSequenceName()
DatabaseConnection_pgsql::nextId in includes/database/pgsql/database.inc
Retrieve the next id in a sequence.

File

includes/database/database.inc, line 632

Class

DatabaseConnection
Base Database API class.

Code

public function makeSequenceName($table, $field) {
    return $this->prefixTables('{' . $table . '}_' . $field . '_seq');
}

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