SQLDict_validateMessageList.zsql 1.13 KB
Newer Older
1 2
<dtml-comment>
title:
3
connection_id:cmf_activity_sql_connection
4 5 6 7 8 9 10 11 12
max_rows:1000
max_cache:0
cache_time:0
class_name:
class_file:
</dtml-comment>
<params>method_id
message_uid
path
13
tag
14
count
15
serialization_tag
16 17
</params>
SELECT
18
<dtml-if expr="count">
19 20 21 22
    COUNT(*) AS uid_count
<dtml-else>
    *
</dtml-if>
23 24 25
FROM
    message
WHERE
26
    processing_node > -10
27
<dtml-if expr="method_id is not None">
28 29
    AND method_id IN (
<dtml-in method_id><dtml-sqlvar sequence-item type="string"><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>
30 31
    )
</dtml-if>
32 33
<dtml-if expr="message_uid is not None">AND uid = <dtml-sqlvar message_uid type="int"> </dtml-if>
<dtml-if expr="path is not None">
34 35
    AND path IN (
<dtml-in path><dtml-sqlvar sequence-item type="string"><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>
36 37
    )
</dtml-if>
38
<dtml-if expr="tag is not None">
39 40
    AND tag IN (
<dtml-in tag><dtml-sqlvar sequence-item type="string"><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>
41 42
    )
</dtml-if>
43
<dtml-if expr="serialization_tag is not None">
44
    AND processing_node > -1
45
    AND serialization_tag = <dtml-sqlvar serialization_tag type="string">
46
</dtml-if>