From 91cb2d0b487acc56d886612a7251b9ba555d71b4 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 5 Oct 2023 15:26:02 +0200 Subject: [PATCH] Refs #22936 -- Doc'd Lookup.prepare_rhs. --- docs/ref/models/lookups.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/ref/models/lookups.txt b/docs/ref/models/lookups.txt index 07d6e03783ff..e993f9b9a121 100644 --- a/docs/ref/models/lookups.txt +++ b/docs/ref/models/lookups.txt @@ -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() ` otherwise. + .. method:: process_lhs(compiler, connection, lhs=None) Returns a tuple ``(lhs_string, lhs_params)``, as returned by