mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-21 02:22:07 +08:00
update constraints definition for 2.7 sqlalchemy (#630)
This commit is contained in:
committed by
Guido van Rossum
parent
bfbe4f8540
commit
3ea39a7c1b
31
third_party/2.7/sqlalchemy/sql/schema.pyi
vendored
31
third_party/2.7/sqlalchemy/sql/schema.pyi
vendored
@@ -22,11 +22,22 @@ class SchemaItem(SchemaEventTarget, visitors.Visitable):
|
||||
|
||||
class Table(DialectKWArgs, SchemaItem, TableClause):
|
||||
def __init__(self, name, metadata, *args, **kwargs): ...
|
||||
def delete(self, *args, **kwargs): ...
|
||||
def insert(self, *args, **kwargs): ...
|
||||
def select(self, *args, **kwargs): ...
|
||||
def update(self, *args, **kwargs): ...
|
||||
@property
|
||||
def key(self): ...
|
||||
@property
|
||||
def primary_key(self): ...
|
||||
def __repr__(self): ...
|
||||
def __str__(self): ...
|
||||
def append_column(self, column): ...
|
||||
def append_constraint(self, constraint): ...
|
||||
def append_ddl_listener(self, event, listener): ...
|
||||
def get_children(self, column_collections=True, schema_visitor=False, **kwargs): ...
|
||||
def exists(self, bind=None): ...
|
||||
def create(self, bind=None, checkfirst=False): ...
|
||||
def drop(self, bind=None, checkfirst=False): ...
|
||||
def tometadata(self, metadata, schema=None): ...
|
||||
c = ... # type: ColumnCollection
|
||||
constraints = ... # type: Set[Constraint]
|
||||
|
||||
|
||||
class Column(SchemaItem, ColumnClause):
|
||||
@@ -76,7 +87,17 @@ class Sequence(DefaultGenerator): ...
|
||||
class FetchedValue(_NotAColumnExpr, SchemaEventTarget): ...
|
||||
class DefaultClause(FetchedValue): ...
|
||||
class PassiveDefault(DefaultClause): ...
|
||||
class Constraint(DialectKWArgs, SchemaItem): ...
|
||||
|
||||
class Constraint(DialectKWArgs, SchemaItem):
|
||||
def __init__(self, name=None, deferrable=None, initially=None): ...
|
||||
def __contains__(self, x): ...
|
||||
def contains_column(self, col): ...
|
||||
def keys(self): ...
|
||||
def __add__(self, other): ...
|
||||
def __iter__(self): ...
|
||||
def __len__(self): ...
|
||||
def copy(self, **kw): ...
|
||||
|
||||
class ColumnCollectionMixin(object):
|
||||
columns = ... # type: Any
|
||||
def __init__(self, *columns, **kw): ...
|
||||
|
||||
16
third_party/2.7/sqlalchemy/sql/selectable.pyi
vendored
16
third_party/2.7/sqlalchemy/sql/selectable.pyi
vendored
@@ -4,6 +4,7 @@ from .elements import ClauseElement, TextClause, ClauseList, \
|
||||
Grouping, UnaryExpression, BindParameter
|
||||
from .annotation import Annotated
|
||||
from .visitors import Visitable
|
||||
from .. import util
|
||||
|
||||
def subquery(alias, *args, **kwargs): ...
|
||||
def alias(selectable, name=..., flat: bool=...): ...
|
||||
@@ -47,7 +48,20 @@ class Join(FromClause): ...
|
||||
class Alias(FromClause): ...
|
||||
class CTE(Generative, HasSuffixes, Alias): ...
|
||||
class FromGrouping(FromClause): ...
|
||||
class TableClause(Immutable, FromClause): ...
|
||||
|
||||
class TableClause(Immutable, FromClause):
|
||||
def __init__(self, name, *columns): ...
|
||||
def _export_columns(self): ...
|
||||
@util.memoized_property
|
||||
def description(self): ...
|
||||
def append_column(self, c): ...
|
||||
def get_children(self, **kwargs): ...
|
||||
def count(self, whereclause=None, **params): ...
|
||||
def insert(self, values=None, inline=False, **kwargs): ...
|
||||
def update(self, whereclause=None, values=None, inline=False, **kwargs): ...
|
||||
def delete(self, whereclause=None, **kwargs): ...
|
||||
@property
|
||||
def _from_objects(self): ...
|
||||
|
||||
class ForUpdateArg(ClauseElement): ...
|
||||
class SelectBase(Executable, FromClause): ...
|
||||
|
||||
Reference in New Issue
Block a user