function Schema::getSequenceName
Retrieves a sequence name that is owned by the table and column..
Parameters
string $table: A table name that is not prefixed or quoted.
string $column: The column name.
Return value
string|null The name of the sequence or NULL if it does not exist.
1 call to Schema::getSequenceName()
- Schema::changeField in core/
modules/ pgsql/ src/ Driver/ Database/ pgsql/ Schema.php - Change a field definition.
File
-
core/
modules/ pgsql/ src/ Driver/ Database/ pgsql/ Schema.php, line 1108
Class
- Schema
- PostgreSQL implementation of \Drupal\Core\Database\Schema.
Namespace
Drupal\pgsql\Driver\Database\pgsqlCode
protected function getSequenceName(string $table, string $column) : ?string {
return $this->connection
->query("SELECT pg_get_serial_sequence(:table, :column)", [
':table' => $this->defaultSchema . '.' . $this->connection
->getPrefix() . $table,
':column' => $column,
])
->fetchField();
}