If the extra clause uses an SQL keyword for a name, it will be protected by quoting.
(self)
| 358 | ) |
| 359 | |
| 360 | def test_extra_ordering_quoting(self): |
| 361 | """ |
| 362 | If the extra clause uses an SQL keyword for a name, it will be |
| 363 | protected by quoting. |
| 364 | """ |
| 365 | self.assertQuerySetEqual( |
| 366 | Article.objects.extra( |
| 367 | select={"order": "pub_date"}, order_by=["order", "headline"] |
| 368 | ), |
| 369 | [ |
| 370 | "Article 1", |
| 371 | "Article 2", |
| 372 | "Article 3", |
| 373 | "Article 4", |
| 374 | ], |
| 375 | attrgetter("headline"), |
| 376 | ) |
| 377 | |
| 378 | def test_extra_ordering_with_table_name(self): |
| 379 | self.assertQuerySetEqual( |
nothing calls this directly
no test coverage detected