From a0b641bdf6ae460f06a142574ab0410db38d7074 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Thu, 5 Mar 2009 14:19:10 +0000
Subject: [PATCH] Pass RelatedKey.buildQuery's related_key_definition and
 sql_catalog parameters by name to make them easier to grep for.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25884 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ZSQLCatalog/SQLCatalog.py | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/product/ZSQLCatalog/SQLCatalog.py b/product/ZSQLCatalog/SQLCatalog.py
index e09789d597..e489a0667e 100644
--- a/product/ZSQLCatalog/SQLCatalog.py
+++ b/product/ZSQLCatalog/SQLCatalog.py
@@ -1887,7 +1887,8 @@ class Catalog(Folder,
       result = None
     else:
       if related_key_definition is not None:
-        search_key = search_key.getSearchKey(self, related_key_definition)
+        search_key = search_key.getSearchKey(sql_catalog=self,
+          related_key_definition=related_key_definition)
     return search_key
 
   @profiler_decorator
@@ -1905,13 +1906,15 @@ class Catalog(Folder,
         if related_key_definition is None:
           build_key = search_key
         else:
-          build_key = search_key.getSearchKey(self, related_key_definition,
-                                               search_key_name=search_key_name)
+          build_key = search_key.getSearchKey(sql_catalog=self,
+            related_key_definition=related_key_definition,
+            search_key_name=search_key_name)
         result = build_key.buildQuery(value, logical_operator=logical_operator,
                                       comparison_operator=comparison_operator)
         if related_key_definition is not None:
-          result = search_key.buildQuery(self, related_key_definition,
-                                         search_value=result)
+          result = search_key.buildQuery(sql_catalog=self,
+            related_key_definition=related_key_definition,
+            search_value=result)
     else:
       result = script(value)
     return result
@@ -1966,11 +1969,13 @@ class Catalog(Folder,
       if related_key_definition is None:
         build_key = search_key
       else:
-        build_key = search_key.getSearchKey(self, related_key_definition)
+        build_key = search_key.getSearchKey(sql_catalog=self,
+          related_key_definition=related_key_definition)
       result = self._buildQueryFromAbstractSyntaxTreeNode(node, build_key)
       if related_key_definition is not None:
-        result = search_key.buildQuery(self, related_key_definition,
-                                       search_value=result)
+        result = search_key.buildQuery(sql_catalog=self,
+          related_key_definition=related_key_definition,
+          search_value=result)
     return result
 
   @profiler_decorator
-- 
2.30.9