SQLQueue_writeMessageList.zsql 1.42 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11
<dtml-comment>
title:
connection_id:cmf_activity_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_file:
</dtml-comment>
<params>uid_list
path_list
12
active_process_uid_list
13 14 15 16 17 18 19 20 21
method_id_list
message_list
priority_list
processing_node_list
date_list
tag_list
serialization_tag_list
</params>
INSERT INTO message_queue
22
(uid, path, active_process_uid, date, method_id, processing_node, processing, priority, tag, serialization_tag, message)
23 24 25 26 27 28
VALUES
<dtml-in prefix="loop" expr="_.range(_.len(path_list))">
<dtml-if sequence-start><dtml-else>,</dtml-if>
(
  <dtml-sqlvar expr="uid_list[loop_item]" type="int">,
  <dtml-sqlvar expr="path_list[loop_item]" type="string">,
29
  <dtml-sqlvar expr="active_process_uid_list[loop_item]" type="int" optional>,
30
  <dtml-if expr="date_list is not None"><dtml-if expr="date_list[loop_item] is not None"><dtml-sqlvar expr="date_list[loop_item]" type="datetime"><dtml-else>UTC_TIMESTAMP()</dtml-if><dtml-else>UTC_TIMESTAMP()</dtml-if>,
31
  <dtml-sqlvar expr="method_id_list[loop_item]" type="string">,
32
  <dtml-if expr="processing_node_list is not None"><dtml-sqlvar expr="processing_node_list[loop_item]" type="int"><dtml-else>-1</dtml-if>,
33 34 35 36 37 38 39
  0,
  <dtml-sqlvar expr="priority_list[loop_item]" type="int">,
  <dtml-sqlvar expr="tag_list[loop_item]" type="string">,
  <dtml-sqlvar expr="serialization_tag_list[loop_item]" type="string">,
  <dtml-sqlvar expr="message_list[loop_item]" type="string">
)
</dtml-in>