Limit queryset to one object and return one object instead of list.
(self)
| 822 | return RawSQLQuery(model=self.model, db=self._db, sql=sql) |
| 823 | |
| 824 | def first(self) -> QuerySetSingle[MODEL | None]: |
| 825 | """ |
| 826 | Limit queryset to one object and return one object instead of list. |
| 827 | """ |
| 828 | queryset = self._clone() |
| 829 | return queryset._as_single() |
| 830 | |
| 831 | def last(self) -> QuerySetSingle[MODEL | None]: |
| 832 | """ |
nothing calls this directly
no test coverage detected