public function getTables()
{
$res = $this->query('SELECT * FROM cat');
$tables = [];
while ($row = $res->fetch(FALSE)) {
if ($row[1] === 'TABLE' || $row[1] === 'VIEW') {
$tables[] = ['name' => $row[0], 'view' => $row[1] === 'VIEW'];
}
}
return $tables;
}