Commit c4f880ae authored by Yusuke Muraoka's avatar Yusuke Muraoka

explained more about why raise the exception.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33157 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 88b37cf4
...@@ -119,8 +119,21 @@ class ComplexQuery(Query): ...@@ -119,8 +119,21 @@ class ComplexQuery(Query):
def checkQueryTree(self): def checkQueryTree(self):
""" """
XXX XXX
If self has 'or' operator and a RelatedQuery in the tree, The root of this query tree will not return semantic valid SQLExpression
it will not return valid result. when the self has 'or' operator and a RelatedQuery in the query tree of self.
The semantic valid means that, for example, there is a query tree which has
three queries:
- one is intended for searching document with the title 'bra%'
- one is intended for searching document which is related to a category
- a ComplexQuery with 'or' operator which has above queries as children
in this case, the root of the query tree should return an expression
"(document.tile like 'bra%') or (document related to the category and
the category entry must be in catalog)". This is semantic valid.
However at current implementation, return the expression
"(document.title like 'bra%' or document related to the category) and (the
category entry must be in catalog)". The outside relation between category
and catalog also affects the document.title condition. It is a limitation for
performance. We don't hope to return affected result. So raise the Exception.
""" """
for query in self.query_list: for query in self.query_list:
result = self._findRelatedQuery(query) result = self._findRelatedQuery(query)
......
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