Skip to content

Commit be5c4b7

Browse files
committed
Docstring
1 parent a08d556 commit be5c4b7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

django_mongodb_backend/compiler.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,13 @@ def _prepare_expressions_for_pipeline(self, expression, target, annotation_group
109109
return replacements, group
110110

111111
def _prepare_search_expressions_for_pipeline(self, expression, search_idx, replacements):
112+
"""
113+
Collect and prepare unique search expressions for inclusion in an
114+
aggregation pipeline.
115+
Iterates over all search sub-expressions of the given expression,
116+
assigns a unique alias to each, and maps them to their
117+
replacement expressions.
118+
"""
112119
searches = {}
113120
for sub_expr in self._get_search_expressions(expression):
114121
if sub_expr not in replacements:

0 commit comments

Comments
 (0)