fleshing out some more stubs for sqlalchemy (#282)

This commit is contained in:
Herbert Ho
2016-06-09 17:58:19 -07:00
committed by Guido van Rossum
parent 59d64f4e2b
commit e46d308ab4
3 changed files with 30 additions and 1 deletions

View File

@@ -2,5 +2,10 @@
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.
from .base import Connection as Connection
from .base import Engine as Engine
from .base import RowProxy as RowProxy
from .base import Transaction as Transaction
def create_engine(*args, **kwargs): ...
def engine_from_config(configuration, prefix=..., **kwargs): ...

View File

@@ -1,3 +1,21 @@
from typing import Any, List, Tuple
# Dummy until I figure out something better.
class Connectable:
pass
class Connection:
def begin(self): ...
def execute(self, object, *multiparams, **params): ...
class Engine(object): ...
class RowProxy:
def items(self) -> List[Tuple[Any, Any]]: ...
def keys(self) -> List[Any]: ...
def values(self) -> List[Any]: ...
def __getitem__(self, key: str): ...
class Transaction:
def commit(self): ...
def rollback(self): ...

View File

@@ -20,7 +20,13 @@ class SchemaItem(SchemaEventTarget, visitors.Visitable):
def __repr__(self): ...
class Table(DialectKWArgs, SchemaItem, TableClause): ...
class Table(DialectKWArgs, SchemaItem, TableClause):
def __init__(self, name, metadata, *args, **kwargs): ...
def insert(self, *args, **kwargs): ...
def select(self, *args, **kwargs): ...
def update(self, *args, **kwargs): ...
def c(self, *args, **kwargs): ...
class Column(SchemaItem, ColumnClause):
primary_key = ... # type: Any