1 | <?php |
||
16 | class SQLiteDriver implements DriverInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $columns = []; |
||
22 | |||
23 | /** |
||
24 | * @var \PDO |
||
25 | */ |
||
26 | protected $pdo; |
||
27 | |||
28 | /** |
||
29 | * @param PDO $pdo |
||
30 | */ |
||
31 | 21 | public function __construct(\PDO $pdo) |
|
35 | |||
36 | /** |
||
37 | * Returns the result. |
||
38 | * |
||
39 | * @param string $tableName |
||
40 | * @return array |
||
41 | */ |
||
42 | 15 | public function getTable($tableName) |
|
69 | |||
70 | /** |
||
71 | * Shows the list of tables. |
||
72 | * |
||
73 | * @return array |
||
74 | */ |
||
75 | 6 | public function showTables() |
|
92 | |||
93 | /** |
||
94 | * Prepares the columns that have foreign keys. |
||
95 | * |
||
96 | * @param array &$columns |
||
97 | * @param object $row |
||
98 | */ |
||
99 | 12 | protected function setForeignColumn(array &$columns, $row) |
|
112 | |||
113 | /** |
||
114 | * Prepares the query for getting the foreign columns. |
||
115 | * |
||
116 | * @param array $columns |
||
117 | * @param string $tableName |
||
118 | * @return array |
||
119 | */ |
||
120 | 15 | protected function prepareForeignColumns(array $columns, $tableName) |
|
133 | |||
134 | /** |
||
135 | * Sets the properties of the specified column. |
||
136 | * |
||
137 | * @param mixed $row |
||
138 | * @param \Rougin\Describe\Column &$column |
||
139 | * @return void |
||
140 | */ |
||
141 | 12 | protected function setProperties($row, Column &$column) |
|
152 | } |
||
153 |