@@ -183,6 +183,15 @@ def key_transform_in_path(self, compiler, connection):
183
183
184
184
185
185
def 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
+ """
186
195
previous = self .lhs
187
196
while isinstance (previous , KeyTransform ):
188
197
previous = previous .lhs
@@ -194,13 +203,7 @@ def key_transform_is_null_expr(self, compiler, connection):
194
203
195
204
def key_transform_is_null_path (self , compiler , connection ):
196
205
"""
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.
204
207
"""
205
208
lhs_mql = process_lhs (self , compiler , connection , as_path = True )
206
209
rhs_mql = process_rhs (self , compiler , connection , as_path = True )
0 commit comments