equal
deleted
inserted
replaced
199 # internal session, which is not possible until pools have been |
199 # internal session, which is not possible until pools have been |
200 # initialized) |
200 # initialized) |
201 for source in self.sources: |
201 for source in self.sources: |
202 source.init() |
202 source.init() |
203 else: |
203 else: |
204 # call init_creating so for instance native source can configurate |
204 # call init_creating so that for instance native source can |
205 # tsearch according to postgres version |
205 # configurate tsearch according to postgres version |
206 for source in self.sources: |
206 for source in self.sources: |
207 source.init_creating() |
207 source.init_creating() |
208 # close initialization pool and reopen fresh ones for proper |
208 # close initialization pool and reopen fresh ones for proper |
209 # initialization now that we know cubes |
209 # initialization now that we know cubes |
210 self._get_pool().close(True) |
210 self._get_pool().close(True) |
1235 |
1235 |
1236 # multi-sources planner helpers ########################################### |
1236 # multi-sources planner helpers ########################################### |
1237 |
1237 |
1238 @cached |
1238 @cached |
1239 def rel_type_sources(self, rtype): |
1239 def rel_type_sources(self, rtype): |
1240 return [source for source in self.sources |
1240 return tuple([source for source in self.sources |
1241 if source.support_relation(rtype) |
1241 if source.support_relation(rtype) |
1242 or rtype in source.dont_cross_relations] |
1242 or rtype in source.dont_cross_relations]) |
1243 |
1243 |
1244 @cached |
1244 @cached |
1245 def can_cross_relation(self, rtype): |
1245 def can_cross_relation(self, rtype): |
1246 return [source for source in self.sources |
1246 return tuple([source for source in self.sources |
1247 if source.support_relation(rtype) |
1247 if source.support_relation(rtype) |
1248 and rtype in source.cross_relations] |
1248 and rtype in source.cross_relations]) |
1249 |
1249 |
1250 @cached |
1250 @cached |
1251 def is_multi_sources_relation(self, rtype): |
1251 def is_multi_sources_relation(self, rtype): |
1252 return any(source for source in self.sources |
1252 return any(source for source in self.sources |
1253 if not source is self.system_source |
1253 if not source is self.system_source |