SqlContentEntityStorage::isColumnSerial

protected SqlContentEntityStorage::isColumnSerial($table_name, $schema_name)

Checks whether a field column should be treated as serial.

Parameters

$table_name: The name of the table the field column belongs to.

$schema_name: The schema name of the field column.

Return value

bool TRUE if the column is serial, FALSE otherwise.

See also

\Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::processBaseTable()

\Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::processRevisionTable()

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php, line 989

Class

SqlContentEntityStorage
A content entity database storage implementation.

Namespace

Drupal\Core\Entity\Sql

Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
protected function isColumnSerial($table_name, $schema_name) {
  $result = FALSE;
 
  switch ($table_name) {
    case $this->baseTable:
      $result = $schema_name == $this->idKey;
      break;
 
    case $this->revisionTable:
      $result = $schema_name == $this->revisionKey;
      break;
  }
 
  return $result;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.