MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / __init__

Method __init__

tortoise/queryset.py:1921–1947  ·  view source on GitHub ↗
(
        self,
        model: type[MODEL],
        db: BaseDBAsyncClient,
        q_objects: list[Q],
        annotations: dict[str, Any],
        custom_filters: dict[str, FilterInfoDict],
        limit: int | None,
        orderings: list[tuple[str, str]],
        objects: Iterable[MODEL],
        fields: Iterable[str],
        batch_size: int | None = None,
    )

Source from the content-addressed store, hash-verified

1919 __slots__ = ("fields", "_objects", "_batch_size", "_queries")
1920
1921 def __init__(
1922 self,
1923 model: type[MODEL],
1924 db: BaseDBAsyncClient,
1925 q_objects: list[Q],
1926 annotations: dict[str, Any],
1927 custom_filters: dict[str, FilterInfoDict],
1928 limit: int | None,
1929 orderings: list[tuple[str, str]],
1930 objects: Iterable[MODEL],
1931 fields: Iterable[str],
1932 batch_size: int | None = None,
1933 ):
1934 super().__init__(
1935 model,
1936 update_kwargs={},
1937 db=db,
1938 q_objects=q_objects,
1939 annotations=annotations,
1940 custom_filters=custom_filters,
1941 limit=limit,
1942 orderings=orderings,
1943 )
1944 self.fields = fields
1945 self._objects = objects
1946 self._batch_size = batch_size
1947 self._queries: list[QueryBuilder] = []
1948
1949 def _make_queries(self) -> list[tuple[str, list[Any]]]:
1950 table = self.model._meta.basetable

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected