What does the extra method do in Django's queryset API?
Correct answer
A. Adds extra SQL clauses to the query
18 views
A. Adds extra SQL clauses to the query
18 views
extra() adds extra SQL clauses to a query — custom SELECT expressions, WHERE conditions or tables.
It is an old escape hatch that Django's documentation now discourages; annotate(), F() expressions and RawSQL are the preferred alternatives.
Keep preparing with more Computer Science MCQs on MCQsExam.com.
Not sure why the answer is A? Ask here and get an explanation.