Commit 15427bec authored by Jean-Paul Smets's avatar Jean-Paul Smets

new transaction / distribute API


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@318 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 616f19cc
<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
max_rows:1
max_cache:0
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">
\ No newline at end of file
<dtml-if method_id>AND method_id = <dtml-sqlvar method_id type="string"></dtml-if>
......@@ -8,16 +8,12 @@ class_name:
class_file:
</dtml-comment>
<params></params>
# Host:
# Database: test
# Table: 'stock'
#
CREATE TABLE `message` (
`path` VARCHAR(255),
`method_id` VARCHAR(40),
`processing_node` INT DEFAULT -1,
`message` BLOB,
`processing_node` INT DEFAULT NULL,
KEY `path` (`path`),
KEY `processing_node` (`processing_node`),
KEY `method_id` (`method_id`),
KEY `processing_node` (`processing_node`),
) TYPE = InnoDB;
......@@ -8,10 +8,11 @@ class_name:
class_file:
</dtml-comment>
<params>path
method_id</params>
method_id
processing_node</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>
<dtml-if processing_node>AND processing_node = <dtml-sqlvar processing_node type="int"></dtml-if>
<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
......@@ -7,8 +7,10 @@ cache_time:0
class_name:
class_file:
</dtml-comment>
<params></params>
<params>processing_node</params>
SELECT * FROM
message
<dtml-if processing_node>
WHERE
processing_node is NULL
processing_node = <dtml-sqlvar processing_node type="int">
</dtml-if>
\ No newline at end of file
......@@ -8,12 +8,13 @@ class_name:
class_file:
</dtml-comment>
<params>path
method_id</params>
method_id
processing_node</params>
SELECT * FROM
message
<dtml-if "path or method_id">
<dtml-if "path or method_id or processing_node">
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 processing_node> processing_node = <dtml-sqlvar processing_node type="int"> </dtml-if>
<dtml-if path><dtml-if processing_node>AND</dtml-if> path = <dtml-sqlvar path type="string"></dtml-if>
<dtml-if method_id><dtml-if "processing_node or path">AND</dtml-if> method_id = <dtml-sqlvar method_id type="string"></dtml-if>
</dtml-if>
\ No newline at end of file
<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
......@@ -12,4 +12,4 @@ 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);
(<dtml-sqlvar path type="string">,<dtml-sqlvar method_id type="string">,-1,<dtml-sqlvar message type="string">);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment