@@ -183,6 +183,15 @@ def key_transform_in_path(self, compiler, connection):
183183
184184
185185def key_transform_is_null_expr (self , compiler , connection ):
186+ """
187+ Return MQL to check the nullability of a key.
188+
189+ If `isnull=True`, the query matches objects where the key is missing or the
190+ root column is null. If `isnull=False`, the query negates the result to
191+ match objects where the key exists.
192+
193+ Reference: https://code.djangoproject.com/ticket/32252
194+ """
186195 previous = self .lhs
187196 while isinstance (previous , KeyTransform ):
188197 previous = previous .lhs
@@ -194,13 +203,7 @@ def key_transform_is_null_expr(self, compiler, connection):
194203
195204def key_transform_is_null_path (self , compiler , connection ):
196205 """
197- Return MQL to check the nullability of a key.
198-
199- If `isnull=True`, the query matches objects where the key is missing or the
200- root column is null. If `isnull=False`, the query negates the result to
201- match objects where the key exists.
202-
203- Reference: https://code.djangoproject.com/ticket/32252
206+ Return MQL to check the nullability of a key using the operator $exists.
204207 """
205208 lhs_mql = process_lhs (self , compiler , connection , as_path = True )
206209 rhs_mql = process_rhs (self , compiler , connection , as_path = True )
0 commit comments