mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
SQLAlchemy improvements for generative methods (#7603)
This commit is contained in:
@@ -2,7 +2,7 @@ from typing import Any
|
||||
|
||||
from .base import ProxyComparable, StartableContext
|
||||
|
||||
def create_async_engine(*arg, **kw): ...
|
||||
def create_async_engine(*arg, **kw) -> AsyncEngine: ...
|
||||
|
||||
class AsyncConnectable: ...
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
from _typeshed import Self
|
||||
from typing import Any
|
||||
|
||||
from .. import util
|
||||
@@ -37,14 +38,14 @@ class Selectable(ReturnsRows):
|
||||
def corresponding_column(self, column, require_embedded: bool = ...): ...
|
||||
|
||||
class HasPrefixes:
|
||||
def prefix_with(self, *expr, **kw) -> None: ...
|
||||
def prefix_with(self: Self, *expr, **kw) -> Self: ...
|
||||
|
||||
class HasSuffixes:
|
||||
def suffix_with(self, *expr, **kw) -> None: ...
|
||||
def suffix_with(self: Self, *expr, **kw) -> Self: ...
|
||||
|
||||
class HasHints:
|
||||
def with_statement_hint(self, text, dialect_name: str = ...): ...
|
||||
def with_hint(self, selectable, text, dialect_name: str = ...) -> None: ...
|
||||
def with_hint(self: Self, selectable, text: str, dialect_name: str = ...) -> Self: ...
|
||||
|
||||
class FromClause(roles.AnonymizedFromClauseRole, Selectable):
|
||||
__visit_name__: str
|
||||
@@ -190,9 +191,9 @@ class Values(Generative, FromClause):
|
||||
name: Any
|
||||
literal_binds: Any
|
||||
def __init__(self, *columns, **kw) -> None: ...
|
||||
def alias(self, name, **kw) -> None: ... # type: ignore[override]
|
||||
def lateral(self, name: Any | None = ...) -> None: ...
|
||||
def data(self, values) -> None: ...
|
||||
def alias(self: Self, name: Any | None, **kw) -> Self: ... # type: ignore[override]
|
||||
def lateral(self: Self, name: Any | None = ...) -> Self: ...
|
||||
def data(self: Self, values) -> Self: ...
|
||||
|
||||
class SelectBase(
|
||||
roles.SelectStatementRole,
|
||||
@@ -250,17 +251,17 @@ class GenerativeSelect(DeprecatedSelectBaseGenerations, SelectBase):
|
||||
bind: Any | None = ...,
|
||||
) -> None: ...
|
||||
def with_for_update(
|
||||
self, nowait: bool = ..., read: bool = ..., of: Any | None = ..., skip_locked: bool = ..., key_share: bool = ...
|
||||
) -> None: ...
|
||||
self: Self, nowait: bool = ..., read: bool = ..., of: Any | None = ..., skip_locked: bool = ..., key_share: bool = ...
|
||||
) -> Self: ...
|
||||
def get_label_style(self): ...
|
||||
def set_label_style(self, style): ...
|
||||
def apply_labels(self): ...
|
||||
def limit(self, limit) -> None: ...
|
||||
def fetch(self, count, with_ties: bool = ..., percent: bool = ...) -> None: ...
|
||||
def offset(self, offset) -> None: ...
|
||||
def slice(self, start, stop) -> None: ...
|
||||
def order_by(self, *clauses) -> None: ...
|
||||
def group_by(self, *clauses) -> None: ...
|
||||
def limit(self: Self, limit: Any | None) -> Self: ...
|
||||
def fetch(self: Self, count: Any | None, with_ties: bool = ..., percent: bool = ...) -> Self: ...
|
||||
def offset(self: Self, offset: Any | None) -> Self: ...
|
||||
def slice(self: Self, start: Any | None, stop: Any | None) -> Self: ...
|
||||
def order_by(self: Self, *clauses) -> Self: ...
|
||||
def group_by(self: Self, *clauses) -> Self: ...
|
||||
|
||||
class CompoundSelectState(CompileState): ...
|
||||
|
||||
@@ -338,9 +339,9 @@ class Select(
|
||||
@property
|
||||
def column_descriptions(self): ...
|
||||
def from_statement(self, statement): ...
|
||||
def join(self, target, onclause: Any | None = ..., isouter: bool = ..., full: bool = ...) -> None: ...
|
||||
def join(self: Self, target, onclause: Any | None = ..., isouter: bool = ..., full: bool = ...) -> Self: ...
|
||||
def outerjoin_from(self, from_, target, onclause: Any | None = ..., full: bool = ...): ...
|
||||
def join_from(self, from_, target, onclause: Any | None = ..., isouter: bool = ..., full: bool = ...) -> None: ...
|
||||
def join_from(self: Self, from_, target, onclause: Any | None = ..., isouter: bool = ..., full: bool = ...) -> Self: ...
|
||||
def outerjoin(self, target, onclause: Any | None = ..., full: bool = ...): ...
|
||||
def get_final_froms(self): ...
|
||||
@property
|
||||
@@ -351,18 +352,18 @@ class Select(
|
||||
def inner_columns(self): ...
|
||||
def is_derived_from(self, fromclause): ...
|
||||
def get_children(self, **kwargs): ...
|
||||
def add_columns(self, *columns) -> None: ...
|
||||
def add_columns(self: Self, *columns) -> Self: ...
|
||||
def column(self, column): ...
|
||||
def reduce_columns(self, only_synonyms: bool = ...): ...
|
||||
def with_only_columns(self, *columns, **kw) -> None: ...
|
||||
def with_only_columns(self: Self, *columns, **kw) -> Self: ...
|
||||
@property
|
||||
def whereclause(self): ...
|
||||
def where(self, *whereclause) -> None: ...
|
||||
def having(self, having) -> None: ...
|
||||
def distinct(self, *expr) -> None: ...
|
||||
def select_from(self, *froms) -> None: ...
|
||||
def correlate(self, *fromclauses) -> None: ...
|
||||
def correlate_except(self, *fromclauses) -> None: ...
|
||||
def where(self: Self, *whereclause) -> Self: ...
|
||||
def having(self: Self, having) -> Self: ...
|
||||
def distinct(self: Self, *expr) -> Self: ...
|
||||
def select_from(self: Self, *froms) -> Self: ...
|
||||
def correlate(self: Self, *fromclauses) -> Self: ...
|
||||
def correlate_except(self: Self, *fromclauses) -> Self: ...
|
||||
@HasMemoized.memoized_attribute
|
||||
def selected_columns(self): ...
|
||||
def self_group(self, against: Any | None = ...): ...
|
||||
@@ -386,10 +387,10 @@ class ScalarSelect(roles.InElementRole, Generative, Grouping):
|
||||
def columns(self) -> None: ...
|
||||
@property
|
||||
def c(self): ...
|
||||
def where(self, crit) -> None: ...
|
||||
def where(self: Self, crit) -> Self: ...
|
||||
def self_group(self, **kwargs): ...
|
||||
def correlate(self, *fromclauses) -> None: ...
|
||||
def correlate_except(self, *fromclauses) -> None: ...
|
||||
def correlate(self: Self, *fromclauses) -> Self: ...
|
||||
def correlate_except(self: Self, *fromclauses) -> Self: ...
|
||||
|
||||
class Exists(UnaryExpression):
|
||||
inherit_cache: bool
|
||||
@@ -410,7 +411,7 @@ class TextualSelect(SelectBase):
|
||||
def __init__(self, text, columns, positional: bool = ...) -> None: ...
|
||||
@HasMemoized.memoized_attribute
|
||||
def selected_columns(self): ...
|
||||
def bindparams(self, *binds, **bind_as_values) -> None: ...
|
||||
def bindparams(self: Self, *binds, **bind_as_values) -> Self: ...
|
||||
|
||||
TextAsFrom = TextualSelect
|
||||
|
||||
|
||||
Reference in New Issue
Block a user