MCPcopy
hub / github.com/django/django / get_paths_from_expression

Function get_paths_from_expression

django/db/models/sql/query.py:81–89  ·  view source on GitHub ↗
(expr)

Source from the content-addressed store, hash-verified

79
80
81def get_paths_from_expression(expr):
82 if isinstance(expr, F):
83 yield expr.name
84 elif hasattr(expr, "flatten"):
85 for child in expr.flatten():
86 if isinstance(child, F):
87 yield child.name
88 elif isinstance(child, Q):
89 yield from get_children_from_q(child)
90
91
92def get_children_from_q(q):

Callers 1

get_children_from_qFunction · 0.85

Calls 2

get_children_from_qFunction · 0.85
flattenMethod · 0.45

Tested by

no test coverage detected