@@ -34,6 +34,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
34
34
supports_transactions = False
35
35
supports_unspecified_pk = True
36
36
uses_savepoints = False
37
+ supports_boolean_expr_in_select_clause = True
37
38
38
39
_django_test_expected_failures = {
39
40
# 'NulledTransform' object has no attribute 'as_mql'.
@@ -119,6 +120,15 @@ class DatabaseFeatures(BaseDatabaseFeatures):
119
120
# subclasses of BaseDatabaseIntrospection may require a get_constraints() method
120
121
"migrations.test_operations.OperationTests.test_add_func_unique_constraint" ,
121
122
"migrations.test_operations.OperationTests.test_remove_func_unique_constraint" ,
123
+ # Delete does not support subqueries.
124
+ "delete_regress.tests.DeleteTests.test_self_reference_with_through_m2m_at_second_level" ,
125
+ # Handle column default value.
126
+ "annotations.tests.NonAggregateAnnotationTestCase.test_empty_queryset_annotation" ,
127
+ # Union as subquery is not mapping the parent parameter and collections.
128
+ "queries.test_qs_combinators.QuerySetSetOperationTests.test_union_in_subquery_related_outerref" ,
129
+ "queries.test_qs_combinators.QuerySetSetOperationTests.test_union_in_subquery" ,
130
+ # Log with Decimal128 isn't working as expected.
131
+ "db_functions.math.test_log.LogTests.test_decimal" ,
122
132
}
123
133
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
124
134
_django_test_expected_failures_bitwise = {
@@ -233,106 +243,7 @@ def django_test_expected_failures(self):
233
243
"db_functions.comparison.test_cast.CastTests.test_cast_to_integer_foreign_key" ,
234
244
"model_fields.test_foreignkey.ForeignKeyTests.test_to_python" ,
235
245
"queries.test_qs_combinators.QuerySetSetOperationTests.test_order_raises_on_non_selected_column" ,
236
- },
237
- "Exists is not supported on MongoDB." : {
238
- "aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_aggregate_on_exists" ,
239
- "aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_aggregate_ref_multiple_subquery_annotation" ,
240
- "aggregation.tests.AggregateTestCase.test_aggregation_exists_multivalued_outeref" ,
241
- "aggregation.tests.AggregateTestCase.test_group_by_exists_annotation" ,
242
- "aggregation.tests.AggregateTestCase.test_exists_none_with_aggregate" ,
243
- "aggregation.tests.AggregateTestCase.test_exists_extra_where_with_aggregate" ,
244
- "annotations.tests.NonAggregateAnnotationTestCase.test_annotation_exists_aggregate_values_chaining" ,
245
- "annotations.tests.NonAggregateAnnotationTestCase.test_annotation_exists_none_query" ,
246
- "aggregation_regress.tests.AggregationTests.test_annotate_and_join" ,
247
- "delete_regress.tests.DeleteTests.test_self_reference_with_through_m2m_at_second_level" ,
248
- "expressions.tests.BasicExpressionsTests.test_annotation_with_deeply_nested_outerref" ,
249
- "expressions.tests.BasicExpressionsTests.test_boolean_expression_combined" ,
250
- "expressions.tests.BasicExpressionsTests.test_boolean_expression_combined_with_empty_Q" ,
251
- "expressions.tests.BasicExpressionsTests.test_boolean_expression_in_Q" ,
252
- "expressions.tests.BasicExpressionsTests.test_case_in_filter_if_boolean_output_field" ,
253
- "expressions.tests.BasicExpressionsTests.test_exists_in_filter" ,
254
- "expressions.tests.BasicExpressionsTests.test_order_by_exists" ,
255
- "expressions.tests.BasicExpressionsTests.test_subquery" ,
256
- "expressions.tests.ExistsTests.test_filter_by_empty_exists" ,
257
- "expressions.tests.ExistsTests.test_negated_empty_exists" ,
258
- "expressions.tests.ExistsTests.test_optimizations" ,
259
- "expressions.tests.ExistsTests.test_select_negated_empty_exists" ,
260
- "lookup.tests.LookupTests.test_exact_exists" ,
261
- "lookup.tests.LookupTests.test_nested_outerref_lhs" ,
262
- "lookup.tests.LookupQueryingTests.test_filter_exists_lhs" ,
263
- "model_forms.tests.LimitChoicesToTests.test_fields_for_model_applies_limit_choices_to" ,
264
- "model_forms.tests.LimitChoicesToTests.test_limit_choices_to_callable_for_fk_rel" ,
265
- "model_forms.tests.LimitChoicesToTests.test_limit_choices_to_callable_for_m2m_rel" ,
266
- "model_forms.tests.LimitChoicesToTests.test_limit_choices_to_m2m_through" ,
267
- "model_forms.tests.LimitChoicesToTests.test_limit_choices_to_no_duplicates" ,
268
- "null_queries.tests.NullQueriesTests.test_reverse_relations" ,
269
- "queries.test_qs_combinators.QuerySetSetOperationTests.test_union_with_values_list_on_annotated_and_unannotated" ,
270
- "queries.tests.ExcludeTest17600.test_exclude_plain" ,
271
- "queries.tests.ExcludeTest17600.test_exclude_with_q_is_equal_to_plain_exclude_variation" ,
272
- "queries.tests.ExcludeTest17600.test_exclude_with_q_object_no_distinct" ,
273
- "queries.tests.ExcludeTests.test_exclude_multivalued_exists" ,
274
- "queries.tests.ExcludeTests.test_exclude_reverse_fk_field_ref" ,
275
- "queries.tests.ExcludeTests.test_exclude_with_circular_fk_relation" ,
276
- "queries.tests.ExcludeTests.test_subquery_exclude_outerref" ,
277
- "queries.tests.ExcludeTests.test_to_field" ,
278
- "queries.tests.ForeignKeyToBaseExcludeTests.test_ticket_21787" ,
279
- "queries.tests.JoinReuseTest.test_inverted_q_across_relations" ,
280
- "queries.tests.ManyToManyExcludeTest.test_exclude_many_to_many" ,
281
- "queries.tests.ManyToManyExcludeTest.test_ticket_12823" ,
282
- "queries.tests.Queries1Tests.test_double_exclude" ,
283
- "queries.tests.Queries1Tests.test_exclude" ,
284
- "queries.tests.Queries1Tests.test_exclude_in" ,
285
- "queries.tests.Queries1Tests.test_excluded_intermediary_m2m_table_joined" ,
286
- "queries.tests.Queries1Tests.test_nested_exclude" ,
287
- "queries.tests.Queries4Tests.test_join_reuse_order" ,
288
- "queries.tests.Queries4Tests.test_ticket24525" ,
289
- "queries.tests.Queries6Tests.test_tickets_8921_9188" ,
290
- "queries.tests.Queries6Tests.test_xor_subquery" ,
291
- "queries.tests.QuerySetBitwiseOperationTests.test_subquery_aliases" ,
292
- "queries.tests.TestTicket24605.test_ticket_24605" ,
293
- "queries.tests.Ticket20101Tests.test_ticket_20101" ,
294
- "queries.tests.Ticket20788Tests.test_ticket_20788" ,
295
- "queries.tests.Ticket22429Tests.test_ticket_22429" ,
296
- },
297
- "Subquery is not supported on MongoDB." : {
298
- "aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_aggregate_ref_subquery_annotation" ,
299
- "aggregation.tests.AggregateAnnotationPruningTests.test_referenced_composed_subquery_requires_wrapping" ,
300
- "aggregation.tests.AggregateAnnotationPruningTests.test_referenced_subquery_requires_wrapping" ,
301
- "aggregation.tests.AggregateTestCase.test_aggregation_nested_subquery_outerref" ,
302
- "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation" ,
303
- "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_multivalued" ,
304
- "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_related_field" ,
305
- "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_values" ,
306
- "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_values_collision" ,
307
- "annotations.tests.NonAggregateAnnotationTestCase.test_annotation_filter_with_subquery" ,
308
- "annotations.tests.NonAggregateAnnotationTestCase.test_annotation_subquery_and_aggregate_values_chaining" ,
309
- "annotations.tests.NonAggregateAnnotationTestCase.test_annotation_subquery_outerref_transform" ,
310
- "annotations.tests.NonAggregateAnnotationTestCase.test_empty_queryset_annotation" ,
311
- "db_functions.datetime.test_extract_trunc.DateFunctionTests.test_extract_outerref" ,
312
- "db_functions.datetime.test_extract_trunc.DateFunctionTests.test_trunc_subquery_with_parameters" ,
313
- "expressions.tests.BasicExpressionsTests.test_aggregate_subquery_annotation" ,
314
- "expressions.tests.BasicExpressionsTests.test_annotation_with_nested_outerref" ,
315
- "expressions.tests.BasicExpressionsTests.test_annotation_with_outerref" ,
316
- "expressions.tests.BasicExpressionsTests.test_annotations_within_subquery" ,
317
- "expressions.tests.BasicExpressionsTests.test_in_subquery" ,
318
- "expressions.tests.BasicExpressionsTests.test_nested_outerref_with_function" ,
319
- "expressions.tests.BasicExpressionsTests.test_nested_subquery" ,
320
- "expressions.tests.BasicExpressionsTests.test_nested_subquery_join_outer_ref" ,
321
- "expressions.tests.BasicExpressionsTests.test_nested_subquery_outer_ref_2" ,
322
246
"expressions.tests.BasicExpressionsTests.test_nested_subquery_outer_ref_with_autofield" ,
323
- "expressions.tests.BasicExpressionsTests.test_outerref_mixed_case_table_name" ,
324
- "expressions.tests.BasicExpressionsTests.test_outerref_with_operator" ,
325
- "expressions.tests.BasicExpressionsTests.test_subquery_filter_by_aggregate" ,
326
- "expressions.tests.BasicExpressionsTests.test_subquery_filter_by_lazy" ,
327
- "expressions.tests.BasicExpressionsTests.test_subquery_group_by_outerref_in_filter" ,
328
- "expressions.tests.BasicExpressionsTests.test_subquery_in_filter" ,
329
- "expressions.tests.BasicExpressionsTests.test_subquery_references_joined_table_twice" ,
330
- "expressions.tests.BasicExpressionsTests.test_uuid_pk_subquery" ,
331
- "lookup.tests.LookupQueryingTests.test_filter_subquery_lhs" ,
332
- "model_fields.test_jsonfield.TestQuerying.test_nested_key_transform_on_subquery" ,
333
- "model_fields.test_jsonfield.TestQuerying.test_obj_subquery_lookup" ,
334
- "queries.test_qs_combinators.QuerySetSetOperationTests.test_union_in_subquery" ,
335
- "queries.test_qs_combinators.QuerySetSetOperationTests.test_union_in_subquery_related_outerref" ,
336
247
},
337
248
"Using a QuerySet in annotate() is not supported on MongoDB." : {
338
249
"aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_reused_subquery" ,
@@ -444,6 +355,7 @@ def django_test_expected_failures(self):
444
355
"ordering.tests.OrderingTests.test_orders_nulls_first_on_filtered_subquery" ,
445
356
"queries.tests.ExcludeTest17600.test_exclude_plain_distinct" ,
446
357
"queries.tests.ExcludeTest17600.test_exclude_with_q_is_equal_to_plain_exclude" ,
358
+ "queries.tests.ExcludeTest17600.test_exclude_with_q_is_equal_to_plain_exclude_variation" ,
447
359
"queries.tests.ExcludeTest17600.test_exclude_with_q_object_distinct" ,
448
360
"queries.tests.ExcludeTests.test_exclude_m2m_through" ,
449
361
"queries.tests.ExistsSql.test_distinct_exists" ,
@@ -460,6 +372,7 @@ def django_test_expected_failures(self):
460
372
"update.tests.AdvancedTests.test_update_all" ,
461
373
},
462
374
"QuerySet.extra() is not supported." : {
375
+ "aggregation.tests.AggregateTestCase.test_exists_extra_where_with_aggregate" ,
463
376
"annotations.tests.NonAggregateAnnotationTestCase.test_column_field_ordering" ,
464
377
"annotations.tests.NonAggregateAnnotationTestCase.test_column_field_ordering_with_deferred" ,
465
378
"basic.tests.ModelTest.test_extra_method_select_argument_with_dashes" ,
@@ -494,6 +407,11 @@ def django_test_expected_failures(self):
494
407
"aggregation.tests.AggregateAnnotationPruningTests.test_unused_aliased_aggregate_pruned" ,
495
408
"aggregation.tests.AggregateAnnotationPruningTests.test_referenced_aggregate_annotation_kept" ,
496
409
"aggregation.tests.AggregateTestCase.test_count_star" ,
410
+ "aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_aggregate_ref_subquery_annotation" ,
411
+ "aggregation.tests.AggregateAnnotationPruningTests.test_referenced_composed_subquery_requires_wrapping" ,
412
+ "aggregation.tests.AggregateAnnotationPruningTests.test_referenced_subquery_requires_wrapping" ,
413
+ "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation" ,
414
+ "aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation_related_field" ,
497
415
"delete.tests.DeletionTests.test_only_referenced_fields_selected" ,
498
416
"lookup.tests.LookupTests.test_in_ignore_none" ,
499
417
"lookup.tests.LookupTests.test_textfield_exact_null" ,
0 commit comments