Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mssql/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def as_sql(self, with_limits=True, with_col_aliases=False):
params.extend(h_params)

explain = self.query.explain_info if django.VERSION >= (4, 0) else self.query.explain_query
if explain:
if explain and hasattr(self.query, 'explain_format'):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, so from what I understand after Django 4.0 query.explain_format and query.explain_options are replaced by query.explain_info.format and query.explain_info.options respectively.

result.insert(0, self.connection.ops.explain_query_prefix(
self.query.explain_format,
**self.query.explain_options
Expand Down
1 change: 0 additions & 1 deletion testapp/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@
'lookup.tests.LookupTests.test_lookup_rhs',
'order_with_respect_to.tests.OrderWithRespectToBaseTests.test_previous_and_next_in_order',
'ordering.tests.OrderingTests.test_default_ordering_does_not_affect_group_by',
'queries.test_explain.ExplainUnsupportedTests.test_message',
'aggregation.tests.AggregateTestCase.test_coalesced_empty_result_set',
'aggregation.tests.AggregateTestCase.test_empty_result_optimization',
'queries.tests.Queries6Tests.test_col_alias_quoted',
Expand Down