| Total Complexity | 8 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class QueryBase implements QueryBaseContract |
||
| 11 | { |
||
| 12 | use QueryStack,ColumnsProcess; |
||
|
|
|||
| 13 | |||
| 14 | /** |
||
| 15 | * @return mixed |
||
| 16 | */ |
||
| 17 | protected function connection() |
||
| 18 | { |
||
| 19 | return $this->getConnection(); |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @return array|mixed |
||
| 24 | */ |
||
| 25 | public function getTables() |
||
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param array $tables |
||
| 41 | * @return ColumnsProcessContract |
||
| 42 | */ |
||
| 43 | public function getColumns($tables=array()) |
||
| 44 | { |
||
| 45 | $tableList = (count($tables)) ? $tables : $this->getTables(); |
||
| 46 | |||
| 47 | $list = []; |
||
| 48 | |||
| 49 | foreach ($tableList as $table){ |
||
| 50 | |||
| 51 | if(in_array($table,$this->getTables())){ |
||
| 52 | $list[$table] = $this->showColumnsFrom($table); |
||
| 53 | } |
||
| 54 | } |
||
| 55 | |||
| 56 | $this->columnsProcess($list); |
||
| 57 | |||
| 58 | return $this; |
||
| 59 | |||
| 60 | } |
||
| 61 | |||
| 62 | public function createTable() |
||
| 64 | |||
| 65 | } |
||
| 66 | } |
||
| 68 |