public function getPrimaryKeySequence($table)
{
$this->needStructure();
$table = $this->resolveFQTableName($table);
if (!$this->connection->getSupplementalDriver()->isSupported(ISupplementalDriver::SUPPORT_SEQUENCE)) {
return NULL;
}
$primary = $this->getPrimaryKey($table);
if (!$primary || is_array($primary)) {
return NULL;
}
foreach ($this->structure['columns'][$table] as $columnMeta) {
if ($columnMeta['name'] === $primary) {
return isset($columnMeta['vendor']['sequence']) ? $columnMeta['vendor']['sequence'] : NULL;
}
}
return NULL;
}