1 | <?php |
||
16 | class SQLiteDriver extends AbstractDriver 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) |
|
50 | |||
51 | /** |
||
52 | * Prepares the defined columns. |
||
53 | * |
||
54 | * @param string $tableName |
||
55 | * @param mixed $row |
||
56 | * @return void |
||
57 | */ |
||
58 | 12 | protected function setColumn($tableName, $row) |
|
72 | |||
73 | /** |
||
74 | * Shows the list of tables. |
||
75 | * |
||
76 | * @return array |
||
77 | */ |
||
78 | 6 | public function showTables() |
|
95 | |||
96 | /** |
||
97 | * Sets the properties of the specified column if it does exists. |
||
98 | * |
||
99 | * @param string $tableName |
||
100 | * @param \Rougin\Describe\Column &$column |
||
101 | * @return void |
||
102 | */ |
||
103 | 12 | protected function setForeignColumn($tableName, Column &$column) |
|
119 | |||
120 | /** |
||
121 | * Sets the properties of the specified column. |
||
122 | * |
||
123 | * @param mixed $row |
||
124 | * @param \Rougin\Describe\Column &$column |
||
125 | * @return void |
||
126 | */ |
||
127 | 12 | protected function setProperties($row, Column &$column) |
|
138 | } |
||
139 |