from typing import Any, Iterator, overload

class BaseQuery:
    query: str
    model: type
    params: list[Any]
    def __init__(self, query: str, model: type, params: list[Any] | None = None) -> None: ...
    def filter(self, **kwargs: Any) -> BaseQuery: ...
    def exclude(self, **kwargs: Any) -> BaseQuery: ...
    def search(self, field: str, value: str) -> BaseQuery: ...
    def order(self, ordering: str) -> BaseQuery: ...
    def limit(self, limit: int) -> BaseQuery: ...
    def offset(self, offset: int) -> BaseQuery: ...
    def paginate(self, page: int, page_size: int) -> BaseQuery: ...
    def count(self) -> int: ...
    def exists(self) -> bool: ...
    def execute(self) -> list[Any]: ...
    def list(self) -> list[Any]: ...
    def delete(self) -> Any: ...
    def update(self, **kwargs: Any) -> Any: ...
    def first(self) -> Any | None: ...
    def values(self, *fields: str) -> BaseQuery: ...
    def __iter__(self) -> Iterator[Any]: ...
    def __len__(self) -> int: ...
    @overload
    def __getitem__(self, key: int) -> Any: ...
    @overload
    def __getitem__(self, key: slice) -> BaseQuery: ...

class _LazyQuery:
    def __call__(self, *args: Any, **kwargs: Any) -> BaseQuery: ...
    def __getattr__(self, name: str) -> Any: ...

Query: _LazyQuery
