Final Class Yiisoft\Db\Mysql\Column\ColumnDefinitionParser
| Inheritance | Yiisoft\Db\Mysql\Column\ColumnDefinitionParser » Yiisoft\Db\Syntax\ColumnDefinitionParser |
|---|
Parses column definition string. For example, string(255) or int unsigned.
Psalm Types
| Name | Value |
|---|---|
| ExtraInfo | array{characterSet?: string, check?: string, collate?: string, comment?: string, defaultValueRaw?: string, extra?: string, notNull?: boolean, unique?: boolean, unsigned?: boolean} |
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| extraInfo() | Yiisoft\Db\Mysql\Column\ColumnDefinitionParser |
Method Details
| protected array extraInfo ( string $extra ) | ||
| $extra | string | |
protected function extraInfo(string $extra): array
{
$info = parent::extraInfo($extra);
if (empty($info['extra'])) {
return $info;
}
$extra = $this->parseStringValue($info['extra'], '/\s*\b(?:CHARACTER SET|CHARSET)\s+(\S+)/i', 'characterSet', $info);
/** @psalm-var ExtraInfo $info */
if (!empty($extra)) {
$info['extra'] = $extra;
} else {
unset($info['extra']);
}
return $info;
}
Signup or Login in order to comment.