(self, *cols: elements.ColumnElement[Any], **kw: Any)
| 78 | modifiers: util.immutabledict[str, Any] |
| 79 | |
| 80 | def __init__(self, *cols: elements.ColumnElement[Any], **kw: Any): |
| 81 | if not cols: |
| 82 | raise exc.ArgumentError("columns are required") |
| 83 | |
| 84 | against = kw.pop("against", None) |
| 85 | |
| 86 | if against is None: |
| 87 | raise exc.ArgumentError("against is required") |
| 88 | against = coercions.expect( |
| 89 | roles.ExpressionElementRole, |
| 90 | against, |
| 91 | ) |
| 92 | |
| 93 | left = elements.BooleanClauseList._construct_raw( |
| 94 | operators.comma_op, |
| 95 | clauses=cols, |
| 96 | ) |
| 97 | left.group = False |
| 98 | |
| 99 | flags = util.immutabledict( |
| 100 | { |
| 101 | "mysql_boolean_mode": kw.pop("in_boolean_mode", False), |
| 102 | "mysql_natural_language": kw.pop( |
| 103 | "in_natural_language_mode", False |
| 104 | ), |
| 105 | "mysql_query_expansion": kw.pop("with_query_expansion", False), |
| 106 | } |
| 107 | ) |
| 108 | |
| 109 | if kw: |
| 110 | raise exc.ArgumentError("unknown arguments: %s" % (", ".join(kw))) |
| 111 | |
| 112 | super().__init__(left, against, operators.match_op, modifiers=flags) |
| 113 | |
| 114 | @_generative |
| 115 | def in_boolean_mode(self) -> Self: |
nothing calls this directly
no test coverage detected