We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1da1bc1 commit 0c27833Copy full SHA for 0c27833
django_mongodb_backend/query_conversion/query_optimizer.py
@@ -1,10 +1,8 @@
1
-from copy import deepcopy
2
-
3
from django_mongodb_backend.query_conversion.expression_converters import convert_expression
4
5
6
class QueryOptimizer:
7
- def convert_expr_to_match(self, expr):
+ def convert_expr_to_match(self, expr_query):
8
"""
9
Takes an MQL query with $expr and optimizes it by extracting
10
optimizable conditions into separate $match stages.
@@ -15,8 +13,6 @@ def convert_expr_to_match(self, expr):
15
13
Returns:
16
14
List of optimized match conditions
17
18
- expr_query = deepcopy(expr)
19
20
if "$expr" not in expr_query:
21
return [expr_query]
22
0 commit comments