You are here

public function Connection::makeSequenceName in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Database/Connection.php \Drupal\Core\Database\Connection::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

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.

1 call to Connection::makeSequenceName()
Connection::nextId in core/lib/Drupal/Core/Database/Driver/pgsql/Connection.php
Retrieve a the next id in a sequence.

File

core/lib/Drupal/Core/Database/Connection.php, line 481
Contains \Drupal\Core\Database\Connection.

Class

Connection
Base Database API class.

Namespace

Drupal\Core\Database

Code

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