[Erp5-report] r12061 - in /erp5/trunk/products/ERP5/bootstrap: erp5_mysql_innodb_catalog/Ca...
nobody at svn.erp5.org
nobody at svn.erp5.org
Sat Jan 13 16:33:46 CET 2007
Author: jp
Date: Sat Jan 13 16:33:42 2007
New Revision: 12061
URL: http://svn.erp5.org?rev=12061&view=rev
Log:
Add the possibility to combine report and domain sections by using table aliasing.
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_count_results.xml
erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_search_results.xml
erp5/trunk/products/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_count_results.xml
erp5/trunk/products/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_search_results.xml
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_count_results.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_count_results.xml?rev=12061&r1=12060&r2=12061&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_count_results.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_count_results.xml Sat Jan 13 16:33:42 2007
@@ -228,12 +228,12 @@
FROM\n
<dtml-in from_table_list> <dtml-var sequence-item> AS <dtml-var sequence-key><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>\n
<dtml-if selection_domain>\n
- <dtml-let expression="selection_domain.asSQLJoinExpression()">\n
+ <dtml-let expression="selection_domain.asSQLJoinExpression(category_table_alias = 'domain_category')">\n
<dtml-if expression> , <dtml-var expression> </dtml-if>\n
</dtml-let>\n
</dtml-if>\n
<dtml-if selection_report>\n
- <dtml-let expression="selection_report.asSQLJoinExpression()">\n
+ <dtml-let expression="selection_report.asSQLJoinExpression(category_table_alias = 'report_category')">\n
<dtml-if expression> , <dtml-var expression> </dtml-if>\n
</dtml-let>\n
</dtml-if>\n
@@ -243,12 +243,12 @@
AND <dtml-var where_expression>\n
</dtml-if>\n
<dtml-if selection_domain>\n
- <dtml-let expression="selection_domain.asSQLExpression()">\n
+ <dtml-let expression="selection_domain.asSQLExpression(category_table_alias = 'domain_category')">\n
<dtml-if expression> AND <dtml-var expression> </dtml-if>\n
</dtml-let>\n
</dtml-if>\n
<dtml-if selection_report>\n
- <dtml-let expression="selection_report.asSQLExpression(strict_membership=1)">\n
+ <dtml-let expression="selection_report.asSQLExpression(strict_membership=1, category_table_alias = 'report_category')">\n
<dtml-if expression> AND <dtml-var expression> </dtml-if>\n
</dtml-let>\n
</dtml-if>\n
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_search_results.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_search_results.xml?rev=12061&r1=12060&r2=12061&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_search_results.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_search_results.xml Sat Jan 13 16:33:42 2007
@@ -178,6 +178,89 @@
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
+
+SELECT DISTINCT\n
+ <dtml-in getCatalogSearchResultKeys> <dtml-var sequence-item><dtml-if sequence-end> <dtml-else>, </dtml-if> </dtml-in>\n
+ <dtml-if select_expression>,<dtml-var select_expression></dtml-if>\n
+\n
+FROM\n
+ <dtml-in from_table_list> <dtml-var sequence-item> AS <dtml-var sequence-key><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>\n
+ <dtml-if selection_domain>\n
+ <dtml-let expression="selection_domain.asSQLJoinExpression(category_table_alias = 'domain_category')">\n
+ <dtml-if expression> , <dtml-var expression> </dtml-if>\n
+ </dtml-let>\n
+ </dtml-if>\n
+ <dtml-if selection_report>\n
+ <dtml-let expression="selection_report.asSQLJoinExpression(category_table_alias = 'report_category')">\n
+ <dtml-if expression> , <dtml-var expression> </dtml-if>\n
+ </dtml-let>\n
+ </dtml-if>\n
+\n
+WHERE \n
+ 1 = 1 \n
+<dtml-if where_expression>\n
+ AND <dtml-var where_expression>\n
+</dtml-if>\n
+<dtml-if selection_domain>\n
+ <dtml-let expression="selection_domain.asSQLExpression(category_table_alias = 'domain_category')">\n
+ <dtml-if expression> AND <dtml-var expression> </dtml-if>\n
+ </dtml-let>\n
+</dtml-if>\n
+<dtml-if selection_report>\n
+ <dtml-let expression="selection_report.asSQLExpression(strict_membership=1, category_table_alias = 'report_category')">\n
+ <dtml-if expression> AND <dtml-var expression> </dtml-if>\n
+ </dtml-let>\n
+</dtml-if>\n
+<dtml-if sort_on>\n
+ORDER BY\n
+ <dtml-var sort_on>\n
+</dtml-if>\n
+<dtml-if group_by_expression>\n
+GROUP BY\n
+ <dtml-var group_by_expression>\n
+</dtml-if>\n
+<dtml-if limit_expression>\n
+LIMIT <dtml-var "limit_expression">\n
+<dtml-else>\n
+LIMIT 1000\n
+</dtml-if>\n
+
+
+]]></string> </value>
+ </item>
+ <item>
+ <key> <string>template</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="SQL" module="Shared.DC.ZRDB.DA"/>
+ </klass>
+ <none/>
+ <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[
SELECT DISTINCT\n
<dtml-in getCatalogSearchResultKeys> <dtml-var sequence-item><dtml-if sequence-end> <dtml-else>, </dtml-if> </dtml-in>\n
@@ -227,89 +310,6 @@
]]></string> </value>
- </item>
- <item>
- <key> <string>template</string> </key>
- <value>
- <object>
- <klass>
- <global name="SQL" module="Shared.DC.ZRDB.DA"/>
- </klass>
- <none/>
- <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[
-
-SELECT DISTINCT\n
- <dtml-in getCatalogSearchResultKeys> <dtml-var sequence-item><dtml-if sequence-end> <dtml-else>, </dtml-if> </dtml-in>\n
- <dtml-if select_expression>,<dtml-var select_expression></dtml-if>\n
-\n
-FROM\n
- <dtml-in from_table_list> <dtml-var sequence-item> AS <dtml-var sequence-key><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>\n
- <dtml-if selection_domain>\n
- <dtml-let expression="selection_domain.asSQLJoinExpression()">\n
- <dtml-if expression> , <dtml-var expression> </dtml-if>\n
- </dtml-let>\n
- </dtml-if>\n
- <dtml-if selection_report>\n
- <dtml-let expression="selection_report.asSQLJoinExpression()">\n
- <dtml-if expression> , <dtml-var expression> </dtml-if>\n
- </dtml-let>\n
- </dtml-if>\n
-\n
-WHERE \n
- 1 = 1 \n
-<dtml-if where_expression>\n
- AND <dtml-var where_expression>\n
-</dtml-if>\n
-<dtml-if selection_domain>\n
- <dtml-let expression="selection_domain.asSQLExpression()">\n
- <dtml-if expression> AND <dtml-var expression> </dtml-if>\n
- </dtml-let>\n
-</dtml-if>\n
-<dtml-if selection_report>\n
- <dtml-let expression="selection_report.asSQLExpression(strict_membership=1)">\n
- <dtml-if expression> AND <dtml-var expression> </dtml-if>\n
- </dtml-let>\n
-</dtml-if>\n
-<dtml-if sort_on>\n
-ORDER BY\n
- <dtml-var sort_on>\n
-</dtml-if>\n
-<dtml-if group_by_expression>\n
-GROUP BY\n
- <dtml-var group_by_expression>\n
-</dtml-if>\n
-<dtml-if limit_expression>\n
-LIMIT <dtml-var "limit_expression">\n
-<dtml-else>\n
-LIMIT 1000\n
-</dtml-if>\n
-
-
-]]></string> </value>
</item>
</dictionary>
</state>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_count_results.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_count_results.xml?rev=12061&r1=12060&r2=12061&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_count_results.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_count_results.xml Sat Jan 13 16:33:42 2007
@@ -142,12 +142,12 @@
FROM\n
<dtml-in from_table_list> <dtml-var sequence-item> AS <dtml-var sequence-key><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>\n
<dtml-if selection_domain>\n
- <dtml-let expression="selection_domain.asSQLJoinExpression()">\n
+ <dtml-let expression="selection_domain.asSQLJoinExpression(category_table_alias = 'domain_category')">\n
<dtml-if expression> , <dtml-var expression> </dtml-if>\n
</dtml-let>\n
</dtml-if>\n
<dtml-if selection_report>\n
- <dtml-let expression="selection_report.asSQLJoinExpression()">\n
+ <dtml-let expression="selection_report.asSQLJoinExpression(category_table_alias = 'report_category')">\n
<dtml-if expression> , <dtml-var expression> </dtml-if>\n
</dtml-let>\n
</dtml-if>\n
@@ -157,12 +157,12 @@
AND <dtml-var where_expression>\n
</dtml-if>\n
<dtml-if selection_domain>\n
- <dtml-let expression="selection_domain.asSQLExpression()">\n
+ <dtml-let expression="selection_domain.asSQLExpression(category_table_alias = 'domain_category')">\n
<dtml-if expression> AND <dtml-var expression> </dtml-if>\n
</dtml-let>\n
</dtml-if>\n
<dtml-if selection_report>\n
- <dtml-let expression="selection_report.asSQLExpression(strict_membership=1)">\n
+ <dtml-let expression="selection_report.asSQLExpression(strict_membership=1, category_table_alias = 'report_category')">\n
<dtml-if expression> AND <dtml-var expression> </dtml-if>\n
</dtml-let>\n
</dtml-if>\n
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_search_results.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_search_results.xml?rev=12061&r1=12060&r2=12061&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_search_results.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_search_results.xml Sat Jan 13 16:33:42 2007
@@ -170,6 +170,85 @@
<item>
<key> <string>src</string> </key>
<value> <string encoding="cdata"><![CDATA[
+
+SELECT DISTINCT\n
+ <dtml-in getCatalogSearchResultKeys> <dtml-var sequence-item><dtml-if sequence-end> <dtml-else>, </dtml-if> </dtml-in>\n
+ <dtml-if select_expression>,<dtml-var select_expression></dtml-if>\n
+\n
+FROM\n
+ <dtml-in from_table_list> <dtml-var sequence-item> AS <dtml-var sequence-key><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>\n
+ <dtml-if selection_domain>\n
+ <dtml-let expression="selection_domain.asSQLJoinExpression(category_table_alias = 'domain_category')">\n
+ <dtml-if expression> , <dtml-var expression> </dtml-if>\n
+ </dtml-let>\n
+ </dtml-if>\n
+ <dtml-if selection_report>\n
+ <dtml-let expression="selection_report.asSQLJoinExpression(category_table_alias = 'report_category')">\n
+ <dtml-if expression> , <dtml-var expression> </dtml-if>\n
+ </dtml-let>\n
+ </dtml-if>\n
+\n
+WHERE \n
+ 1 = 1 \n
+<dtml-if where_expression>\n
+ AND <dtml-var where_expression>\n
+</dtml-if>\n
+<dtml-if selection_domain>\n
+ <dtml-let expression="selection_domain.asSQLExpression(category_table_alias = 'domain_category')">\n
+ <dtml-if expression> AND <dtml-var expression> </dtml-if>\n
+ </dtml-let>\n
+</dtml-if>\n
+<dtml-if selection_report>\n
+ <dtml-let expression="selection_report.asSQLExpression(strict_membership=1, category_table_alias = 'report_category')">\n
+ <dtml-if expression> AND <dtml-var expression> </dtml-if>\n
+ </dtml-let>\n
+</dtml-if>\n
+<dtml-if sort_on>\n
+ORDER BY\n
+ <dtml-var sort_on>\n
+</dtml-if>\n
+<dtml-if limit_expression>\n
+LIMIT <dtml-var "limit_expression">\n
+<dtml-else>\n
+LIMIT 1000\n
+</dtml-if>\n
+
+
+]]></string> </value>
+ </item>
+ <item>
+ <key> <string>template</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="SQL" module="Shared.DC.ZRDB.DA"/>
+ </klass>
+ <none/>
+ <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[
SELECT DISTINCT\n
<dtml-in getCatalogSearchResultKeys> <dtml-var sequence-item><dtml-if sequence-end> <dtml-else>, </dtml-if> </dtml-in>\n
@@ -215,85 +294,6 @@
]]></string> </value>
- </item>
- <item>
- <key> <string>template</string> </key>
- <value>
- <object>
- <klass>
- <global name="SQL" module="Shared.DC.ZRDB.DA"/>
- </klass>
- <none/>
- <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[
-
-SELECT DISTINCT\n
- <dtml-in getCatalogSearchResultKeys> <dtml-var sequence-item><dtml-if sequence-end> <dtml-else>, </dtml-if> </dtml-in>\n
- <dtml-if select_expression>,<dtml-var select_expression></dtml-if>\n
-\n
-FROM\n
- <dtml-in from_table_list> <dtml-var sequence-item> AS <dtml-var sequence-key><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>\n
- <dtml-if selection_domain>\n
- <dtml-let expression="selection_domain.asSQLJoinExpression()">\n
- <dtml-if expression> , <dtml-var expression> </dtml-if>\n
- </dtml-let>\n
- </dtml-if>\n
- <dtml-if selection_report>\n
- <dtml-let expression="selection_report.asSQLJoinExpression()">\n
- <dtml-if expression> , <dtml-var expression> </dtml-if>\n
- </dtml-let>\n
- </dtml-if>\n
-\n
-WHERE \n
- 1 = 1 \n
-<dtml-if where_expression>\n
- AND <dtml-var where_expression>\n
-</dtml-if>\n
-<dtml-if selection_domain>\n
- <dtml-let expression="selection_domain.asSQLExpression()">\n
- <dtml-if expression> AND <dtml-var expression> </dtml-if>\n
- </dtml-let>\n
-</dtml-if>\n
-<dtml-if selection_report>\n
- <dtml-let expression="selection_report.asSQLExpression(strict_membership=1)">\n
- <dtml-if expression> AND <dtml-var expression> </dtml-if>\n
- </dtml-let>\n
-</dtml-if>\n
-<dtml-if sort_on>\n
-ORDER BY\n
- <dtml-var sort_on>\n
-</dtml-if>\n
-<dtml-if limit_expression>\n
-LIMIT <dtml-var "limit_expression">\n
-<dtml-else>\n
-LIMIT 1000\n
-</dtml-if>\n
-
-
-]]></string> </value>
</item>
</dictionary>
</state>
More information about the Erp5-report
mailing list