Skip to content

Commit 257a01b

Browse files
author
Yevhen Chornohradskyi
committed
Use database name in AbstractPlatform::getListTablesSQL()
1 parent c31d275 commit 257a01b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ClickHousePlatform.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -1055,9 +1055,13 @@ public function getListTableColumnsSQL($table, $database = null) : string
10551055
/**
10561056
* {@inheritDoc}
10571057
*/
1058-
public function getListTablesSQL() : string
1058+
public function getListTablesSQL(string $database = null) : string
10591059
{
1060-
return "SELECT database, name FROM system.tables WHERE database != 'system' AND engine != 'View'";
1060+
$sql = empty($database)
1061+
? "SELECT database, name FROM system.tables WHERE database != 'system' AND engine != 'View'"
1062+
: "SELECT database, name FROM system.tables WHERE database == '$database' AND engine != 'View'";
1063+
1064+
return $sql;
10611065
}
10621066

10631067
/**

0 commit comments

Comments
 (0)