(self, qn, connection)
| 593 | return super().get_rhs_op(connection, rhs) |
| 594 | |
| 595 | def process_rhs(self, qn, connection): |
| 596 | rhs, params = super().process_rhs(qn, connection) |
| 597 | # Assume the lookup is startswith. For simple lookups involving a |
| 598 | # Python value like "thevalue", the (SQL, params) is something like: |
| 599 | # ("col LIKE %s", ['thevalue%']) |
| 600 | if self.is_simple_lookup: |
| 601 | # Prepare the lookup parameter, a Python value, for use in a LIKE |
| 602 | # clause, usually by adding % signs to the beginning and/or end of |
| 603 | # the value. |
| 604 | param = connection.ops.prep_for_like_query(params[0]) |
| 605 | if connection.features.pattern_lookup_needs_param_pattern: |
| 606 | param = self.param_pattern % param |
| 607 | params = (param, *params[1:]) |
| 608 | return rhs, params |
| 609 | |
| 610 | @property |
| 611 | def is_simple_lookup(self): |
nothing calls this directly
no test coverage detected