]> git.phdru.name Git - m_librarian.git/commitdiff
Minor refactoring: _search_conditions_dict => _comparison_operators
authorOleg Broytman <phd@phdru.name>
Tue, 31 May 2016 18:34:16 +0000 (21:34 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 31 May 2016 18:34:16 +0000 (21:34 +0300)
m_librarian/search.py

index ea292f70d8d379ae9c0ddab6c1d5263328e50274..5c1f47d65403df60bc645a144728a5c24b2076c5 100644 (file)
@@ -41,7 +41,7 @@ def _mk_search_conditions_with_operator(table, case_sensitive, comparison_op,
     return _expressions
 
 
-_search_conditions_dict = {
+_comparison_operators = {
     'start': 'startswith',
     'substring': 'contains',
     'full': '__eq__',
@@ -53,7 +53,7 @@ def mk_search_conditions(table, search_type, case_sensitive, values,
     if join_expressions is None:
         join_expressions = []
     return _mk_search_conditions_with_operator(
-        table, case_sensitive, _search_conditions_dict[search_type],
+        table, case_sensitive, _comparison_operators[search_type],
         values, expressions) + join_expressions