mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-21 19:32:16 +08:00
merge with stubgen output
This commit is contained in:
@@ -1,22 +1,177 @@
|
||||
# Stubs for django.db.models.sql.query (Python 3.6)
|
||||
#
|
||||
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
||||
|
||||
from collections import namedtuple
|
||||
from typing import Any, Optional
|
||||
|
||||
from django.db.models.base import Model
|
||||
from django.db.models.sql.where import WhereNode
|
||||
from typing import (
|
||||
Set,
|
||||
Tuple,
|
||||
Type,
|
||||
Union,
|
||||
)
|
||||
from typing import Set, Tuple, Type, Union
|
||||
JoinInfo = namedtuple('JoinInfo', ['final_field', 'targets', 'opts', 'joins', 'path', 'transform_function'])
|
||||
|
||||
class RawQuery:
|
||||
params: Any = ...
|
||||
sql: Any = ...
|
||||
using: Any = ...
|
||||
cursor: Any = ...
|
||||
extra_select: Any = ...
|
||||
annotation_select: Any = ...
|
||||
def __init__(self, sql: Any, using: Any, params: Optional[Any] = ...) -> None: ...
|
||||
def chain(self, using: Any): ...
|
||||
def clone(self, using: Any): ...
|
||||
def get_columns(self): ...
|
||||
def __iter__(self): ...
|
||||
def __repr__(self): ...
|
||||
@property
|
||||
def params_type(self): ...
|
||||
def __str__(self): ...
|
||||
def _execute_query(self) -> None: ...
|
||||
|
||||
class Query:
|
||||
alias_prefix: str = ...
|
||||
subq_aliases: Any = ...
|
||||
compiler: str = ...
|
||||
model: Any = ...
|
||||
alias_refcount: Any = ...
|
||||
alias_map: Any = ...
|
||||
external_aliases: Any = ...
|
||||
table_map: Any = ...
|
||||
default_cols: bool = ...
|
||||
default_ordering: bool = ...
|
||||
standard_ordering: bool = ...
|
||||
used_aliases: Any = ...
|
||||
filter_is_sticky: bool = ...
|
||||
subquery: bool = ...
|
||||
select: Any = ...
|
||||
where: Any = ...
|
||||
where_class: Any = ...
|
||||
group_by: Any = ...
|
||||
order_by: Any = ...
|
||||
distinct: bool = ...
|
||||
distinct_fields: Any = ...
|
||||
select_for_update: bool = ...
|
||||
select_for_update_nowait: bool = ...
|
||||
select_for_update_skip_locked: bool = ...
|
||||
select_for_update_of: Any = ...
|
||||
select_related: bool = ...
|
||||
max_depth: int = ...
|
||||
values_select: Any = ...
|
||||
_annotations: Any = ...
|
||||
annotation_select_mask: Any = ...
|
||||
_annotation_select_cache: Any = ...
|
||||
combinator: Any = ...
|
||||
combinator_all: bool = ...
|
||||
combined_queries: Any = ...
|
||||
_extra: Any = ...
|
||||
extra_select_mask: Any = ...
|
||||
_extra_select_cache: Any = ...
|
||||
extra_tables: Any = ...
|
||||
extra_order_by: Any = ...
|
||||
deferred_loading: Any = ...
|
||||
_filtered_relations: Any = ...
|
||||
explain_query: bool = ...
|
||||
explain_format: Any = ...
|
||||
explain_options: Any = ...
|
||||
def __init__(self, model: Type[Model], where: Type[WhereNode] = ...) -> None: ...
|
||||
@property
|
||||
def extra(self): ...
|
||||
@property
|
||||
def annotations(self): ...
|
||||
@property
|
||||
def has_select_fields(self): ...
|
||||
def base_table(self): ...
|
||||
def __str__(self): ...
|
||||
def sql_with_params(self): ...
|
||||
def __deepcopy__(self, memo: Any): ...
|
||||
def _prepare(self, field: Any): ...
|
||||
def get_compiler(self, using: Optional[Any] = ..., connection: Optional[Any] = ...): ...
|
||||
def get_meta(self): ...
|
||||
def clone(self): ...
|
||||
def chain(self, klass: Optional[Any] = ...): ...
|
||||
def relabeled_clone(self, change_map: Any): ...
|
||||
def rewrite_cols(self, annotation: Any, col_cnt: Any): ...
|
||||
def get_aggregation(self, using: Any, added_aggregate_names: Any): ...
|
||||
def get_count(self, using: Any): ...
|
||||
def has_filters(self): ...
|
||||
def has_results(self, using: Any): ...
|
||||
def explain(self, using: Any, format: Optional[Any] = ..., **options: Any): ...
|
||||
def combine(self, rhs: Any, connector: Any) -> None: ...
|
||||
def deferred_to_data(self, target: Any, callback: Any): ...
|
||||
def table_alias(self, table_name: Any, create: bool = ..., filtered_relation: Optional[Any] = ...): ...
|
||||
def ref_alias(self, alias: Any) -> None: ...
|
||||
def unref_alias(self, alias: Any, amount: int = ...) -> None: ...
|
||||
def promote_joins(self, aliases: Any) -> None: ...
|
||||
def demote_joins(self, aliases: Any) -> None: ...
|
||||
def reset_refcounts(self, to_counts: Any) -> None: ...
|
||||
def change_aliases(self, change_map: Any) -> None: ...
|
||||
def bump_prefix(self, outer_query: Any): ...
|
||||
def get_initial_alias(self): ...
|
||||
def count_active_tables(self): ...
|
||||
def join(self, join: Any, reuse: Optional[Any] = ..., reuse_with_filtered_relation: bool = ...): ...
|
||||
def join_parent_model(self, opts: Any, model: Any, alias: Any, seen: Any): ...
|
||||
def add_annotation(self, annotation: Any, alias: Any, is_summary: bool = ...) -> None: ...
|
||||
def resolve_expression(self, query: Any, *args: Any, **kwargs: Any): ...
|
||||
def as_sql(self, compiler: Any, connection: Any): ...
|
||||
def resolve_lookup_value(self, value: Any, can_reuse: Any, allow_joins: Any): ...
|
||||
def solve_lookup_type(self, lookup: Any): ...
|
||||
def check_query_object_type(self, value: Any, opts: Any, field: Any) -> None: ...
|
||||
def check_related_objects(self, field: Any, value: Any, opts: Any) -> None: ...
|
||||
def build_lookup(self, lookups: Any, lhs: Any, rhs: Any): ...
|
||||
def try_transform(self, lhs: Any, name: Any): ...
|
||||
_lookup_joins: Any = ...
|
||||
def build_filter(self, filter_expr: Any, branch_negated: bool = ..., current_negated: bool = ..., can_reuse: Optional[Any] = ..., allow_joins: bool = ..., split_subq: bool = ..., reuse_with_filtered_relation: bool = ...): ...
|
||||
def add_filter(self, filter_clause: Any) -> None: ...
|
||||
def add_q(self, q_object: Any) -> None: ...
|
||||
def _add_q(self, q_object: Any, used_aliases: Any, branch_negated: bool = ..., current_negated: bool = ..., allow_joins: bool = ..., split_subq: bool = ...): ...
|
||||
def build_filtered_relation_q(self, q_object: Any, reuse: Any, branch_negated: bool = ..., current_negated: bool = ...): ...
|
||||
def add_filtered_relation(self, filtered_relation: Any, alias: Any) -> None: ...
|
||||
def names_to_path(self, names: Any, opts: Any, allow_many: bool = ..., fail_on_missing: bool = ...): ...
|
||||
def setup_joins(self, names: Any, opts: Any, alias: Any, can_reuse: Optional[Any] = ..., allow_many: bool = ..., reuse_with_filtered_relation: bool = ...): ...
|
||||
def trim_joins(self, targets: Any, joins: Any, path: Any): ...
|
||||
def resolve_ref(self, name: Any, allow_joins: bool = ..., reuse: Optional[Any] = ..., summarize: bool = ...): ...
|
||||
def split_exclude(self, filter_expr: Any, can_reuse: Any, names_with_path: Any): ...
|
||||
def set_empty(self) -> None: ...
|
||||
def is_empty(self): ...
|
||||
high_mark: Any = ...
|
||||
low_mark: Any = ...
|
||||
def set_limits(self, low: Optional[Any] = ..., high: Optional[Any] = ...) -> None: ...
|
||||
def clear_limits(self) -> None: ...
|
||||
def has_limit_one(self): ...
|
||||
def can_filter(self): ...
|
||||
def clear_select_clause(self) -> None: ...
|
||||
def clear_select_fields(self) -> None: ...
|
||||
def set_select(self, cols: Any) -> None: ...
|
||||
def add_distinct_fields(self, *field_names: Any) -> None: ...
|
||||
def add_fields(self, field_names: Any, allow_m2m: bool = ...) -> None: ...
|
||||
def add_ordering(self, *ordering: Any) -> None: ...
|
||||
def clear_ordering(self, force_empty: Any) -> None: ...
|
||||
def set_group_by(self) -> None: ...
|
||||
def add_select_related(self, fields: Any) -> None: ...
|
||||
def add_extra(self, select: Any, select_params: Any, where: Any, params: Any, tables: Any, order_by: Any) -> None: ...
|
||||
def clear_deferred_loading(self) -> None: ...
|
||||
def add_deferred_loading(self, field_names: Any) -> None: ...
|
||||
def add_immediate_loading(self, field_names: Any) -> None: ...
|
||||
_loaded_field_names_cache: Any = ...
|
||||
def get_loaded_field_names(self): ...
|
||||
def get_loaded_field_names_cb(self, target: Any, model: Any, fields: Any) -> None: ...
|
||||
def set_annotation_mask(self, names: Any) -> None: ...
|
||||
def append_annotation_mask(self, names: Any) -> None: ...
|
||||
def set_extra_mask(self, names: Any) -> None: ...
|
||||
def set_values(self, fields: Any) -> None: ...
|
||||
@property
|
||||
def annotation_select(self): ...
|
||||
@property
|
||||
def extra_select(self): ...
|
||||
def trim_start(self, names_with_path: Any): ...
|
||||
def is_nullable(self, field: Any): ...
|
||||
|
||||
class JoinPromoter:
|
||||
connector: Any = ...
|
||||
negated: Any = ...
|
||||
effective_connector: Any = ...
|
||||
num_children: Any = ...
|
||||
votes: Any = ...
|
||||
def __init__(self, connector: str, num_children: int, negated: bool) -> None: ...
|
||||
def add_votes(self, votes: Union[Set[str], Tuple]) -> None: ...
|
||||
def update_join_types(self, query: Query) -> Set[str]: ...
|
||||
|
||||
|
||||
class Query:
|
||||
def __init__(
|
||||
self,
|
||||
model: Type[Model],
|
||||
where: Type[WhereNode] = ...
|
||||
) -> None: ...
|
||||
Reference in New Issue
Block a user