[multi-sources] move [dont_]cross_relations to AbstractSource 3.5
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 27 Aug 2009 17:01:32 +0200
branch3.5
changeset 3040 e4dc22040f5f
parent 3039 7d5a4d27d052
child 3041 782fa7566a22
[multi-sources] move [dont_]cross_relations to AbstractSource
server/msplanner.py
server/sources/__init__.py
--- a/server/msplanner.py	Thu Aug 27 16:59:19 2009 +0200
+++ b/server/msplanner.py	Thu Aug 27 17:01:32 2009 +0200
@@ -97,9 +97,6 @@
 # str() Constant.value to ensure generated table name won't be unicode
 Constant._ms_table_key = lambda x: str(x.value)
 
-AbstractSource.dont_cross_relations = ()
-AbstractSource.cross_relations = ()
-
 def need_source_access_relation(vargraph):
     if not vargraph:
         return False
--- a/server/sources/__init__.py	Thu Aug 27 16:59:19 2009 +0200
+++ b/server/sources/__init__.py	Thu Aug 27 17:01:32 2009 +0200
@@ -80,6 +80,11 @@
     # a reference to the instance'schema (may differs from the source'schema)
     schema = None
 
+    # multi-sources planning control
+    dont_cross_relations = ()
+    cross_relations = ()
+
+
     def __init__(self, repo, appschema, source_config, *args, **kwargs):
         self.repo = repo
         self.uri = source_config['uri']