mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-15 08:17:08 +08:00
initial commit
This commit is contained in:
65
django/db/models/query.pyi
Normal file
65
django/db/models/query.pyi
Normal file
@@ -0,0 +1,65 @@
|
||||
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: ...
|
||||
Reference in New Issue
Block a user