diff --git a/product/CMFActivity/skins/activity/SQLDict_createMessageTable.zsql b/product/CMFActivity/skins/activity/SQLDict_createMessageTable.zsql new file mode 100755 index 0000000000000000000000000000000000000000..2cc6a0439082febcc7dadd22dcc8a98edd931a67 --- /dev/null +++ b/product/CMFActivity/skins/activity/SQLDict_createMessageTable.zsql @@ -0,0 +1,23 @@ +<dtml-comment> +title: +connection_id:erp5_sql_connection +max_rows:1000 +max_cache:100 +cache_time:0 +class_name: +class_file: +</dtml-comment> +<params></params> +# Host: +# Database: test +# Table: 'stock' +# +CREATE TABLE `message` ( + `path` VARCHAR(255), + `method_id` VARCHAR(40), + `message` BLOB, + `processing_node` INT DEFAULT NULL, + KEY `path` (`path`), + KEY `processing_node` (`processing_node`), + KEY `method_id` (`method_id`), +) TYPE = InnoDB; diff --git a/product/CMFActivity/skins/activity/SQLDict_delMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_delMessage.zsql new file mode 100755 index 0000000000000000000000000000000000000000..c347a15842b2c8822b2522eb492b585d224a323d --- /dev/null +++ b/product/CMFActivity/skins/activity/SQLDict_delMessage.zsql @@ -0,0 +1,17 @@ +<dtml-comment> +title: +connection_id:erp5_sql_connection +max_rows:1000 +max_cache:100 +cache_time:0 +class_name: +class_file: +</dtml-comment> +<params>path +method_id</params> +DELETE FROM + message +WHERE + path = <dtml-sqlvar path type="string"> +<dtml-if method_id>AND method_id = <dtml-sqlvar method_id type="string"></dtml-if> + diff --git a/product/CMFActivity/skins/activity/SQLDict_hasMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_hasMessage.zsql new file mode 100755 index 0000000000000000000000000000000000000000..c0ab4f46fa5be6946c0aa1fe67690c9e0c4bdad1 --- /dev/null +++ b/product/CMFActivity/skins/activity/SQLDict_hasMessage.zsql @@ -0,0 +1,19 @@ +<dtml-comment> +title: +connection_id:erp5_sql_connection +max_rows:1 +max_cache:100 +cache_time:1 +class_name: +class_file: +</dtml-comment> +<params>path +method_id</params> +SELECT count(path) as message_count FROM + message +<dtml-if "path or method_id"> +WHERE +<dtml-if path> path = <dtml-sqlvar path type="string"></dtml-if> +<dtml-if method_id>AND method_id = <dtml-sqlvar method_id type="string"></dtml-if> +</dtml-if> + diff --git a/product/CMFActivity/skins/activity/SQLDict_lockMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_lockMessage.zsql new file mode 100755 index 0000000000000000000000000000000000000000..1d058479a3a63f5747c5e07565c033feca28c682 --- /dev/null +++ b/product/CMFActivity/skins/activity/SQLDict_lockMessage.zsql @@ -0,0 +1,11 @@ +<dtml-comment> +title: +connection_id:erp5_sql_connection +max_rows:1000 +max_cache:100 +cache_time:0 +class_name: +class_file: +</dtml-comment> +<params></params> +LOCK TABLES message WRITE diff --git a/product/CMFActivity/skins/activity/SQLDict_processMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_processMessage.zsql new file mode 100755 index 0000000000000000000000000000000000000000..f5051f30514d7d920d3c693795614171596e5124 --- /dev/null +++ b/product/CMFActivity/skins/activity/SQLDict_processMessage.zsql @@ -0,0 +1,17 @@ +<dtml-comment> +title: +connection_id:erp5_sql_connection +max_rows:1000 +max_cache:100 +cache_time:0 +class_name: +class_file: +</dtml-comment> +<params>path +method_id +processing_node</params> +UPDATE message +SET processing_node=<dtml-sqlvar processing_node type="int"> +WHERE + path = <dtml-sqlvar path type="string"> +<dtml-if method_id>AND method_id = <dtml-sqlvar method_id type="string"></dtml-if> diff --git a/product/CMFActivity/skins/activity/SQLDict_readMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_readMessage.zsql new file mode 100755 index 0000000000000000000000000000000000000000..b6436bbf6410dc312372c629d47f2b51a1a6fe30 --- /dev/null +++ b/product/CMFActivity/skins/activity/SQLDict_readMessage.zsql @@ -0,0 +1,14 @@ +<dtml-comment> +title: +connection_id:erp5_sql_connection +max_rows:1 +max_cache:0 +cache_time:0 +class_name: +class_file: +</dtml-comment> +<params></params> +SELECT * FROM + message +WHERE + processing_node is NULL diff --git a/product/CMFActivity/skins/activity/SQLDict_readMessageList.zsql b/product/CMFActivity/skins/activity/SQLDict_readMessageList.zsql new file mode 100755 index 0000000000000000000000000000000000000000..d6e23a56af614f7b5b0f545603b37f081c2c6cb6 --- /dev/null +++ b/product/CMFActivity/skins/activity/SQLDict_readMessageList.zsql @@ -0,0 +1,19 @@ +<dtml-comment> +title: +connection_id:erp5_sql_connection +max_rows:1000 +max_cache:0 +cache_time:0 +class_name: +class_file: +</dtml-comment> +<params>path +method_id</params> +SELECT * FROM + message +<dtml-if "path or method_id"> +WHERE +<dtml-if path> path = <dtml-sqlvar path type="string"></dtml-if> +<dtml-if method_id>AND method_id = <dtml-sqlvar method_id type="string"></dtml-if> +</dtml-if> + diff --git a/product/CMFActivity/skins/activity/SQLDict_unlockMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_unlockMessage.zsql new file mode 100755 index 0000000000000000000000000000000000000000..73ca876698a995ca2c9d3ded6834dad87b01e542 --- /dev/null +++ b/product/CMFActivity/skins/activity/SQLDict_unlockMessage.zsql @@ -0,0 +1,11 @@ +<dtml-comment> +title: +connection_id:erp5_sql_connection +max_rows:1000 +max_cache:100 +cache_time:0 +class_name: +class_file: +</dtml-comment> +<params></params> +UNLOCK TABLES diff --git a/product/CMFActivity/skins/activity/SQLDict_writeMessage.zsql b/product/CMFActivity/skins/activity/SQLDict_writeMessage.zsql new file mode 100755 index 0000000000000000000000000000000000000000..a1803e2a146c50722412bb338a3bbd913e0c0fde --- /dev/null +++ b/product/CMFActivity/skins/activity/SQLDict_writeMessage.zsql @@ -0,0 +1,15 @@ +<dtml-comment> +title: +connection_id:erp5_sql_connection +max_rows:1000 +max_cache:100 +cache_time:0 +class_name: +class_file: +</dtml-comment> +<params>path +method_id +message</params> +INSERT INTO message +VALUES + (<dtml-sqlvar path type="string">,<dtml-sqlvar method_id type="string">,<dtml-sqlvar message type="string">,NULL);