mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Expand the sqlalchemy stubs related to the Column model.
This commit is contained in:
74
third_party/2.7/sqlalchemy/sql/schema.pyi
vendored
74
third_party/2.7/sqlalchemy/sql/schema.pyi
vendored
@@ -1,4 +1,4 @@
|
||||
from typing import AnyStr
|
||||
from typing import Any, AnyStr
|
||||
|
||||
from .base import SchemaEventTarget, DialectKWArgs
|
||||
from .base import ColumnCollection
|
||||
@@ -8,12 +8,59 @@ from .selectable import TableClause
|
||||
|
||||
from . import visitors
|
||||
|
||||
class SchemaItem(SchemaEventTarget, visitors.Visitable): ...
|
||||
class SchemaItem(SchemaEventTarget, visitors.Visitable):
|
||||
def _execute_on_connection(self, connection, multiparams, params): ...
|
||||
@property
|
||||
def info(self): ...
|
||||
@property
|
||||
def quote(self): ...
|
||||
def get_children(self, **kwargs): ...
|
||||
def _init_items(self, *args): ...
|
||||
def _schema_item_copy(self, schema_item): ...
|
||||
def __repr__(self): ...
|
||||
|
||||
|
||||
class Table(DialectKWArgs, SchemaItem, TableClause): ...
|
||||
|
||||
class Column(SchemaItem, ColumnClause): ...
|
||||
class ForeignKey(DialectKWArgs, SchemaItem): ...
|
||||
class Column(SchemaItem, ColumnClause):
|
||||
primary_key = ... # type: Any
|
||||
def __init__(self, *args, **kwargs): ...
|
||||
def references(self, column): ...
|
||||
def append_foreign_key(self, fk): ...
|
||||
def __repr__(self): ...
|
||||
def _set_parent(self, table): ...
|
||||
def _setup_on_memoized_fks(self, fn): ...
|
||||
def _on_table_attach(self, fn): ...
|
||||
def copy(self, **kw): ...
|
||||
def _make_proxy(self, selectable, name=None, key=None,
|
||||
name_is_truncatable=False, **kw): ...
|
||||
def get_children(self, schema_visitor=False, **kwargs): ...
|
||||
|
||||
|
||||
class ForeignKey(DialectKWArgs, SchemaItem):
|
||||
def __init__(self, column, _constraint=None, use_alter=False, name=None,
|
||||
onupdate=None, ondelete=None, deferrable=None,
|
||||
initially=None, link_to_name=False, match=None,
|
||||
info=None, **dialect_kw) -> None: ...
|
||||
def __repr__(self): ...
|
||||
def copy(self, schema=None): ...
|
||||
def _get_colspec(self, schema=None, table_name=None): ...
|
||||
@property
|
||||
def _referred_schema(self): ...
|
||||
def _table_key(self): ...
|
||||
def references(self, table): ...
|
||||
def get_referent(self, table): ...
|
||||
@property
|
||||
def _column_tokens(self): ...
|
||||
def _resolve_col_tokens(self): ...
|
||||
def _link_to_col_by_colstring(self, parenttable, table, colname): ...
|
||||
def _set_target_column(self, column): ...
|
||||
@property
|
||||
def column(self): ...
|
||||
def _set_parent(self, column): ...
|
||||
def _set_remote_table(self, table): ...
|
||||
def _remove_from_metadata(self, metadata): ...
|
||||
def _set_table(self, column, table): ...
|
||||
|
||||
class _NotAColumnExpr(object): ...
|
||||
class DefaultGenerator(_NotAColumnExpr, SchemaItem): ...
|
||||
@@ -23,8 +70,23 @@ class FetchedValue(_NotAColumnExpr, SchemaEventTarget): ...
|
||||
class DefaultClause(FetchedValue): ...
|
||||
class PassiveDefault(DefaultClause): ...
|
||||
class Constraint(DialectKWArgs, SchemaItem): ...
|
||||
class ColumnCollectionMixin(object): ...
|
||||
class ColumnCollectionConstraint(ColumnCollectionMixin, Constraint): ...
|
||||
class ColumnCollectionMixin(object):
|
||||
columns = None # type: Any
|
||||
def __init__(self, *columns, **kw): ...
|
||||
@classmethod
|
||||
def _extract_col_expression_collection(cls, expressions): ...
|
||||
def _check_attach(self, evt=False): ...
|
||||
def _set_parent(self, table): ...
|
||||
|
||||
class ColumnCollectionConstraint(ColumnCollectionMixin, Constraint):
|
||||
def __init__(self, *columns, **kw): ...
|
||||
def _set_parent(self, table): ...
|
||||
def __contains__(self, x): ...
|
||||
def copy(self, **kw): ...
|
||||
def contains_column(self, col): ...
|
||||
def __iter__(self): ...
|
||||
def __len__(self): ...
|
||||
|
||||
class CheckConstraint(ColumnCollectionConstraint): ...
|
||||
class ForeignKeyConstraint(ColumnCollectionConstraint): ...
|
||||
class PrimaryKeyConstraint(ColumnCollectionConstraint): ...
|
||||
|
||||
13
third_party/2.7/sqlalchemy/sql/sqltypes.pyi
vendored
13
third_party/2.7/sqlalchemy/sql/sqltypes.pyi
vendored
@@ -3,7 +3,18 @@ from .base import SchemaEventTarget
|
||||
|
||||
class _DateAffinity(object): ...
|
||||
class Concatenable(object): ...
|
||||
class String(TypeEngine, Concatenable): ...
|
||||
class String(TypeEngine, Concatenable):
|
||||
def __init__(self, length=None, collation=None,
|
||||
convert_unicode=False,
|
||||
unicode_error=None,
|
||||
_warn_on_bytestring=False): ...
|
||||
def literal_processor(self, dialect): ...
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
@property
|
||||
def python_type(self): ...
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class Text(String): ...
|
||||
class Unicode(String): ...
|
||||
class UnicodeText(Text): ...
|
||||
|
||||
Reference in New Issue
Block a user