MCPcopy
hub / github.com/tortoise/tortoise-orm / count

Method count

tortoise/queryset.py:781–795  ·  view source on GitHub ↗

Return count of objects in queryset instead of objects.

(self)

Source from the content-addressed store, hash-verified

779 )
780
781 def count(self) -> CountQuery:
782 """
783 Return count of objects in queryset instead of objects.
784 """
785 return CountQuery(
786 db=self._db,
787 model=self.model,
788 q_objects=self._q_objects,
789 annotations=self._annotations,
790 custom_filters=self._custom_filters,
791 limit=self._limit,
792 offset=self._offset,
793 force_indexes=self._force_indexes,
794 use_indexes=self._use_indexes,
795 )
796
797 def exists(self) -> ExistsQuery:
798 """

Calls 1

CountQueryClass · 0.85