diff options
Diffstat (limited to 'library/Monitoring/Backend/Ido/Query/HostdependencyQuery.php')
-rw-r--r-- | library/Monitoring/Backend/Ido/Query/HostdependencyQuery.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/library/Monitoring/Backend/Ido/Query/HostdependencyQuery.php b/library/Monitoring/Backend/Ido/Query/HostdependencyQuery.php new file mode 100644 index 0000000..1946cbb --- /dev/null +++ b/library/Monitoring/Backend/Ido/Query/HostdependencyQuery.php @@ -0,0 +1,30 @@ +<?php + +namespace Icinga\Module\Monitoring\Backend\Ido\Query; + +class HostdependencyQuery extends IdoQuery { + + protected $columnMap = array( + 'hostdependencies' => array( + 'host_name' => 'ho1.name1 COLLATE latin1_general_ci', + 'dependent_host_name' => 'ho2.name1 COLLATE latin1_general_ci', + ), + ); + + protected function joinBaseTables() { + $this->select->from( + array('hd' => $this->prefix . 'hostdependencies'), + array() + )->join( + array('ho1' => $this->prefix . 'objects'), + 'ho1.object_id = hd.host_object_id', + array() + )->join( + array('ho2' => $this->prefix . 'objects'), + 'ho2.object_id = hd.dependent_host_object_id', + array() + ); + $this->joinedVirtualTables['hostdependencies'] = true; + } + +} |