Files
django-stubs/django/db/models/query.pyi
Maxim Kurnikov a9f215bf64 initial commit
2018-07-29 18:12:23 +03:00

65 lines
1.6 KiB
Python

from django.db.models.base import Model
from django.db.models.sql.query import Query
from typing import (
Any,
Dict,
Iterator,
Optional,
Tuple,
Union,
)
class BaseIterable:
def __init__(
self,
queryset: QuerySet,
chunked_fetch: bool = ...,
chunk_size: int = ...
) -> None: ...
class FlatValuesListIterable:
def __iter__(self) -> Iterator[Any]: ...
class InstanceCheckMeta:
def __instancecheck__(self, instance: Union[str, QuerySet]) -> bool: ...
class ModelIterable:
def __iter__(self) -> Iterator[Model]: ...
class NamedValuesListIterable:
def __iter__(self): ...
class Prefetch:
def __eq__(self, other: None) -> bool: ...
def __getstate__(self) -> Dict[str, Union[str, QuerySet, None]]: ...
def __hash__(self) -> int: ...
def __init__(
self,
lookup: str,
queryset: Optional[QuerySet] = ...,
to_attr: Optional[str] = ...
) -> None: ...
def add_prefix(self, prefix: str) -> None: ...
def get_current_prefetch_to(self, level: int) -> str: ...
def get_current_queryset(self, level: int) -> Optional[QuerySet]: ...
def get_current_to_attr(self, level: int) -> Union[Tuple[str, None], Tuple[str, bool]]: ...
class QuerySet:
def __and__(self, other: QuerySet) -> QuerySet: ...
def __bool__(self) -> bool: ...
def __getitem__(self, k: Union[slice, int]) -> Any: ...
def __getstate__(self) -> Dict[str, Any]: ...
def __init__(
self,
model: Any = ...,
query: Optional[Query] = ...,
using: Optional[str] = ...,
hints: Dict[str, Model] = ...
) -> None: ...