1 | <?php declare(strict_types=1); |
||
14 | final class ColumnMetadata |
||
15 | { |
||
16 | /** @var string */ |
||
17 | private $databaseName; |
||
18 | |||
19 | /** @var string */ |
||
20 | private $tableName; |
||
21 | |||
22 | /** @var string */ |
||
23 | private $columnName; |
||
24 | |||
25 | /** @var string */ |
||
26 | private $type; |
||
27 | |||
28 | /** @var int|null */ |
||
29 | private $maxLength; |
||
30 | |||
31 | /** @var bool */ |
||
32 | private $primaryKey; |
||
33 | |||
34 | /** @var bool */ |
||
35 | private $nullable; |
||
36 | |||
37 | /** @var bool */ |
||
38 | private $indexed; |
||
39 | |||
40 | |||
41 | 33 | public function __construct( |
|
60 | |||
61 | 1 | public function getDatabaseName(): string |
|
65 | |||
66 | 1 | public function getTableName(): string |
|
70 | |||
71 | 15 | public function getColumnName(): string |
|
75 | |||
76 | 6 | public function getType(): string |
|
80 | |||
81 | 1 | public function getMaxLength(): ?int |
|
85 | |||
86 | 2 | public function isPrimaryKey(): bool |
|
90 | |||
91 | 1 | public function isNullable(): bool |
|
95 | |||
96 | 1 | public function isIndexed(): bool |
|
100 | |||
101 | /** |
||
102 | * Returns true if the column is a string type. |
||
103 | * |
||
104 | * List validated against https://dev.mysql.com/doc/refman/5.7/en/string-types.html |
||
105 | */ |
||
106 | 5 | public function isStringType() |
|
130 | } |