ServicenotificationQuery: Apply query optimization from NotificationhistoryQuery

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

View File

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