Skip to content

Commit

Permalink
Refs #22936 -- Doc'd Lookup.prepare_rhs.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixxm authored Oct 5, 2023
1 parent ea596a5 commit 91cb2d0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/ref/models/lookups.txt
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ following methods:
The name of this lookup, used to identify it on parsing query
expressions. It cannot contain the string ``"__"``.

.. attribute:: prepare_rhs

Defaults to ``True``. When :attr:`rhs` is a plain value,
:attr:`prepare_rhs` determines whether it should be prepared for use as
a parameter in a query. In order to do so,
``lhs.output_field.get_prep_value()`` is called if defined, or ``rhs``
is wrapped in :class:`Value() <django.db.models.Value>` otherwise.

.. method:: process_lhs(compiler, connection, lhs=None)

Returns a tuple ``(lhs_string, lhs_params)``, as returned by
Expand Down

0 comments on commit 91cb2d0

Please sign in to comment.