"Flag combination does not make sence: %s" % flags
)
- match_clause = self.process(binary.left, **kw)
+ match_clause = binary.left
+ mysql_additional_cols = modifiers.get('mysql_additional_cols')
+
+ if mysql_additional_cols:
+ match_clause = (match_clause, *mysql_additional_cols)
+ match_clause = elements.BooleanClauseList._construct_raw(
+ operators.comma_op,
+ clauses=match_clause,
+ )
+ match_clause.group = False
+
+ match_clause = self.process(match_clause, **kw)
against_clause = self.process(binary.right, **kw)
if any(flag_combination):
dialect=self.__dialect__,
)
+ def test_match_additional_cols(self):
+ matchtable = table(
+ "matchtable",
+ column("title", String),
+ column("comment", String),
+ )
+
+ self.assert_compile(
+ matchtable.c.title.match(
+ "somstr",
+ mysql_additional_cols=[matchtable.c.comment],
+ ),
+ "MATCH (matchtable.title, matchtable.comment) "
+ "AGAINST (%s IN BOOLEAN MODE)",
+ )
+
def test_concat_compile_kw(self):
expr = literal("x", type_=String) + literal("y", type_=String)
self.assert_compile(expr, "concat('x', 'y')", literal_binds=True)