Commit 08e191cf authored by Yusei Tahara's avatar Yusei Tahara

2010-06-08 yusei

* Add predicate category related keys.
* Update predicate category indexing method to support "no-left-join" version of predicate search.
* Use erp5_core revision 1601 or higher.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36094 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 44e6a06c
...@@ -23,6 +23,12 @@ ...@@ -23,6 +23,12 @@
<key> <string>_data</string> </key> <key> <string>_data</string> </key>
<value> <value>
<dictionary> <dictionary>
<item>
<key> <string>getObject</string> </key>
<value>
<dictionary/>
</value>
</item>
<item> <item>
<key> <string>isPredicate</string> </key> <key> <string>isPredicate</string> </key>
<value> <value>
...@@ -51,6 +57,7 @@ ...@@ -51,6 +57,7 @@
<string>uid</string> <string>uid</string>
<string>predicate_property_dict</string> <string>predicate_property_dict</string>
<string>isPredicate</string> <string>isPredicate</string>
<string>getObject</string>
</list> </list>
</value> </value>
</item> </item>
...@@ -69,7 +76,8 @@ ...@@ -69,7 +76,8 @@
<key> <string>arguments_src</string> </key> <key> <string>arguments_src</string> </key>
<value> <string>uid\r\n <value> <string>uid\r\n
predicate_property_dict\r\n predicate_property_dict\r\n
isPredicate</string> </value> isPredicate\r\n
getObject</string> </value>
</item> </item>
<item> <item>
<key> <string>cache_time_</string> </key> <key> <string>cache_time_</string> </key>
...@@ -130,7 +138,7 @@ INSERT INTO predicate_category VALUES \n ...@@ -130,7 +138,7 @@ INSERT INTO predicate_category VALUES \n
<dtml-in prefix="loop" expr="predicate_list">\n <dtml-in prefix="loop" expr="predicate_list">\n
<dtml-if sequence-start><dtml-else>,</dtml-if>\n <dtml-if sequence-start><dtml-else>,</dtml-if>\n
<dtml-if "predicate_property_dict[loop_item].has_key(\'membership_criterion_category_list\')">\n <dtml-if "predicate_property_dict[loop_item].has_key(\'membership_criterion_category_list\')">\n
<dtml-let uid_list="portal_categories.getCategoryParentUidList(predicate_property_dict[loop_item][\'membership_criterion_category_list\'])">\n <dtml-let uid_list="portal_categories.CategoryTool_getPreferredPredicateCategoryParentUidItemList(predicate_property_dict[loop_item][\'membership_criterion_category_list\'], getObject[loop_item])">\n
<dtml-if uid_list>\n <dtml-if uid_list>\n
<dtml-in "uid_list">\n <dtml-in "uid_list">\n
(<dtml-sqlvar expr="uid[loop_item]" type="int">, <dtml-var "_[\'sequence-item\'][0]" >, <dtml-var "_[\'sequence-item\'][1]" >, <dtml-var "_[\'sequence-item\'][2]" >)\n (<dtml-sqlvar expr="uid[loop_item]" type="int">, <dtml-var "_[\'sequence-item\'][0]" >, <dtml-var "_[\'sequence-item\'][1]" >, <dtml-var "_[\'sequence-item\'][2]" >)\n
...@@ -207,7 +215,7 @@ INSERT INTO predicate_category VALUES \n ...@@ -207,7 +215,7 @@ INSERT INTO predicate_category VALUES \n
<dtml-in prefix="loop" expr="predicate_list">\n <dtml-in prefix="loop" expr="predicate_list">\n
<dtml-if sequence-start><dtml-else>,</dtml-if>\n <dtml-if sequence-start><dtml-else>,</dtml-if>\n
<dtml-if "predicate_property_dict[loop_item].has_key(\'membership_criterion_category_list\')">\n <dtml-if "predicate_property_dict[loop_item].has_key(\'membership_criterion_category_list\')">\n
<dtml-let uid_list="portal_categories.getCategoryParentUidList(predicate_property_dict[loop_item][\'membership_criterion_category_list\'])">\n <dtml-let uid_list="portal_categories.CategoryTool_getPreferredPredicateCategoryParentUidItemList(predicate_property_dict[loop_item][\'membership_criterion_category_list\'], getObject[loop_item])">\n
<dtml-if uid_list>\n <dtml-if uid_list>\n
<dtml-in "uid_list">\n <dtml-in "uid_list">\n
(<dtml-sqlvar expr="uid[loop_item]" type="int">, <dtml-var "_[\'sequence-item\'][0]" >, <dtml-var "_[\'sequence-item\'][1]" >, <dtml-var "_[\'sequence-item\'][2]" >)\n (<dtml-sqlvar expr="uid[loop_item]" type="int">, <dtml-var "_[\'sequence-item\'][0]" >, <dtml-var "_[\'sequence-item\'][1]" >, <dtml-var "_[\'sequence-item\'][2]" >)\n
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="SQL" module="Products.ZSQLMethods.SQL"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_arg</string> </key>
<value>
<object>
<klass>
<global name="Args" module="Shared.DC.ZRDB.Aqueduct"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_data</string> </key>
<value>
<dictionary>
<item>
<key> <string>query_table</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>table_0</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>_keys</string> </key>
<value>
<list>
<string>table_0</string>
<string>query_table</string>
</list>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>arguments_src</string> </key>
<value> <string>table_0\r\n
query_table</string> </value>
</item>
<item>
<key> <string>connection_id</string> </key>
<value> <string>erp5_sql_connection</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>z_related_predicate_category</string> </value>
</item>
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
<dtml-var table_0>.uid = <dtml-var query_table>.uid\n
]]></string> </value>
</item>
<item>
<key> <string>template</string> </key>
<value>
<object>
<klass>
<global name="__newobj__" module="copy_reg"/>
</klass>
<tuple>
<global name="SQL" module="Shared.DC.ZRDB.DA"/>
</tuple>
<state>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string encoding="cdata"><![CDATA[
<string>
]]></string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>raw</string> </key>
<value> <string encoding="cdata"><![CDATA[
<dtml-var table_0>.uid = <dtml-var query_table>.uid\n
]]></string> </value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
<key>parent_strict_group_uid | category,catalog/uid/z_related_parent_strict_group</key> <key>parent_strict_group_uid | category,catalog/uid/z_related_parent_strict_group</key>
<key>parent_string_index | catalog/string_index/z_related_parent</key> <key>parent_string_index | catalog/string_index/z_related_parent</key>
<key>parent_title | catalog/title/z_related_parent</key> <key>parent_title | catalog/title/z_related_parent</key>
<key>predicate_category_base_category_uid | predicate_category/base_category_uid/z_related_predicate_category</key>
<key>predicate_category_category_strict_membership | predicate_category/category_strict_membership/z_related_predicate_category</key>
<key>predicate_category_category_uid | predicate_category/category_uid/z_related_predicate_category</key>
<key>predicate_uid | predicate/uid/z_related_predicate</key> <key>predicate_uid | predicate/uid/z_related_predicate</key>
<key>resourceType | movement,catalog/portal_type/z_related_resource_from_movement</key> <key>resourceType | movement,catalog/portal_type/z_related_resource_from_movement</key>
<key>stock_function_category_strict_membership_uid | category/category_uid/z_related_strict_membership_function_uid_from_stock</key> <key>stock_function_category_strict_membership_uid | category/category_uid/z_related_strict_membership_function_uid_from_stock</key>
......
2010-06-08 yusei
* Add predicate category related keys.
* Update predicate category indexing method to support "no-left-join" version of predicate search.
* Use erp5_core revision 1601 or higher.
2010-05-24 tatuya 2010-05-24 tatuya
* Add parent_specialise_reference related key to select simulation movements by the applied rule reference. * Add parent_specialise_reference related key to select simulation movements by the applied rule reference.
......
192 194
\ No newline at end of file \ No newline at end of file
...@@ -95,6 +95,7 @@ erp5_mysql_innodb/z_related_parent_specialise ...@@ -95,6 +95,7 @@ erp5_mysql_innodb/z_related_parent_specialise
erp5_mysql_innodb/z_related_parent_strict_group erp5_mysql_innodb/z_related_parent_strict_group
erp5_mysql_innodb/z_related_payment_uid_from_stock erp5_mysql_innodb/z_related_payment_uid_from_stock
erp5_mysql_innodb/z_related_predicate erp5_mysql_innodb/z_related_predicate
erp5_mysql_innodb/z_related_predicate_category
erp5_mysql_innodb/z_related_project_uid_from_stock erp5_mysql_innodb/z_related_project_uid_from_stock
erp5_mysql_innodb/z_related_resource_from_movement erp5_mysql_innodb/z_related_resource_from_movement
erp5_mysql_innodb/z_related_resource_uid_from_stock erp5_mysql_innodb/z_related_resource_uid_from_stock
......
...@@ -52,3 +52,6 @@ metric_type_uid | measure/metric_type_uid/z_related_metric_type ...@@ -52,3 +52,6 @@ metric_type_uid | measure/metric_type_uid/z_related_metric_type
parent_strict_group_uid | category,catalog/uid/z_related_parent_strict_group parent_strict_group_uid | category,catalog/uid/z_related_parent_strict_group
grand_grand_grand_grand_grand_parent_simulation_state | catalog,catalog,catalog,catalog,catalog,catalog/simulation_state/z_related_grand_grand_grand_grand_grand_parent grand_grand_grand_grand_grand_parent_simulation_state | catalog,catalog,catalog,catalog,catalog,catalog/simulation_state/z_related_grand_grand_grand_grand_grand_parent
parent_specialise_reference | category,catalog/reference/z_related_parent_specialise parent_specialise_reference | category,catalog/reference/z_related_parent_specialise
predicate_category_base_category_uid | predicate_category/base_category_uid/z_related_predicate_category
predicate_category_category_strict_membership | predicate_category/category_strict_membership/z_related_predicate_category
predicate_category_category_uid | predicate_category/category_uid/z_related_predicate_category
\ No newline at end of file
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