equal
deleted
inserted
replaced
376 _orig_choose_term = PartPlanInformation._choose_term |
376 _orig_choose_term = PartPlanInformation._choose_term |
377 |
377 |
378 def _merge_input_maps(*args, **kwargs): |
378 def _merge_input_maps(*args, **kwargs): |
379 return sorted(_orig_merge_input_maps(*args, **kwargs)) |
379 return sorted(_orig_merge_input_maps(*args, **kwargs)) |
380 |
380 |
381 def _choose_term(self, sourceterms): |
381 def _choose_term(self, source, sourceterms): |
382 # predictable order for test purpose |
382 # predictable order for test purpose |
383 def get_key(x): |
383 def get_key(x): |
384 try: |
384 try: |
385 # variable |
385 # variable |
386 return x.name |
386 return x.name |
389 # relation |
389 # relation |
390 return x.r_type |
390 return x.r_type |
391 except AttributeError: |
391 except AttributeError: |
392 # const |
392 # const |
393 return x.value |
393 return x.value |
394 return _orig_choose_term(self, DumbOrderedDict2(sourceterms, get_key)) |
394 return _orig_choose_term(self, source, DumbOrderedDict2(sourceterms, get_key)) |
395 |
395 |
396 from cubicweb.server.sources.pyrorql import PyroRQLSource |
396 from cubicweb.server.sources.pyrorql import PyroRQLSource |
397 _orig_syntax_tree_search = PyroRQLSource.syntax_tree_search |
397 _orig_syntax_tree_search = PyroRQLSource.syntax_tree_search |
398 |
398 |
399 def _syntax_tree_search(*args, **kwargs): |
399 def _syntax_tree_search(*args, **kwargs): |