Commit 863850df authored by Yoshinori Okuji's avatar Yoshinori Okuji

Initial import.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2926 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent e5617f02
<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_
</dtml-comment>
<params></params>
DROP TABLE delivery
<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_
</dtml-comment>
<params></params>
DROP TABLE item
<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_
</dtml-comment>
<params>uid</params>
DELETE FROM item WHERE <dtml-sqltest uid op=eq type=int>
<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_
</dtml-comment>
<params>isMovement
uid
getAggregateUidList
getDestinationUid
getDestinationSectionUid
getResourceUid
getStopDate
getVariationText</params>
<dtml-if isMovement>
<dtml-if isAccountable>
<dtml-if getAggregateUidList>
INSERT INTO item VALUES <dtml-in getAggregateUidList>(
<dtml-sqlvar uid type="int">,
<dtml-sqlvar getStopDate type="string" optional>,
<dtml-sqlvar getDestinationUid type="int" optional>,
<dtml-sqlvar getDestinationSectionUid type="int" optional>,
<dtml-sqlvar getResourceUid type="int" optional>,
<dtml-sqlvar sequence-item type="int" optional>,
<dtml-sqlvar getVariationText type="string" optional>
)<dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>;
</dtml-if>
</dtml-if>
</dtml-if>
<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_
</dtml-comment>
<params>isMovement
uid
getStopDate
getDestinationUid
getDestinationSectionUid
getResourceUid
getVariationText
getAggregateUidList</params>
<dtml-let movement_list="[]">
<dtml-in prefix="loop" expr="_.range(_.len(uid))">
<dtml-if "isMovement[loop_item]">
<dtml-call expr="movement_list.append(loop_item)">
</dtml-if>
</dtml-in>
<dtml-if expr="len(movement_list) > 0">
INSERT INTO
item
VALUES
<dtml-in prefix="loop" expr="movement_list">
<dtml-if getAggregateUidList><dtml-in getAggregateUidList>
(
<dtml-sqlvar expr="uid[loop_item]" type="int">,
<dtml-sqlvar expr="getStopDate[loop_item]" type="string" optional>,
<dtml-sqlvar expr="getDestinationUid[loop_item]" type="int" optional>,
<dtml-sqlvar expr="getDestinationSectionUid[loop_item]" type="int" optional>,
<dtml-sqlvar expr="getResourceUid[loop_item]" type="int" optional>,
<dtml-sqlvar sequence-item type="int" optional>,
<dtml-sqlvar expr="getVariationText[loop_item]" type="string" optional>,
)
<dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in></dtml-if>
<dtml-if sequence-end><dtml-else>,</dtml-if>
</dtml-in>
</dtml-if>
</dtml-let>
<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_
</dtml-comment>
<params></params>
CREATE TABLE `delivery` (
`uid` int(11) default '0',
`source_uid` int(11) default '0',
`destination_uid` int(11) default '0',
`source_section_uid` int(11) default '0',
`destination_section_uid` int(11) default '0',
`resource_uid` int(11) default '0',
`start_date` datetime default NULL,
`stop_date` datetime default NULL,
KEY `uid` (`uid`),
KEY `source_uid` (`source_uid`),
KEY `destination_uid` (`destination_uid`),
KEY `source_section_uid` (`source_section_uid`),
KEY `destination_section_uid` (`destination_section_uid`),
KEY `resource_uid` (`resource_uid`)
) TYPE=InnoDB
<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_
</dtml-comment>
<params></params>
# Host:
# Database: test
# Table: 'item'
#
CREATE TABLE `item` (
`uid` int(11) default '0',
`date` datetime,
`node_uid` int(11) default '0',
`section_uid` int(11) default '0',
`resource_uid` int(11) default '0',
`aggregate_uid` int(11) default '0',
`variation_text` VARCHAR(100),
KEY `uid` (`uid`),
KEY `node_uid` (`node_uid`),
KEY `section_uid` (`section_uid`),
KEY `resource_uid` (`resource_uid`),
KEY `variation_text` (`variation_text`)
) TYPE=InnoDB;
<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_file:
</dtml-comment>
<params>table_0</params>
<dtml-var table_0>.uid = stock.mirror_section_uid
\ 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>table_0</params>
<dtml-var table_0>.uid = stock.node_uid
\ 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>table_0</params>
<dtml-var table_0>.uid = stock.payment_uid
\ No newline at end of file
<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>table_0
table_1</params>
<dtml-var table_0>.uid = catalog.uid
AND <dtml-var table_1>.uid = <dtml-var table_0>.resource_uid
\ 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>table_0</params>
<dtml-var table_0>.uid = stock.resource_uid
\ 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>table_0</params>
<dtml-var table_0>.uid = stock.section_uid
\ 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>table_0</params>
<dtml-var table_0>.uid = catalog.security_uid
\ 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>table_0</params>
<dtml-var table_0>.uid = catalog.uid
\ 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_
</dtml-comment>
<params>uid</params>
DELETE FROM delivery WHERE <dtml-sqltest uid op=eq type=int>
<dtml-comment>
title:
connection_id:erp5_sql_connection
max_rows:1000
max_cache:100
cache_time:0
class_name:
class_
</dtml-comment>
<params>isDelivery
uid
getSourceUid
getDestinationUid
getSourceSectionUid
getDestinationSectionUid
getResourceUid
getStartDate
getStopDate
insert_catalog_line</params>
<dtml-if insert_catalog_line>
INSERT INTO delivery(uid) VALUES (<dtml-sqlvar uid type="int">);
<dtml-var "'\0'">
</dtml-if>
<dtml-if isDelivery>
UPDATE delivery SET
uid=<dtml-sqlvar uid type="int">,
source_uid=<dtml-sqlvar getSourceUid type="int" optional>,
destination_uid=<dtml-sqlvar getDestinationUid type="int" optional>,
source_section_uid=<dtml-sqlvar getSourceSectionUid type="int" optional>,
destination_section_uid=<dtml-sqlvar getDestinationSectionUid type="int" optional>,
resource_uid=<dtml-sqlvar getResourceUid type="int" optional>,
start_date=<dtml-sqlvar getStartDate type="string" optional>,
stop_date=<dtml-sqlvar getStopDate type="string" optional>
WHERE <dtml-sqltest uid op=eq type=int>
</dtml-if>
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