mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
fleshing out some more stubs for sqlalchemy (#282)
This commit is contained in:
committed by
Guido van Rossum
parent
59d64f4e2b
commit
e46d308ab4
@@ -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): ...
|
||||
|
||||
18
third_party/2.7/sqlalchemy/engine/base.pyi
vendored
18
third_party/2.7/sqlalchemy/engine/base.pyi
vendored
@@ -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): ...
|
||||
|
||||
8
third_party/2.7/sqlalchemy/sql/schema.pyi
vendored
8
third_party/2.7/sqlalchemy/sql/schema.pyi
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user