Exemplo n.º 1
0
 /**
  * @return array
  */
 protected function getTables()
 {
     $tables = [];
     foreach ($this->structure->getTables() as $table) {
         if ($table['view'] === FALSE) {
             foreach ($this->structure->getColumns($table['name']) as $column) {
                 $tables[$table['name']][$column['name']] = \Nette\Database\Helpers::detectType($column['nativetype']);
             }
         }
     }
     return $tables;
 }
Exemplo n.º 2
0
 private function getCachedTableList()
 {
     if (!$this->cacheTableList) {
         $this->cacheTableList = array_flip(array_map(function ($pair) {
             return isset($pair['fullName']) ? $pair['fullName'] : $pair['name'];
         }, $this->structure->getTables()));
     }
     return $this->cacheTableList;
 }