"""
Auto-generated type stub for QueryWrapper's forwarded SQLAlchemy methods.

`sqlalchemy_protocol.py` is the runtime module imported by the package.
This stub carries the generated method signatures used by type checkers for
methods forwarded through `QueryWrapper.__getattr__`.

Do not edit this file directly. Run `just generate-types` to regenerate both
files.
"""

from typing import Any, Protocol

import sqlmodel as sm

from ..query_wrapper import QueryWrapper

class SQLAlchemyQueryMethods[T: sm.SQLModel](Protocol):
    """Type-checker protocol for SQLAlchemy methods forwarded by QueryWrapper."""

    def add_columns(self, *entities: Any) -> QueryWrapper[T]: ...
    def add_cte(self, *ctes: Any, nest_here: Any = ...) -> QueryWrapper[T]: ...
    def alias(self, name: Any = ..., flat: Any = ...) -> QueryWrapper[T]: ...
    def argument_for(self, argument_name: Any, default: Any) -> QueryWrapper[T]: ...
    def as_scalar(self) -> QueryWrapper[T]: ...
    def column(self, column: Any) -> QueryWrapper[T]: ...
    def compare(self, other: Any, **kw: Any) -> QueryWrapper[T]: ...
    def compile(
        self, bind: Any = ..., dialect: Any = ..., **kw: Any
    ) -> QueryWrapper[T]: ...
    def correlate(self, *fromclauses: Any) -> QueryWrapper[T]: ...
    def correlate_except(self, *fromclauses: Any) -> QueryWrapper[T]: ...
    def corresponding_column(
        self, column: Any, require_embedded: Any = ...
    ) -> QueryWrapper[T]: ...
    def cte(
        self, name: Any = ..., recursive: Any = ..., nesting: Any = ...
    ) -> QueryWrapper[T]: ...
    def distinct(self, *expr: Any) -> QueryWrapper[T]: ...
    def except_(self, *other: Any) -> QueryWrapper[T]: ...
    def except_all(self, *other: Any) -> QueryWrapper[T]: ...
    def execution_options(self, **kw: Any) -> QueryWrapper[T]: ...
    def fetch(
        self, count: Any, with_ties: Any = ..., percent: Any = ..., **dialect_kw: Any
    ) -> QueryWrapper[T]: ...
    def filter(self, *criteria: Any) -> QueryWrapper[T]: ...
    def filter_by(self, **kwargs: Any) -> QueryWrapper[T]: ...
    def from_statement(self, statement: Any) -> QueryWrapper[T]: ...
    def get_children(self, **kw: Any) -> QueryWrapper[T]: ...
    def get_dialect_option(
        self,
        dialect: Any,
        argument_name: Any,
        *,
        else_: Any = ...,
        deprecated_fallback: Any = ...,
    ) -> QueryWrapper[T]: ...
    def get_execution_options(self) -> QueryWrapper[T]: ...
    def get_final_froms(self) -> QueryWrapper[T]: ...
    def get_label_style(self) -> QueryWrapper[T]: ...
    def group_by(
        self, _GenerativeSelect__first: Any = ..., *clauses: Any
    ) -> QueryWrapper[T]: ...
    def having(self, *having: Any) -> QueryWrapper[T]: ...
    def intersect(self, *other: Any) -> QueryWrapper[T]: ...
    def intersect_all(self, *other: Any) -> QueryWrapper[T]: ...
    def is_derived_from(self, fromclause: Any) -> QueryWrapper[T]: ...
    def join(
        self, target: Any, onclause: Any = ..., *, isouter: Any = ..., full: Any = ...
    ) -> QueryWrapper[T]: ...
    def join_from(
        self,
        from_: Any,
        target: Any,
        onclause: Any = ...,
        *,
        isouter: Any = ...,
        full: Any = ...,
    ) -> QueryWrapper[T]: ...
    def label(self, name: Any) -> QueryWrapper[T]: ...
    def lateral(self, name: Any = ...) -> QueryWrapper[T]: ...
    def limit(self, limit: Any) -> QueryWrapper[T]: ...
    def memoized_instancemethod(self) -> QueryWrapper[T]: ...
    def offset(self, offset: Any) -> QueryWrapper[T]: ...
    def options(self, *options: Any) -> QueryWrapper[T]: ...
    def order_by(
        self, _GenerativeSelect__first: Any = ..., *clauses: Any
    ) -> QueryWrapper[T]: ...
    def outerjoin(
        self, target: Any, onclause: Any = ..., *, full: Any = ...
    ) -> QueryWrapper[T]: ...
    def outerjoin_from(
        self, from_: Any, target: Any, onclause: Any = ..., *, full: Any = ...
    ) -> QueryWrapper[T]: ...
    def params(
        self, _ClauseElement__optionaldict: Any = ..., **kwargs: Any
    ) -> QueryWrapper[T]: ...
    def prefix_with(self, *prefixes: Any, dialect: Any = ...) -> QueryWrapper[T]: ...
    def reduce_columns(self, only_synonyms: Any = ...) -> QueryWrapper[T]: ...
    def replace_selectable(self, old: Any, alias: Any) -> QueryWrapper[T]: ...
    def scalar_subquery(self) -> QueryWrapper[T]: ...
    def select(self, *arg: Any, **kw: Any) -> QueryWrapper[T]: ...
    def select_from(self, *froms: Any) -> QueryWrapper[T]: ...
    def self_group(self, against: Any = ...) -> QueryWrapper[T]: ...
    def set_label_style(self, style: Any) -> QueryWrapper[T]: ...
    def slice(self, start: Any, stop: Any) -> QueryWrapper[T]: ...
    def subquery(self, name: Any = ...) -> QueryWrapper[T]: ...
    def suffix_with(self, *suffixes: Any, dialect: Any = ...) -> QueryWrapper[T]: ...
    def union(self, *other: Any) -> QueryWrapper[T]: ...
    def union_all(self, *other: Any) -> QueryWrapper[T]: ...
    def unique_params(
        self, _ClauseElement__optionaldict: Any = ..., **kwargs: Any
    ) -> QueryWrapper[T]: ...
    def where(self, *whereclause: Any) -> QueryWrapper[T]: ...
    def with_for_update(
        self,
        *,
        nowait: Any = ...,
        read: Any = ...,
        of: Any = ...,
        skip_locked: Any = ...,
        key_share: Any = ...,
    ) -> QueryWrapper[T]: ...
    def with_hint(
        self, selectable: Any, text: Any, dialect_name: Any = ...
    ) -> QueryWrapper[T]: ...
    def with_only_columns(
        self, *entities: Any, maintain_column_froms: Any = ..., **_Select__kw: Any
    ) -> QueryWrapper[T]: ...
    def with_statement_hint(
        self, text: Any, dialect_name: Any = ...
    ) -> QueryWrapper[T]: ...
