mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Default joinBaseTables implementation, can simplify simple queries
This commit is contained in:
parent
f3eedd919f
commit
bd983c7478
@ -118,6 +118,18 @@ abstract class AbstractQuery extends Query
|
|||||||
return array_keys($this->columnMap[$table]);
|
return array_keys($this->columnMap[$table]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function joinBaseTables()
|
||||||
|
{
|
||||||
|
$table = array_shift(array_keys($this->columnMap));
|
||||||
|
|
||||||
|
$this->baseQuery = $this->db->select()->from(
|
||||||
|
array($table => $this->prefix . $table),
|
||||||
|
array()
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->joinedVirtualTables = array($table => true);
|
||||||
|
}
|
||||||
|
|
||||||
protected function beforeCreatingCountQuery()
|
protected function beforeCreatingCountQuery()
|
||||||
{
|
{
|
||||||
$this->applyAllFilters();
|
$this->applyAllFilters();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user