| @@ 78-92 (lines=15) @@ | ||
| 75 | /** |
|
| 76 | * {@inheritdoc} |
|
| 77 | */ |
|
| 78 | protected function fetchColumns(): array |
|
| 79 | { |
|
| 80 | $query = "SHOW FULL COLUMNS FROM {$this->driver->identifier($this->getName())}"; |
|
| 81 | ||
| 82 | $result = []; |
|
| 83 | foreach ($this->driver->query($query) as $schema) { |
|
| 84 | $result[] = MySQLColumn::createInstance( |
|
| 85 | $this->getName(), |
|
| 86 | $schema, |
|
| 87 | $this->driver->getTimezone() |
|
| 88 | ); |
|
| 89 | } |
|
| 90 | ||
| 91 | return $result; |
|
| 92 | } |
|
| 93 | ||
| 94 | /** |
|
| 95 | * {@inheritdoc} |
|
| @@ 75-89 (lines=15) @@ | ||
| 72 | /** |
|
| 73 | * {@inheritdoc} |
|
| 74 | */ |
|
| 75 | protected function fetchReferences(): array |
|
| 76 | { |
|
| 77 | $query = "PRAGMA foreign_key_list({$this->driver->quote($this->getName())})"; |
|
| 78 | ||
| 79 | $result = []; |
|
| 80 | foreach ($this->driver->query($query) as $schema) { |
|
| 81 | $result[] = SQLiteReference::createInstance( |
|
| 82 | $this->getName(), |
|
| 83 | $this->getPrefix(), |
|
| 84 | $schema |
|
| 85 | ); |
|
| 86 | } |
|
| 87 | ||
| 88 | return $result; |
|
| 89 | } |
|
| 90 | ||
| 91 | /** |
|
| 92 | * Fetching primary keys from table. |
|
| @@ 97-111 (lines=15) @@ | ||
| 94 | /** |
|
| 95 | * {@inheritdoc} |
|
| 96 | */ |
|
| 97 | protected function fetchReferences(): array |
|
| 98 | { |
|
| 99 | $references = $this->driver->query('sp_fkeys @fktable_name = ?', [$this->getName()]); |
|
| 100 | ||
| 101 | $result = []; |
|
| 102 | foreach ($references as $schema) { |
|
| 103 | $result[] = SQlServerReference::createInstance( |
|
| 104 | $this->getName(), |
|
| 105 | $this->getPrefix(), |
|
| 106 | $schema |
|
| 107 | ); |
|
| 108 | } |
|
| 109 | ||
| 110 | return $result; |
|
| 111 | } |
|
| 112 | ||
| 113 | /** |
|
| 114 | * {@inheritdoc} |
|