Skip to content

Commit b351ef1

Browse files
committed
Edits.
1 parent 6778e4c commit b351ef1

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

django_mongodb/expressions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def query(self, compiler, connection, lookup_name=None):
114114
for col, i in subquery_compiler.column_mapping.items()
115115
},
116116
}
117-
# The result must be a list of values. Se we compress the output with an aggregation pipeline.
117+
# The result must be a list of values. The output is compressed with an aggregation pipeline.
118118
if lookup_name in ("in", "range"):
119119
subquery.aggregation_pipeline = [
120120
{

django_mongodb/features.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
1010
greatest_least_ignores_nulls = True
1111
has_json_object_function = False
1212
has_native_json_field = True
13+
supports_boolean_expr_in_select_clause = True
1314
supports_collation_on_charfield = False
1415
supports_column_check_constraints = False
1516
supports_date_lookup_using_string = False
@@ -34,7 +35,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
3435
supports_transactions = False
3536
supports_unspecified_pk = True
3637
uses_savepoints = False
37-
supports_boolean_expr_in_select_clause = True
3838

3939
_django_test_expected_failures = {
4040
# 'NulledTransform' object has no attribute 'as_mql'.
@@ -92,14 +92,13 @@ class DatabaseFeatures(BaseDatabaseFeatures):
9292
"schema.tests.SchemaTests.test_composed_constraint_with_fk",
9393
"schema.tests.SchemaTests.test_remove_ignored_unique_constraint_not_create_fk_index",
9494
"schema.tests.SchemaTests.test_unique_constraint",
95-
# subclasses of BaseDatabaseIntrospection may require a get_constraints() method
96-
"migrations.test_operations.OperationTests.test_add_func_unique_constraint",
97-
"migrations.test_operations.OperationTests.test_remove_func_unique_constraint",
9895
# Delete does not support subqueries.
9996
"delete_regress.tests.DeleteTests.test_self_reference_with_through_m2m_at_second_level",
10097
# Handle column default value.
98+
# https://github.com/mongodb-labs/django-mongodb/issues/155
10199
"annotations.tests.NonAggregateAnnotationTestCase.test_empty_queryset_annotation",
102100
# Union as subquery is not mapping the parent parameter and collections.
101+
# https://github.com/mongodb-labs/django-mongodb/issues/156
103102
"queries.test_qs_combinators.QuerySetSetOperationTests.test_union_in_subquery_related_outerref",
104103
"queries.test_qs_combinators.QuerySetSetOperationTests.test_union_in_subquery",
105104
}
@@ -381,7 +380,6 @@ def django_test_expected_failures(self):
381380
"aggregation.tests.AggregateAnnotationPruningTests.test_unused_aliased_aggregate_pruned",
382381
"aggregation.tests.AggregateAnnotationPruningTests.test_referenced_aggregate_annotation_kept",
383382
"aggregation.tests.AggregateTestCase.test_count_star",
384-
"aggregation.test_filter_argument.FilteredAggregateTests.test_filtered_aggregate_ref_subquery_annotation",
385383
"aggregation.tests.AggregateAnnotationPruningTests.test_referenced_composed_subquery_requires_wrapping",
386384
"aggregation.tests.AggregateAnnotationPruningTests.test_referenced_subquery_requires_wrapping",
387385
"aggregation.tests.AggregateTestCase.test_aggregation_subquery_annotation",

0 commit comments

Comments
 (0)