Commit bd44ae7c authored by Jean-Paul Smets's avatar Jean-Paul Smets

Naming convention: SQL should be in big caps.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11893 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 39d27455
...@@ -190,7 +190,7 @@ class Selection(Acquisition.Implicit, Traversable, Persistent): ...@@ -190,7 +190,7 @@ class Selection(Acquisition.Implicit, Traversable, Persistent):
if len(sort_on) > 0: if len(sort_on) > 0:
kw['sort_on'] = sort_on kw['sort_on'] = sort_on
elif kw.has_key('sort_on'): elif kw.has_key('sort_on'):
del kw.params['sort_on'] del kw.params['sort_on'] # XXX JPS: Should this be really deleted ?
if method is not None: if method is not None:
if callable(method): if callable(method):
if self.domain is not None and self.report is not None: if self.domain is not None and self.report is not None:
...@@ -428,7 +428,7 @@ class DomainSelection(Acquisition.Implicit, Traversable, Persistent): ...@@ -428,7 +428,7 @@ class DomainSelection(Acquisition.Implicit, Traversable, Persistent):
if k == 'parent': if k == 'parent':
# Special treatment for parent # Special treatment for parent
select_expression.append(d.getParentSqlExpression(table='catalog', select_expression.append(d.getParentSQLExpression(table='catalog',
strict_membership=strict_membership)) strict_membership=strict_membership))
elif k is not None: elif k is not None:
if getattr(aq_base(d), 'isPredicate', 0): if getattr(aq_base(d), 'isPredicate', 0):
...@@ -438,7 +438,7 @@ class DomainSelection(Acquisition.Implicit, Traversable, Persistent): ...@@ -438,7 +438,7 @@ class DomainSelection(Acquisition.Implicit, Traversable, Persistent):
# This is a category, we must join # This is a category, we must join
select_expression.append('%s.%s = %s_category.uid' % \ select_expression.append('%s.%s = %s_category.uid' % \
(join_table, join_column, k)) (join_table, join_column, k))
select_expression.append(d.asSQLExpression(table='%s_category' % k, select_expression.append(d.asSQLExpression(table='%s_category' % k,
base_category=k, base_category=k,
strict_membership=strict_membership)) strict_membership=strict_membership))
# XXX We should take into account k explicitely # XXX We should take into account k explicitely
...@@ -447,7 +447,7 @@ class DomainSelection(Acquisition.Implicit, Traversable, Persistent): ...@@ -447,7 +447,7 @@ class DomainSelection(Acquisition.Implicit, Traversable, Persistent):
result = "( %s )" % ' AND '.join(select_expression) result = "( %s )" % ' AND '.join(select_expression)
else: else:
result = '' result = ''
#LOG('DomainSelection', 0, 'asSQLExpression returns %r' % (result,)) #LOG('DomainSelection', 0, 'asSQLExpression returns %r' % (result,))
return result return result
security.declarePublic('asSQLJoinExpression') security.declarePublic('asSQLJoinExpression')
......
...@@ -128,7 +128,7 @@ class TestDocument(ERP5TypeTestCase): ...@@ -128,7 +128,7 @@ class TestDocument(ERP5TypeTestCase):
self.failUnless(self.getCategoryTool()!=None) self.failUnless(self.getCategoryTool()!=None)
self.failUnless(self.getSimulationTool()!=None) self.failUnless(self.getSimulationTool()!=None)
self.failUnless(self.getTypeTool()!=None) self.failUnless(self.getTypeTool()!=None)
self.failUnless(self.getSqlConnection()!=None) self.failUnless(self.getSQLConnection()!=None)
self.failUnless(self.getCatalogTool()!=None) self.failUnless(self.getCatalogTool()!=None)
self.failUnless(self.getWorkflowTool()!=None) self.failUnless(self.getWorkflowTool()!=None)
......
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