Commit f14ee65a authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

full text: revert non-required change in ComparisonOperator.

parent af7d3e4a
...@@ -99,8 +99,7 @@ verifyClass(IOperator, MultivaluedComparisonOperator) ...@@ -99,8 +99,7 @@ verifyClass(IOperator, MultivaluedComparisonOperator)
class MatchComparisonOperator(MonovaluedComparisonOperator): class MatchComparisonOperator(MonovaluedComparisonOperator):
def __init__(self, operator, mode=''): def __init__(self, operator, mode=''):
MonovaluedComparisonOperator.__init__(self, operator, '') MonovaluedComparisonOperator.__init__(self, operator, '')
self.mode = mode self.where_expression_format_string = 'MATCH (%%(column)s) AGAINST (%%(value_list)s%s)' % (mode, )
self.where_expression_format_string = 'MATCH (%(column)s) AGAINST (%(value_list)s%(mode)s)'
def asSQLExpression(self, column, value_list, only_group_columns): def asSQLExpression(self, column, value_list, only_group_columns):
""" """
...@@ -111,11 +110,9 @@ class MatchComparisonOperator(MonovaluedComparisonOperator): ...@@ -111,11 +110,9 @@ class MatchComparisonOperator(MonovaluedComparisonOperator):
if value_list == '': if value_list == '':
column, value_list = self.render(column, value_list) column, value_list = self.render(column, value_list)
return SQLExpression(self, where_expression='%s %s %s' % (column, '=', value_list)) return SQLExpression(self, where_expression='%s %s %s' % (column, '=', value_list))
value_list = self.renderValue(value_list)
match_string = self.where_expression_format_string % { match_string = self.where_expression_format_string % {
'column': column, 'column': column,
'value_list': value_list, 'value_list': self.renderValue(value_list),
'mode':self.mode,
} }
select_dict = {} select_dict = {}
if not only_group_columns: if not only_group_columns:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment