From: Oleg Broytman Date: Tue, 31 May 2016 18:34:16 +0000 (+0300) Subject: Minor refactoring: _search_conditions_dict => _comparison_operators X-Git-Tag: 0.0.11~12 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=5fb3bb3c8bd6786c3f53b13abbca15996ce8e7db;p=m_librarian.git Minor refactoring: _search_conditions_dict => _comparison_operators --- diff --git a/m_librarian/search.py b/m_librarian/search.py index ea292f7..5c1f47d 100644 --- a/m_librarian/search.py +++ b/m_librarian/search.py @@ -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