public function tableNames()
    {
        if ($this->databaseType === 'mysql') {
            $sql = "SHOW TABLES";
        } elseif ($this->databaseType === 'sqlite') {
            $sql = "SELECT name FROM sqlite_master WHERE type='table'";
        } else {
            throw new \RuntimeException("Unsupported database type: '{$this->databaseType}'");
        }
        $stm = $this->query($sql);
        $r = $stm->fetchAll();

        $tables = array_map(function ($t) {
                return reset($t);
            }, $r);
        
        $this->logQuery($sql);

        return $tables;
    }
public function tableNames()
    {
        if ($this->databaseType === 'mysql') {
            $sql = "SHOW TABLES";
        } elseif ($this->databaseType === 'sqlite') {
            $sql = "SELECT name FROM sqlite_master WHERE type='table'";
        } else {
            throw new \RuntimeException("Unsupported database type: '{$this->databaseType}'");
        }
        $stm = $this->query($sql);
        $r = $stm->fetchAll();

        $tables = array_map(function ($t) {
                return reset($t);
            }, $r);
        
        $this->logQuery($sql);

        return $tables;
    }
public function tableNames ( ) { if ( $ this -> databaseType === 'mysql' ) { $ sql = "SHOW TABLES" ; } elseif ( $ this -> databaseType === 'sqlite' ) { $ sql = "SELECT name FROM sqlite_master WHERE type='table'" ; } else { throw new \ RuntimeException ( "Unsupported database type: '{$this->databaseType}'" ) ; } $ stm = $ this -> query ( $ sql ) ; $ r = $ stm -> fetchAll ( ) ; $ tables = array_map ( function ( $ t ) { return reset ( $ t ) ; } , $ r ) ; $ this -> logQuery ( $ sql ) ; return $ tables ; }
Get a list of tables in the database.

@return string[]
Get a list of tables in the database .