Skip to content

Commit 55b5c3d

Browse files
committed
add ExpressionList.as_mql()
for django/django@d99985b
1 parent 891c1e8 commit 55b5c3d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

django_mongodb_backend/expressions.py

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
Col,
1111
CombinedExpression,
1212
Exists,
13+
ExpressionList,
1314
ExpressionWrapper,
1415
F,
1516
NegatedExpression,
@@ -24,6 +25,8 @@
2425
)
2526
from django.db.models.sql import Query
2627

28+
from .query_utils import process_lhs
29+
2730

2831
def case(self, compiler, connection):
2932
case_parts = []
@@ -83,6 +86,10 @@ def expression_wrapper(self, compiler, connection):
8386
return self.expression.as_mql(compiler, connection)
8487

8588

89+
def expression_list(self, compiler, connection):
90+
return process_lhs(self, compiler, connection)
91+
92+
8693
def f(self, compiler, connection): # noqa: ARG001
8794
return f"${self.name}"
8895

@@ -206,6 +213,7 @@ def register_expressions():
206213
Col.as_mql = col
207214
CombinedExpression.as_mql = combined_expression
208215
Exists.as_mql = exists
216+
ExpressionList.as_mql = expression_list
209217
ExpressionWrapper.as_mql = expression_wrapper
210218
F.as_mql = f
211219
NegatedExpression.as_mql = negated_expression

0 commit comments

Comments
 (0)