Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function getTables()
 {
     $prefix = $this->db->tableName('');
     $prefixLength = strlen($prefix);
     $result = $this->db->query('SHOW TABLES');
     $tables = array();
     while ($row = $result->fetchRow()) {
         $name = $row[0];
         if (substr($name, 0, $prefixLength) == $prefix) {
             $name = substr($name, $prefixLength);
             $tables[] = Utilities::underscoresToCamelCase($name);
         }
     }
     return $tables;
 }
Пример #2
0
 /**
  * {@inheritdoc}
  */
 public function getTables()
 {
     $prefix = $this->db->tableName('');
     $prefixLength = strlen($prefix);
     $result = $this->db->query("SELECT tablename FROM pg_catalog.pg_tables WHERE schemaname = 'public'");
     $tables = array();
     while ($row = $result->fetchRow()) {
         $name = $row[0];
         if (substr($name, 0, $prefixLength) == $prefix) {
             $name = substr($name, $prefixLength);
             $tables[] = Utilities::underscoresToCamelCase($name);
         }
     }
     return $tables;
 }