Ido\CommentQuery: add host/service shortcut column

This commit is contained in:
Thomas Gelf 2014-06-20 12:21:50 +02:00
parent 317094aed3
commit ecf84077e5
2 changed files with 4 additions and 0 deletions

View File

@ -44,7 +44,9 @@ class CommentQuery extends IdoQuery
'comment_is_persistent' => 'cm.is_persistent',
'comment_expiration' => 'CASE cm.expires WHEN 1 THEN UNIX_TIMESTAMP(cm.expiration_time) ELSE NULL END',
'comment_host' => 'CASE WHEN ho.name1 IS NULL THEN so.name1 ELSE ho.name1 END COLLATE latin1_general_ci',
'host' => 'CASE WHEN ho.name1 IS NULL THEN so.name1 ELSE ho.name1 END COLLATE latin1_general_ci',
'comment_service' => 'so.name2 COLLATE latin1_general_ci',
'service' => 'so.name2 COLLATE latin1_general_ci',
'comment_objecttype' => "CASE WHEN ho.object_id IS NOT NULL THEN 'host' ELSE CASE WHEN so.object_id IS NOT NULL THEN 'service' ELSE NULL END END",
)
);

View File

@ -52,6 +52,8 @@ class Comment extends DataView
'comment_expiration',
'comment_host',
'comment_service',
'host',
'service',
);
}