HostnotificationQuery: Apply query optimization from NotificationhistoryQuery

refs #9009
This commit is contained in:
Johannes Meyer 2015-06-11 12:34:40 +02:00
parent b235bb6982
commit f9948f5513
1 changed files with 12 additions and 0 deletions

View File

@ -65,6 +65,18 @@ class HostnotificationQuery extends IdoQuery
) )
); );
/**
* {@inheritdoc}
*/
public function whereToSql($col, $sign, $expression)
{
if ($col === 'UNIX_TIMESTAMP(hn.start_time)') {
return 'hn.start_time ' . $sign . ' ' . $this->timestampForSql($this->valueToTimestamp($expression));
} else {
return parent::whereToSql($col, $sign, $expression);
}
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */