Generates a QuerySet with the filter applied that returns the first record. :params orderings: Fields to order by.
(cls, *orderings: str)
| 1520 | |
| 1521 | @classmethod |
| 1522 | def earliest(cls, *orderings: str) -> QuerySetSingle[Self | None]: |
| 1523 | """ |
| 1524 | Generates a QuerySet with the filter applied that returns the first record. |
| 1525 | |
| 1526 | :params orderings: Fields to order by. |
| 1527 | """ |
| 1528 | return cls._meta.manager.get_queryset().earliest(*orderings) |
| 1529 | |
| 1530 | @classmethod |
| 1531 | def exclude(cls, *args: Q, **kwargs: Any) -> QuerySet[Self]: |