MCPcopy
hub / github.com/django/django / explain

Method explain

django/db/models/sql/query.py:688–698  ·  view source on GitHub ↗
(self, using, format=None, **options)

Source from the content-addressed store, hash-verified

686 return compiler.has_results()
687
688 def explain(self, using, format=None, **options):
689 q = self.clone()
690 for option_name in options:
691 if (
692 not EXPLAIN_OPTIONS_PATTERN.fullmatch(option_name)
693 or "--" in option_name
694 ):
695 raise ValueError(f"Invalid option name: {option_name!r}.")
696 q.explain_info = ExplainInfo(format, options)
697 compiler = q.get_compiler(using=using)
698 return "\n".join(compiler.explain_query())
699
700 def combine(self, rhs, connector):
701 """

Callers

nothing calls this directly

Calls 4

cloneMethod · 0.95
get_compilerMethod · 0.80
explain_queryMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected