mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Create SQLalchemy stubs using stubgen (#6585)
This commit is contained in:
133
stubs/SQLAlchemy/sqlalchemy/__init__.pyi
Normal file
133
stubs/SQLAlchemy/sqlalchemy/__init__.pyi
Normal file
@@ -0,0 +1,133 @@
|
||||
from .engine import (
|
||||
create_engine as create_engine,
|
||||
create_mock_engine as create_mock_engine,
|
||||
engine_from_config as engine_from_config,
|
||||
)
|
||||
from .inspection import inspect as inspect
|
||||
from .schema import (
|
||||
BLANK_SCHEMA as BLANK_SCHEMA,
|
||||
DDL as DDL,
|
||||
CheckConstraint as CheckConstraint,
|
||||
Column as Column,
|
||||
ColumnDefault as ColumnDefault,
|
||||
Computed as Computed,
|
||||
Constraint as Constraint,
|
||||
DefaultClause as DefaultClause,
|
||||
FetchedValue as FetchedValue,
|
||||
ForeignKey as ForeignKey,
|
||||
ForeignKeyConstraint as ForeignKeyConstraint,
|
||||
Identity as Identity,
|
||||
Index as Index,
|
||||
MetaData as MetaData,
|
||||
PrimaryKeyConstraint as PrimaryKeyConstraint,
|
||||
Sequence as Sequence,
|
||||
Table as Table,
|
||||
ThreadLocalMetaData as ThreadLocalMetaData,
|
||||
UniqueConstraint as UniqueConstraint,
|
||||
)
|
||||
from .sql import (
|
||||
LABEL_STYLE_DEFAULT as LABEL_STYLE_DEFAULT,
|
||||
LABEL_STYLE_DISAMBIGUATE_ONLY as LABEL_STYLE_DISAMBIGUATE_ONLY,
|
||||
LABEL_STYLE_NONE as LABEL_STYLE_NONE,
|
||||
LABEL_STYLE_TABLENAME_PLUS_COL as LABEL_STYLE_TABLENAME_PLUS_COL,
|
||||
alias as alias,
|
||||
all_ as all_,
|
||||
and_ as and_,
|
||||
any_ as any_,
|
||||
asc as asc,
|
||||
between as between,
|
||||
bindparam as bindparam,
|
||||
case as case,
|
||||
cast as cast,
|
||||
collate as collate,
|
||||
column as column,
|
||||
delete as delete,
|
||||
desc as desc,
|
||||
distinct as distinct,
|
||||
except_ as except_,
|
||||
except_all as except_all,
|
||||
exists as exists,
|
||||
extract as extract,
|
||||
false as false,
|
||||
func as func,
|
||||
funcfilter as funcfilter,
|
||||
insert as insert,
|
||||
intersect as intersect,
|
||||
intersect_all as intersect_all,
|
||||
join as join,
|
||||
lambda_stmt as lambda_stmt,
|
||||
lateral as lateral,
|
||||
literal as literal,
|
||||
literal_column as literal_column,
|
||||
modifier as modifier,
|
||||
not_ as not_,
|
||||
null as null,
|
||||
nulls_first as nulls_first,
|
||||
nulls_last as nulls_last,
|
||||
nullsfirst as nullsfirst,
|
||||
nullslast as nullslast,
|
||||
or_ as or_,
|
||||
outerjoin as outerjoin,
|
||||
outparam as outparam,
|
||||
over as over,
|
||||
select as select,
|
||||
subquery as subquery,
|
||||
table as table,
|
||||
tablesample as tablesample,
|
||||
text as text,
|
||||
true as true,
|
||||
tuple_ as tuple_,
|
||||
type_coerce as type_coerce,
|
||||
union as union,
|
||||
union_all as union_all,
|
||||
update as update,
|
||||
values as values,
|
||||
within_group as within_group,
|
||||
)
|
||||
from .types import (
|
||||
ARRAY as ARRAY,
|
||||
BIGINT as BIGINT,
|
||||
BINARY as BINARY,
|
||||
BLOB as BLOB,
|
||||
BOOLEAN as BOOLEAN,
|
||||
CHAR as CHAR,
|
||||
CLOB as CLOB,
|
||||
DATE as DATE,
|
||||
DATETIME as DATETIME,
|
||||
DECIMAL as DECIMAL,
|
||||
FLOAT as FLOAT,
|
||||
INT as INT,
|
||||
INTEGER as INTEGER,
|
||||
JSON as JSON,
|
||||
NCHAR as NCHAR,
|
||||
NUMERIC as NUMERIC,
|
||||
NVARCHAR as NVARCHAR,
|
||||
REAL as REAL,
|
||||
SMALLINT as SMALLINT,
|
||||
TEXT as TEXT,
|
||||
TIME as TIME,
|
||||
TIMESTAMP as TIMESTAMP,
|
||||
VARBINARY as VARBINARY,
|
||||
VARCHAR as VARCHAR,
|
||||
BigInteger as BigInteger,
|
||||
Boolean as Boolean,
|
||||
Date as Date,
|
||||
DateTime as DateTime,
|
||||
Enum as Enum,
|
||||
Float as Float,
|
||||
Integer as Integer,
|
||||
Interval as Interval,
|
||||
LargeBinary as LargeBinary,
|
||||
Numeric as Numeric,
|
||||
PickleType as PickleType,
|
||||
SmallInteger as SmallInteger,
|
||||
String as String,
|
||||
Text as Text,
|
||||
Time as Time,
|
||||
TupleType as TupleType,
|
||||
TypeDecorator as TypeDecorator,
|
||||
Unicode as Unicode,
|
||||
UnicodeText as UnicodeText,
|
||||
)
|
||||
|
||||
__version__: str
|
||||
12
stubs/SQLAlchemy/sqlalchemy/cimmutabledict.pyi
Normal file
12
stubs/SQLAlchemy/sqlalchemy/cimmutabledict.pyi
Normal file
@@ -0,0 +1,12 @@
|
||||
class immutabledict:
|
||||
def __len__(self) -> int: ...
|
||||
def __getitem__(self, __item): ...
|
||||
def __iter__(self): ...
|
||||
def union(self, **kwargs): ...
|
||||
def merge_with(self, *args): ...
|
||||
def keys(self): ...
|
||||
def __contains__(self, __item): ...
|
||||
def items(self): ...
|
||||
def values(self): ...
|
||||
def get(self, __key, __default=...): ...
|
||||
def __reduce__(self): ...
|
||||
1
stubs/SQLAlchemy/sqlalchemy/connectors/__init__.pyi
Normal file
1
stubs/SQLAlchemy/sqlalchemy/connectors/__init__.pyi
Normal file
@@ -0,0 +1 @@
|
||||
class Connector: ...
|
||||
17
stubs/SQLAlchemy/sqlalchemy/connectors/mxodbc.pyi
Normal file
17
stubs/SQLAlchemy/sqlalchemy/connectors/mxodbc.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
from typing import Any
|
||||
|
||||
from . import Connector
|
||||
|
||||
class MxODBCConnector(Connector):
|
||||
driver: str
|
||||
supports_sane_multi_rowcount: bool
|
||||
supports_unicode_statements: bool
|
||||
supports_unicode_binds: bool
|
||||
supports_native_decimal: bool
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def on_connect(self): ...
|
||||
def create_connect_args(self, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
def do_executemany(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
def do_execute(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
21
stubs/SQLAlchemy/sqlalchemy/connectors/pyodbc.pyi
Normal file
21
stubs/SQLAlchemy/sqlalchemy/connectors/pyodbc.pyi
Normal file
@@ -0,0 +1,21 @@
|
||||
from typing import Any
|
||||
|
||||
from . import Connector
|
||||
|
||||
class PyODBCConnector(Connector):
|
||||
driver: str
|
||||
supports_sane_rowcount_returning: bool
|
||||
supports_sane_multi_rowcount: bool
|
||||
supports_unicode_statements: bool
|
||||
supports_unicode_binds: bool
|
||||
supports_native_decimal: bool
|
||||
default_paramstyle: str
|
||||
use_setinputsizes: bool
|
||||
pyodbc_driver_name: Any
|
||||
def __init__(self, supports_unicode_binds: Any | None = ..., use_setinputsizes: bool = ..., **kw) -> None: ...
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def create_connect_args(self, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
def do_set_input_sizes(self, cursor, list_of_tuples, context) -> None: ...
|
||||
def set_isolation_level(self, connection, level) -> None: ...
|
||||
11
stubs/SQLAlchemy/sqlalchemy/cresultproxy.pyi
Normal file
11
stubs/SQLAlchemy/sqlalchemy/cresultproxy.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Any
|
||||
|
||||
class BaseRow:
|
||||
def __init__(self, parent, processors, keymap, key_style, data) -> None: ...
|
||||
def __reduce__(self): ...
|
||||
def __iter__(self): ...
|
||||
def __len__(self): ...
|
||||
def __hash__(self): ...
|
||||
__getitem__: Any
|
||||
|
||||
def safe_rowproxy_reconstructor(__cls, __state): ...
|
||||
18
stubs/SQLAlchemy/sqlalchemy/databases/__init__.pyi
Normal file
18
stubs/SQLAlchemy/sqlalchemy/databases/__init__.pyi
Normal file
@@ -0,0 +1,18 @@
|
||||
from ..dialects.firebird import base as firebird_base
|
||||
from ..dialects.mssql import base as mssql_base
|
||||
from ..dialects.mysql import base as mysql_base
|
||||
from ..dialects.oracle import base as oracle_base
|
||||
from ..dialects.postgresql import base as postgresql_base
|
||||
from ..dialects.sqlite import base as sqlite_base
|
||||
from ..dialects.sybase import base as sybase_base
|
||||
|
||||
__all__ = ("firebird", "mssql", "mysql", "postgresql", "sqlite", "oracle", "sybase")
|
||||
|
||||
firebird = firebird_base
|
||||
mssql = mssql_base
|
||||
mysql = mysql_base
|
||||
oracle = oracle_base
|
||||
postgresql = postgresql_base
|
||||
postgres = postgresql_base
|
||||
sqlite = sqlite_base
|
||||
sybase = sybase_base
|
||||
16
stubs/SQLAlchemy/sqlalchemy/dialects/__init__.pyi
Normal file
16
stubs/SQLAlchemy/sqlalchemy/dialects/__init__.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
from typing import Any
|
||||
|
||||
from . import (
|
||||
firebird as firebird,
|
||||
mssql as mssql,
|
||||
mysql as mysql,
|
||||
oracle as oracle,
|
||||
postgresql as postgresql,
|
||||
sqlite as sqlite,
|
||||
sybase as sybase,
|
||||
)
|
||||
|
||||
__all__ = ("firebird", "mssql", "mysql", "oracle", "postgresql", "sqlite", "sybase")
|
||||
|
||||
registry: Any
|
||||
plugins: Any
|
||||
34
stubs/SQLAlchemy/sqlalchemy/dialects/firebird/__init__.pyi
Normal file
34
stubs/SQLAlchemy/sqlalchemy/dialects/firebird/__init__.pyi
Normal file
@@ -0,0 +1,34 @@
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy.dialects.firebird.base import (
|
||||
BIGINT as BIGINT,
|
||||
BLOB as BLOB,
|
||||
CHAR as CHAR,
|
||||
DATE as DATE,
|
||||
FLOAT as FLOAT,
|
||||
NUMERIC as NUMERIC,
|
||||
SMALLINT as SMALLINT,
|
||||
TEXT as TEXT,
|
||||
TIME as TIME,
|
||||
TIMESTAMP as TIMESTAMP,
|
||||
VARCHAR as VARCHAR,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
"SMALLINT",
|
||||
"BIGINT",
|
||||
"FLOAT",
|
||||
"FLOAT",
|
||||
"DATE",
|
||||
"TIME",
|
||||
"TEXT",
|
||||
"NUMERIC",
|
||||
"FLOAT",
|
||||
"TIMESTAMP",
|
||||
"VARCHAR",
|
||||
"CHAR",
|
||||
"BLOB",
|
||||
"dialect",
|
||||
)
|
||||
|
||||
dialect: Any
|
||||
108
stubs/SQLAlchemy/sqlalchemy/dialects/firebird/base.pyi
Normal file
108
stubs/SQLAlchemy/sqlalchemy/dialects/firebird/base.pyi
Normal file
@@ -0,0 +1,108 @@
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy import sql, types as sqltypes
|
||||
from sqlalchemy.engine import default
|
||||
from sqlalchemy.sql import compiler
|
||||
from sqlalchemy.types import (
|
||||
BIGINT as BIGINT,
|
||||
BLOB as BLOB,
|
||||
DATE as DATE,
|
||||
FLOAT as FLOAT,
|
||||
INTEGER as INTEGER,
|
||||
NUMERIC as NUMERIC,
|
||||
SMALLINT as SMALLINT,
|
||||
TEXT as TEXT,
|
||||
TIME as TIME,
|
||||
TIMESTAMP as TIMESTAMP,
|
||||
Integer as Integer,
|
||||
)
|
||||
|
||||
RESERVED_WORDS: Any
|
||||
|
||||
class _StringType(sqltypes.String):
|
||||
charset: Any
|
||||
def __init__(self, charset: Any | None = ..., **kw) -> None: ...
|
||||
|
||||
class VARCHAR(_StringType, sqltypes.VARCHAR):
|
||||
__visit_name__: str
|
||||
def __init__(self, length: Any | None = ..., **kwargs) -> None: ...
|
||||
|
||||
class CHAR(_StringType, sqltypes.CHAR):
|
||||
__visit_name__: str
|
||||
def __init__(self, length: Any | None = ..., **kwargs) -> None: ...
|
||||
|
||||
class _FBDateTime(sqltypes.DateTime):
|
||||
def bind_processor(self, dialect): ...
|
||||
|
||||
colspecs: Any
|
||||
ischema_names: Any
|
||||
|
||||
class FBTypeCompiler(compiler.GenericTypeCompiler):
|
||||
def visit_boolean(self, type_, **kw): ...
|
||||
def visit_datetime(self, type_, **kw): ...
|
||||
def visit_TEXT(self, type_, **kw): ...
|
||||
def visit_BLOB(self, type_, **kw): ...
|
||||
def visit_CHAR(self, type_, **kw): ...
|
||||
def visit_VARCHAR(self, type_, **kw): ...
|
||||
|
||||
class FBCompiler(sql.compiler.SQLCompiler):
|
||||
ansi_bind_rules: bool
|
||||
def visit_now_func(self, fn, **kw): ...
|
||||
def visit_startswith_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_not_startswith_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_mod_binary(self, binary, operator, **kw): ...
|
||||
def visit_alias(self, alias, asfrom: bool = ..., **kwargs): ... # type: ignore[override]
|
||||
def visit_substring_func(self, func, **kw): ...
|
||||
def visit_length_func(self, function, **kw): ...
|
||||
visit_char_length_func: Any
|
||||
def function_argspec(self, func, **kw): ...
|
||||
def default_from(self): ...
|
||||
def visit_sequence(self, seq, **kw): ...
|
||||
def get_select_precolumns(self, select, **kw): ...
|
||||
def limit_clause(self, select, **kw): ...
|
||||
def returning_clause(self, stmt, returning_cols): ...
|
||||
|
||||
class FBDDLCompiler(sql.compiler.DDLCompiler):
|
||||
def visit_create_sequence(self, create): ...
|
||||
def visit_drop_sequence(self, drop): ...
|
||||
def visit_computed_column(self, generated): ...
|
||||
|
||||
class FBIdentifierPreparer(sql.compiler.IdentifierPreparer):
|
||||
reserved_words: Any
|
||||
illegal_initial_characters: Any
|
||||
def __init__(self, dialect) -> None: ...
|
||||
|
||||
class FBExecutionContext(default.DefaultExecutionContext):
|
||||
def fire_sequence(self, seq, type_): ...
|
||||
|
||||
class FBDialect(default.DefaultDialect):
|
||||
name: str
|
||||
supports_statement_cache: bool
|
||||
max_identifier_length: int
|
||||
supports_sequences: bool
|
||||
sequences_optional: bool
|
||||
supports_default_values: bool
|
||||
postfetch_lastrowid: bool
|
||||
supports_native_boolean: bool
|
||||
requires_name_normalize: bool
|
||||
supports_empty_insert: bool
|
||||
statement_compiler: Any
|
||||
ddl_compiler: Any
|
||||
preparer: Any
|
||||
type_compiler: Any
|
||||
colspecs: Any
|
||||
ischema_names: Any
|
||||
construct_arguments: Any
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
implicit_returning: Any
|
||||
def initialize(self, connection) -> None: ...
|
||||
def has_table(self, connection, table_name, schema: Any | None = ...): ... # type: ignore[override]
|
||||
def has_sequence(self, connection, sequence_name, schema: Any | None = ...): ... # type: ignore[override]
|
||||
def get_table_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_view_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_view_definition(self, connection, view_name, schema: Any | None = ..., **kw): ...
|
||||
def get_pk_constraint(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_column_sequence(self, connection, table_name, column_name, schema: Any | None = ..., **kw): ...
|
||||
def get_columns(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_foreign_keys(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_indexes(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
10
stubs/SQLAlchemy/sqlalchemy/dialects/firebird/fdb.pyi
Normal file
10
stubs/SQLAlchemy/sqlalchemy/dialects/firebird/fdb.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from .kinterbasdb import FBDialect_kinterbasdb
|
||||
|
||||
class FBDialect_fdb(FBDialect_kinterbasdb):
|
||||
supports_statement_cache: bool
|
||||
def __init__(self, enable_rowcount: bool = ..., retaining: bool = ..., **kwargs) -> None: ...
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def create_connect_args(self, url): ...
|
||||
|
||||
dialect = FBDialect_fdb
|
||||
@@ -0,0 +1,38 @@
|
||||
from typing import Any
|
||||
|
||||
from ...types import Float, Numeric
|
||||
from .base import FBDialect, FBExecutionContext
|
||||
|
||||
class _kinterbasdb_numeric:
|
||||
def bind_processor(self, dialect): ...
|
||||
|
||||
class _FBNumeric_kinterbasdb(_kinterbasdb_numeric, Numeric): ...
|
||||
class _FBFloat_kinterbasdb(_kinterbasdb_numeric, Float): ...
|
||||
|
||||
class FBExecutionContext_kinterbasdb(FBExecutionContext):
|
||||
@property
|
||||
def rowcount(self): ...
|
||||
|
||||
class FBDialect_kinterbasdb(FBDialect):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
supports_sane_rowcount: bool
|
||||
supports_sane_multi_rowcount: bool
|
||||
supports_native_decimal: bool
|
||||
colspecs: Any
|
||||
enable_rowcount: Any
|
||||
type_conv: Any
|
||||
concurrency_level: Any
|
||||
retaining: Any
|
||||
def __init__(
|
||||
self, type_conv: int = ..., concurrency_level: int = ..., enable_rowcount: bool = ..., retaining: bool = ..., **kwargs
|
||||
) -> None: ...
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def do_execute(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
def do_rollback(self, dbapi_connection) -> None: ...
|
||||
def do_commit(self, dbapi_connection) -> None: ...
|
||||
def create_connect_args(self, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
|
||||
dialect = FBDialect_kinterbasdb
|
||||
76
stubs/SQLAlchemy/sqlalchemy/dialects/mssql/__init__.pyi
Normal file
76
stubs/SQLAlchemy/sqlalchemy/dialects/mssql/__init__.pyi
Normal file
@@ -0,0 +1,76 @@
|
||||
from typing import Any
|
||||
|
||||
from .base import (
|
||||
BIGINT as BIGINT,
|
||||
BINARY as BINARY,
|
||||
BIT as BIT,
|
||||
CHAR as CHAR,
|
||||
DATE as DATE,
|
||||
DATETIME as DATETIME,
|
||||
DATETIME2 as DATETIME2,
|
||||
DATETIMEOFFSET as DATETIMEOFFSET,
|
||||
DECIMAL as DECIMAL,
|
||||
FLOAT as FLOAT,
|
||||
IMAGE as IMAGE,
|
||||
INTEGER as INTEGER,
|
||||
JSON as JSON,
|
||||
MONEY as MONEY,
|
||||
NCHAR as NCHAR,
|
||||
NTEXT as NTEXT,
|
||||
NUMERIC as NUMERIC,
|
||||
NVARCHAR as NVARCHAR,
|
||||
REAL as REAL,
|
||||
ROWVERSION as ROWVERSION,
|
||||
SMALLDATETIME as SMALLDATETIME,
|
||||
SMALLINT as SMALLINT,
|
||||
SMALLMONEY as SMALLMONEY,
|
||||
SQL_VARIANT as SQL_VARIANT,
|
||||
TEXT as TEXT,
|
||||
TIME as TIME,
|
||||
TIMESTAMP as TIMESTAMP,
|
||||
TINYINT as TINYINT,
|
||||
UNIQUEIDENTIFIER as UNIQUEIDENTIFIER,
|
||||
VARBINARY as VARBINARY,
|
||||
VARCHAR as VARCHAR,
|
||||
XML as XML,
|
||||
try_cast as try_cast,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
"JSON",
|
||||
"INTEGER",
|
||||
"BIGINT",
|
||||
"SMALLINT",
|
||||
"TINYINT",
|
||||
"VARCHAR",
|
||||
"NVARCHAR",
|
||||
"CHAR",
|
||||
"NCHAR",
|
||||
"TEXT",
|
||||
"NTEXT",
|
||||
"DECIMAL",
|
||||
"NUMERIC",
|
||||
"FLOAT",
|
||||
"DATETIME",
|
||||
"DATETIME2",
|
||||
"DATETIMEOFFSET",
|
||||
"DATE",
|
||||
"TIME",
|
||||
"SMALLDATETIME",
|
||||
"BINARY",
|
||||
"VARBINARY",
|
||||
"BIT",
|
||||
"REAL",
|
||||
"IMAGE",
|
||||
"TIMESTAMP",
|
||||
"ROWVERSION",
|
||||
"MONEY",
|
||||
"SMALLMONEY",
|
||||
"UNIQUEIDENTIFIER",
|
||||
"SQL_VARIANT",
|
||||
"XML",
|
||||
"dialect",
|
||||
"try_cast",
|
||||
)
|
||||
|
||||
dialect: Any
|
||||
316
stubs/SQLAlchemy/sqlalchemy/dialects/mssql/base.pyi
Normal file
316
stubs/SQLAlchemy/sqlalchemy/dialects/mssql/base.pyi
Normal file
@@ -0,0 +1,316 @@
|
||||
from typing import Any
|
||||
|
||||
import sqlalchemy.types as sqltypes
|
||||
|
||||
from ...engine import default
|
||||
from ...sql import compiler
|
||||
from ...sql.elements import Cast
|
||||
from ...types import (
|
||||
BIGINT as BIGINT,
|
||||
BINARY as BINARY,
|
||||
CHAR as CHAR,
|
||||
DATE as DATE,
|
||||
DATETIME as DATETIME,
|
||||
DECIMAL as DECIMAL,
|
||||
FLOAT as FLOAT,
|
||||
INTEGER as INTEGER,
|
||||
NCHAR as NCHAR,
|
||||
NUMERIC as NUMERIC,
|
||||
NVARCHAR as NVARCHAR,
|
||||
SMALLINT as SMALLINT,
|
||||
TEXT as TEXT,
|
||||
VARCHAR as VARCHAR,
|
||||
)
|
||||
from .json import JSON as JSON
|
||||
|
||||
MS_2017_VERSION: Any
|
||||
MS_2016_VERSION: Any
|
||||
MS_2014_VERSION: Any
|
||||
MS_2012_VERSION: Any
|
||||
MS_2008_VERSION: Any
|
||||
MS_2005_VERSION: Any
|
||||
MS_2000_VERSION: Any
|
||||
RESERVED_WORDS: Any
|
||||
|
||||
class REAL(sqltypes.REAL):
|
||||
__visit_name__: str
|
||||
def __init__(self, **kw) -> None: ...
|
||||
|
||||
class TINYINT(sqltypes.Integer):
|
||||
__visit_name__: str
|
||||
|
||||
class _MSDate(sqltypes.Date):
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class TIME(sqltypes.TIME):
|
||||
precision: Any
|
||||
def __init__(self, precision: Any | None = ..., **kwargs) -> None: ...
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
_MSTime = TIME
|
||||
|
||||
class _BASETIMEIMPL(TIME):
|
||||
__visit_name__: str
|
||||
|
||||
class _DateTimeBase:
|
||||
def bind_processor(self, dialect): ...
|
||||
|
||||
class _MSDateTime(_DateTimeBase, sqltypes.DateTime): ...
|
||||
|
||||
class SMALLDATETIME(_DateTimeBase, sqltypes.DateTime):
|
||||
__visit_name__: str
|
||||
|
||||
class DATETIME2(_DateTimeBase, sqltypes.DateTime):
|
||||
__visit_name__: str
|
||||
precision: Any
|
||||
def __init__(self, precision: Any | None = ..., **kw) -> None: ...
|
||||
|
||||
class DATETIMEOFFSET(_DateTimeBase, sqltypes.DateTime):
|
||||
__visit_name__: str
|
||||
precision: Any
|
||||
def __init__(self, precision: Any | None = ..., **kw) -> None: ...
|
||||
|
||||
class _UnicodeLiteral:
|
||||
def literal_processor(self, dialect): ...
|
||||
|
||||
class _MSUnicode(_UnicodeLiteral, sqltypes.Unicode): ...
|
||||
class _MSUnicodeText(_UnicodeLiteral, sqltypes.UnicodeText): ...
|
||||
|
||||
class TIMESTAMP(sqltypes._Binary):
|
||||
__visit_name__: str
|
||||
length: Any
|
||||
convert_int: Any
|
||||
def __init__(self, convert_int: bool = ...) -> None: ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class ROWVERSION(TIMESTAMP):
|
||||
__visit_name__: str
|
||||
|
||||
class NTEXT(sqltypes.UnicodeText):
|
||||
__visit_name__: str
|
||||
|
||||
class VARBINARY(sqltypes.VARBINARY, sqltypes.LargeBinary):
|
||||
__visit_name__: str
|
||||
|
||||
class IMAGE(sqltypes.LargeBinary):
|
||||
__visit_name__: str
|
||||
|
||||
class XML(sqltypes.Text):
|
||||
__visit_name__: str
|
||||
|
||||
class BIT(sqltypes.Boolean):
|
||||
__visit_name__: str
|
||||
|
||||
class MONEY(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class SMALLMONEY(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class UNIQUEIDENTIFIER(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class SQL_VARIANT(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class TryCast(Cast):
|
||||
__visit_name__: str
|
||||
stringify_dialect: str
|
||||
inherit_cache: bool
|
||||
def __init__(self, *arg, **kw) -> None: ...
|
||||
|
||||
try_cast: Any
|
||||
MSDateTime: Any
|
||||
MSDate: Any
|
||||
MSReal = REAL
|
||||
MSTinyInteger = TINYINT
|
||||
MSTime = TIME
|
||||
MSSmallDateTime = SMALLDATETIME
|
||||
MSDateTime2 = DATETIME2
|
||||
MSDateTimeOffset = DATETIMEOFFSET
|
||||
MSText = TEXT
|
||||
MSNText = NTEXT
|
||||
MSString = VARCHAR
|
||||
MSNVarchar = NVARCHAR
|
||||
MSChar = CHAR
|
||||
MSNChar = NCHAR
|
||||
MSBinary = BINARY
|
||||
MSVarBinary = VARBINARY
|
||||
MSImage = IMAGE
|
||||
MSBit = BIT
|
||||
MSMoney = MONEY
|
||||
MSSmallMoney = SMALLMONEY
|
||||
MSUniqueIdentifier = UNIQUEIDENTIFIER
|
||||
MSVariant = SQL_VARIANT
|
||||
ischema_names: Any
|
||||
|
||||
class MSTypeCompiler(compiler.GenericTypeCompiler):
|
||||
def visit_FLOAT(self, type_, **kw): ...
|
||||
def visit_TINYINT(self, type_, **kw): ...
|
||||
def visit_TIME(self, type_, **kw): ...
|
||||
def visit_TIMESTAMP(self, type_, **kw): ...
|
||||
def visit_ROWVERSION(self, type_, **kw): ...
|
||||
def visit_datetime(self, type_, **kw): ...
|
||||
def visit_DATETIMEOFFSET(self, type_, **kw): ...
|
||||
def visit_DATETIME2(self, type_, **kw): ...
|
||||
def visit_SMALLDATETIME(self, type_, **kw): ...
|
||||
def visit_unicode(self, type_, **kw): ...
|
||||
def visit_text(self, type_, **kw): ...
|
||||
def visit_unicode_text(self, type_, **kw): ...
|
||||
def visit_NTEXT(self, type_, **kw): ...
|
||||
def visit_TEXT(self, type_, **kw): ...
|
||||
def visit_VARCHAR(self, type_, **kw): ...
|
||||
def visit_CHAR(self, type_, **kw): ...
|
||||
def visit_NCHAR(self, type_, **kw): ...
|
||||
def visit_NVARCHAR(self, type_, **kw): ...
|
||||
def visit_date(self, type_, **kw): ...
|
||||
def visit__BASETIMEIMPL(self, type_, **kw): ...
|
||||
def visit_time(self, type_, **kw): ...
|
||||
def visit_large_binary(self, type_, **kw): ...
|
||||
def visit_IMAGE(self, type_, **kw): ...
|
||||
def visit_XML(self, type_, **kw): ...
|
||||
def visit_VARBINARY(self, type_, **kw): ...
|
||||
def visit_boolean(self, type_, **kw): ...
|
||||
def visit_BIT(self, type_, **kw): ...
|
||||
def visit_JSON(self, type_, **kw): ...
|
||||
def visit_MONEY(self, type_, **kw): ...
|
||||
def visit_SMALLMONEY(self, type_, **kw): ...
|
||||
def visit_UNIQUEIDENTIFIER(self, type_, **kw): ...
|
||||
def visit_SQL_VARIANT(self, type_, **kw): ...
|
||||
|
||||
class MSExecutionContext(default.DefaultExecutionContext):
|
||||
def pre_exec(self) -> None: ...
|
||||
cursor_fetch_strategy: Any
|
||||
def post_exec(self) -> None: ...
|
||||
def get_lastrowid(self): ...
|
||||
@property
|
||||
def rowcount(self): ...
|
||||
def handle_dbapi_exception(self, e) -> None: ...
|
||||
def get_result_cursor_strategy(self, result): ...
|
||||
def fire_sequence(self, seq, type_): ...
|
||||
def get_insert_default(self, column): ...
|
||||
|
||||
class MSSQLCompiler(compiler.SQLCompiler):
|
||||
returning_precedes_values: bool
|
||||
extract_map: Any
|
||||
tablealiases: Any
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def visit_now_func(self, fn, **kw): ...
|
||||
def visit_current_date_func(self, fn, **kw): ...
|
||||
def visit_length_func(self, fn, **kw): ...
|
||||
def visit_char_length_func(self, fn, **kw): ...
|
||||
def visit_concat_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_true(self, expr, **kw): ...
|
||||
def visit_false(self, expr, **kw): ...
|
||||
def visit_match_op_binary(self, binary, operator, **kw): ...
|
||||
def get_select_precolumns(self, select, **kw): ...
|
||||
def get_from_hint_text(self, table, text): ...
|
||||
def get_crud_hint_text(self, table, text): ...
|
||||
def fetch_clause(self, cs, **kwargs): ...
|
||||
def limit_clause(self, cs, **kwargs): ...
|
||||
def visit_try_cast(self, element, **kw): ...
|
||||
def translate_select_structure(self, select_stmt, **kwargs): ...
|
||||
def visit_table(self, table, mssql_aliased: bool = ..., iscrud: bool = ..., **kwargs): ... # type: ignore[override]
|
||||
def visit_alias(self, alias, **kw): ...
|
||||
def visit_column(self, column, add_to_result_map: Any | None = ..., **kw): ... # type: ignore[override]
|
||||
def visit_extract(self, extract, **kw): ...
|
||||
def visit_savepoint(self, savepoint_stmt): ...
|
||||
def visit_rollback_to_savepoint(self, savepoint_stmt): ...
|
||||
def visit_binary(self, binary, **kwargs): ...
|
||||
def returning_clause(self, stmt, returning_cols): ...
|
||||
def get_cte_preamble(self, recursive): ...
|
||||
def label_select_column(self, select, column, asfrom): ...
|
||||
def for_update_clause(self, select, **kw): ...
|
||||
def order_by_clause(self, select, **kw): ...
|
||||
def update_from_clause(self, update_stmt, from_table, extra_froms, from_hints, **kw): ...
|
||||
def delete_table_clause(self, delete_stmt, from_table, extra_froms): ...
|
||||
def delete_extra_from_clause(self, delete_stmt, from_table, extra_froms, from_hints, **kw): ...
|
||||
def visit_empty_set_expr(self, type_): ...
|
||||
def visit_is_distinct_from_binary(self, binary, operator, **kw): ...
|
||||
def visit_is_not_distinct_from_binary(self, binary, operator, **kw): ...
|
||||
def visit_json_getitem_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_json_path_getitem_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_sequence(self, seq, **kw): ...
|
||||
|
||||
class MSSQLStrictCompiler(MSSQLCompiler):
|
||||
ansi_bind_rules: bool
|
||||
def visit_in_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_not_in_op_binary(self, binary, operator, **kw): ...
|
||||
def render_literal_value(self, value, type_): ...
|
||||
|
||||
class MSDDLCompiler(compiler.DDLCompiler):
|
||||
def get_column_specification(self, column, **kwargs): ...
|
||||
def visit_create_index(self, create, include_schema: bool = ...): ... # type: ignore[override]
|
||||
def visit_drop_index(self, drop): ...
|
||||
def visit_primary_key_constraint(self, constraint): ...
|
||||
def visit_unique_constraint(self, constraint): ...
|
||||
def visit_computed_column(self, generated): ...
|
||||
def visit_create_sequence(self, create, **kw): ...
|
||||
def visit_identity_column(self, identity, **kw): ...
|
||||
|
||||
class MSIdentifierPreparer(compiler.IdentifierPreparer):
|
||||
reserved_words: Any
|
||||
def __init__(self, dialect) -> None: ...
|
||||
def quote_schema(self, schema, force: Any | None = ...): ...
|
||||
|
||||
class MSDialect(default.DefaultDialect):
|
||||
name: str
|
||||
supports_statement_cache: bool
|
||||
supports_default_values: bool
|
||||
supports_empty_insert: bool
|
||||
use_scope_identity: bool
|
||||
max_identifier_length: int
|
||||
schema_name: str
|
||||
implicit_returning: bool
|
||||
full_returning: bool
|
||||
colspecs: Any
|
||||
engine_config_types: Any
|
||||
ischema_names: Any
|
||||
supports_sequences: bool
|
||||
sequences_optional: bool
|
||||
default_sequence_base: int
|
||||
supports_native_boolean: bool
|
||||
non_native_boolean_check_constraint: bool
|
||||
supports_unicode_binds: bool
|
||||
postfetch_lastrowid: bool
|
||||
legacy_schema_aliasing: bool
|
||||
server_version_info: Any
|
||||
statement_compiler: Any
|
||||
ddl_compiler: Any
|
||||
type_compiler: Any
|
||||
preparer: Any
|
||||
construct_arguments: Any
|
||||
query_timeout: Any
|
||||
deprecate_large_types: Any
|
||||
isolation_level: Any
|
||||
def __init__(
|
||||
self,
|
||||
query_timeout: Any | None = ...,
|
||||
use_scope_identity: bool = ...,
|
||||
schema_name: str = ...,
|
||||
isolation_level: Any | None = ...,
|
||||
deprecate_large_types: Any | None = ...,
|
||||
json_serializer: Any | None = ...,
|
||||
json_deserializer: Any | None = ...,
|
||||
legacy_schema_aliasing: Any | None = ...,
|
||||
**opts,
|
||||
) -> None: ...
|
||||
def do_savepoint(self, connection, name) -> None: ...
|
||||
def do_release_savepoint(self, connection, name) -> None: ...
|
||||
def set_isolation_level(self, connection, level) -> None: ...
|
||||
def get_isolation_level(self, connection): ...
|
||||
def initialize(self, connection) -> None: ...
|
||||
def on_connect(self): ...
|
||||
def has_table(self, connection, tablename, dbname, owner, schema): ...
|
||||
def has_sequence(self, connection, sequencename, dbname, owner, schema): ...
|
||||
def get_sequence_names(self, connection, dbname, owner, schema, **kw): ...
|
||||
def get_schema_names(self, connection, **kw): ...
|
||||
def get_table_names(self, connection, dbname, owner, schema, **kw): ...
|
||||
def get_view_names(self, connection, dbname, owner, schema, **kw): ...
|
||||
def get_indexes(self, connection, tablename, dbname, owner, schema, **kw): ...
|
||||
def get_view_definition(self, connection, viewname, dbname, owner, schema, **kw): ...
|
||||
def get_columns(self, connection, tablename, dbname, owner, schema, **kw): ...
|
||||
def get_pk_constraint(self, connection, tablename, dbname, owner, schema, **kw): ...
|
||||
def get_foreign_keys(self, connection, tablename, dbname, owner, schema, **kw): ...
|
||||
@@ -0,0 +1,35 @@
|
||||
from typing import Any
|
||||
|
||||
from ...sql import expression
|
||||
from ...types import TypeDecorator
|
||||
|
||||
ischema: Any
|
||||
|
||||
class CoerceUnicode(TypeDecorator):
|
||||
impl: Any
|
||||
cache_ok: bool
|
||||
def process_bind_param(self, value, dialect): ...
|
||||
def bind_expression(self, bindvalue): ...
|
||||
|
||||
class _cast_on_2005(expression.ColumnElement):
|
||||
bindvalue: Any
|
||||
def __init__(self, bindvalue) -> None: ...
|
||||
|
||||
schemata: Any
|
||||
tables: Any
|
||||
columns: Any
|
||||
mssql_temp_table_columns: Any
|
||||
constraints: Any
|
||||
column_constraints: Any
|
||||
key_constraints: Any
|
||||
ref_constraints: Any
|
||||
views: Any
|
||||
computed_columns: Any
|
||||
sequences: Any
|
||||
|
||||
class IdentitySqlVariant(TypeDecorator):
|
||||
impl: Any
|
||||
cache_ok: bool
|
||||
def column_expression(self, colexpr): ...
|
||||
|
||||
identity_columns: Any
|
||||
10
stubs/SQLAlchemy/sqlalchemy/dialects/mssql/json.pyi
Normal file
10
stubs/SQLAlchemy/sqlalchemy/dialects/mssql/json.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from ...types import JSON as _JSON
|
||||
|
||||
class JSON(_JSON): ...
|
||||
|
||||
class _FormatTypeMixin:
|
||||
def bind_processor(self, dialect): ...
|
||||
def literal_processor(self, dialect): ...
|
||||
|
||||
class JSONIndexType(_FormatTypeMixin, _JSON.JSONIndexType): ...
|
||||
class JSONPathType(_FormatTypeMixin, _JSON.JSONPathType): ...
|
||||
26
stubs/SQLAlchemy/sqlalchemy/dialects/mssql/mxodbc.pyi
Normal file
26
stubs/SQLAlchemy/sqlalchemy/dialects/mssql/mxodbc.pyi
Normal file
@@ -0,0 +1,26 @@
|
||||
from typing import Any
|
||||
|
||||
from ...connectors.mxodbc import MxODBCConnector
|
||||
from .base import VARBINARY, MSDialect, _MSDate, _MSTime
|
||||
from .pyodbc import MSExecutionContext_pyodbc, _MSNumeric_pyodbc
|
||||
|
||||
class _MSNumeric_mxodbc(_MSNumeric_pyodbc): ...
|
||||
|
||||
class _MSDate_mxodbc(_MSDate):
|
||||
def bind_processor(self, dialect): ...
|
||||
|
||||
class _MSTime_mxodbc(_MSTime):
|
||||
def bind_processor(self, dialect): ...
|
||||
|
||||
class _VARBINARY_mxodbc(VARBINARY):
|
||||
def bind_processor(self, dialect): ...
|
||||
|
||||
class MSExecutionContext_mxodbc(MSExecutionContext_pyodbc): ...
|
||||
|
||||
class MSDialect_mxodbc(MxODBCConnector, MSDialect):
|
||||
supports_statement_cache: bool
|
||||
colspecs: Any
|
||||
description_encoding: Any
|
||||
def __init__(self, description_encoding: Any | None = ..., **params) -> None: ...
|
||||
|
||||
dialect = MSDialect_mxodbc
|
||||
24
stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pymssql.pyi
Normal file
24
stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pymssql.pyi
Normal file
@@ -0,0 +1,24 @@
|
||||
from typing import Any
|
||||
|
||||
from ...types import Numeric
|
||||
from .base import MSDialect, MSIdentifierPreparer
|
||||
|
||||
class _MSNumeric_pymssql(Numeric):
|
||||
def result_processor(self, dialect, type_): ...
|
||||
|
||||
class MSIdentifierPreparer_pymssql(MSIdentifierPreparer):
|
||||
def __init__(self, dialect) -> None: ...
|
||||
|
||||
class MSDialect_pymssql(MSDialect):
|
||||
supports_statement_cache: bool
|
||||
supports_native_decimal: bool
|
||||
driver: str
|
||||
preparer: Any
|
||||
colspecs: Any
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def create_connect_args(self, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
def set_isolation_level(self, connection, level) -> None: ...
|
||||
|
||||
dialect = MSDialect_pymssql
|
||||
44
stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pyodbc.pyi
Normal file
44
stubs/SQLAlchemy/sqlalchemy/dialects/mssql/pyodbc.pyi
Normal file
@@ -0,0 +1,44 @@
|
||||
from typing import Any
|
||||
|
||||
from ...connectors.pyodbc import PyODBCConnector
|
||||
from ...types import DateTime, Float, Numeric
|
||||
from .base import BINARY, DATETIMEOFFSET, VARBINARY, MSDialect, MSExecutionContext
|
||||
|
||||
class _ms_numeric_pyodbc:
|
||||
def bind_processor(self, dialect): ...
|
||||
|
||||
class _MSNumeric_pyodbc(_ms_numeric_pyodbc, Numeric): ...
|
||||
class _MSFloat_pyodbc(_ms_numeric_pyodbc, Float): ...
|
||||
|
||||
class _ms_binary_pyodbc:
|
||||
def bind_processor(self, dialect): ...
|
||||
|
||||
class _ODBCDateTimeBindProcessor:
|
||||
has_tz: bool
|
||||
def bind_processor(self, dialect): ...
|
||||
|
||||
class _ODBCDateTime(_ODBCDateTimeBindProcessor, DateTime): ...
|
||||
|
||||
class _ODBCDATETIMEOFFSET(_ODBCDateTimeBindProcessor, DATETIMEOFFSET):
|
||||
has_tz: bool
|
||||
|
||||
class _VARBINARY_pyodbc(_ms_binary_pyodbc, VARBINARY): ...
|
||||
class _BINARY_pyodbc(_ms_binary_pyodbc, BINARY): ...
|
||||
|
||||
class MSExecutionContext_pyodbc(MSExecutionContext):
|
||||
def pre_exec(self) -> None: ...
|
||||
def post_exec(self) -> None: ...
|
||||
|
||||
class MSDialect_pyodbc(PyODBCConnector, MSDialect):
|
||||
supports_statement_cache: bool
|
||||
supports_sane_rowcount_returning: bool
|
||||
colspecs: Any
|
||||
description_encoding: Any
|
||||
use_scope_identity: Any
|
||||
fast_executemany: Any
|
||||
def __init__(self, description_encoding: Any | None = ..., fast_executemany: bool = ..., **params) -> None: ...
|
||||
def on_connect(self): ...
|
||||
def do_executemany(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
|
||||
dialect = MSDialect_pyodbc
|
||||
85
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/__init__.pyi
Normal file
85
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/__init__.pyi
Normal file
@@ -0,0 +1,85 @@
|
||||
from typing import Any
|
||||
|
||||
from .base import (
|
||||
BIGINT as BIGINT,
|
||||
BINARY as BINARY,
|
||||
BIT as BIT,
|
||||
BLOB as BLOB,
|
||||
BOOLEAN as BOOLEAN,
|
||||
CHAR as CHAR,
|
||||
DATE as DATE,
|
||||
DATETIME as DATETIME,
|
||||
DECIMAL as DECIMAL,
|
||||
DOUBLE as DOUBLE,
|
||||
ENUM as ENUM,
|
||||
FLOAT as FLOAT,
|
||||
INTEGER as INTEGER,
|
||||
JSON as JSON,
|
||||
LONGBLOB as LONGBLOB,
|
||||
LONGTEXT as LONGTEXT,
|
||||
MEDIUMBLOB as MEDIUMBLOB,
|
||||
MEDIUMINT as MEDIUMINT,
|
||||
MEDIUMTEXT as MEDIUMTEXT,
|
||||
NCHAR as NCHAR,
|
||||
NUMERIC as NUMERIC,
|
||||
NVARCHAR as NVARCHAR,
|
||||
REAL as REAL,
|
||||
SET as SET,
|
||||
SMALLINT as SMALLINT,
|
||||
TEXT as TEXT,
|
||||
TIME as TIME,
|
||||
TIMESTAMP as TIMESTAMP,
|
||||
TINYBLOB as TINYBLOB,
|
||||
TINYINT as TINYINT,
|
||||
TINYTEXT as TINYTEXT,
|
||||
VARBINARY as VARBINARY,
|
||||
VARCHAR as VARCHAR,
|
||||
YEAR as YEAR,
|
||||
)
|
||||
from .dml import Insert as Insert, insert as insert
|
||||
from .expression import match as match
|
||||
|
||||
__all__ = (
|
||||
"BIGINT",
|
||||
"BINARY",
|
||||
"BIT",
|
||||
"BLOB",
|
||||
"BOOLEAN",
|
||||
"CHAR",
|
||||
"DATE",
|
||||
"DATETIME",
|
||||
"DECIMAL",
|
||||
"DOUBLE",
|
||||
"ENUM",
|
||||
"DECIMAL",
|
||||
"FLOAT",
|
||||
"INTEGER",
|
||||
"INTEGER",
|
||||
"JSON",
|
||||
"LONGBLOB",
|
||||
"LONGTEXT",
|
||||
"MEDIUMBLOB",
|
||||
"MEDIUMINT",
|
||||
"MEDIUMTEXT",
|
||||
"NCHAR",
|
||||
"NVARCHAR",
|
||||
"NUMERIC",
|
||||
"SET",
|
||||
"SMALLINT",
|
||||
"REAL",
|
||||
"TEXT",
|
||||
"TIME",
|
||||
"TIMESTAMP",
|
||||
"TINYBLOB",
|
||||
"TINYINT",
|
||||
"TINYTEXT",
|
||||
"VARBINARY",
|
||||
"VARCHAR",
|
||||
"YEAR",
|
||||
"dialect",
|
||||
"insert",
|
||||
"Insert",
|
||||
"match",
|
||||
)
|
||||
|
||||
dialect: Any
|
||||
73
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/aiomysql.pyi
Normal file
73
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/aiomysql.pyi
Normal file
@@ -0,0 +1,73 @@
|
||||
from typing import Any
|
||||
|
||||
from ...engine import AdaptedConnection
|
||||
from .pymysql import MySQLDialect_pymysql
|
||||
|
||||
class AsyncAdapt_aiomysql_cursor:
|
||||
server_side: bool
|
||||
await_: Any
|
||||
def __init__(self, adapt_connection) -> None: ...
|
||||
@property
|
||||
def description(self): ...
|
||||
@property
|
||||
def rowcount(self): ...
|
||||
@property
|
||||
def arraysize(self): ...
|
||||
@arraysize.setter
|
||||
def arraysize(self, value) -> None: ...
|
||||
@property
|
||||
def lastrowid(self): ...
|
||||
def close(self) -> None: ...
|
||||
def execute(self, operation, parameters: Any | None = ...): ...
|
||||
def executemany(self, operation, seq_of_parameters): ...
|
||||
def setinputsizes(self, *inputsizes) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def fetchone(self): ...
|
||||
def fetchmany(self, size: Any | None = ...): ...
|
||||
def fetchall(self): ...
|
||||
|
||||
class AsyncAdapt_aiomysql_ss_cursor(AsyncAdapt_aiomysql_cursor):
|
||||
server_side: bool
|
||||
await_: Any
|
||||
def __init__(self, adapt_connection) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def fetchone(self): ...
|
||||
def fetchmany(self, size: Any | None = ...): ...
|
||||
def fetchall(self): ...
|
||||
|
||||
class AsyncAdapt_aiomysql_connection(AdaptedConnection):
|
||||
await_: Any
|
||||
dbapi: Any
|
||||
def __init__(self, dbapi, connection) -> None: ...
|
||||
def ping(self, reconnect): ...
|
||||
def character_set_name(self): ...
|
||||
def autocommit(self, value) -> None: ...
|
||||
def cursor(self, server_side: bool = ...): ...
|
||||
def rollback(self) -> None: ...
|
||||
def commit(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
class AsyncAdaptFallback_aiomysql_connection(AsyncAdapt_aiomysql_connection):
|
||||
await_: Any
|
||||
|
||||
class AsyncAdapt_aiomysql_dbapi:
|
||||
aiomysql: Any
|
||||
pymysql: Any
|
||||
paramstyle: str
|
||||
def __init__(self, aiomysql, pymysql) -> None: ...
|
||||
def connect(self, *arg, **kw): ...
|
||||
|
||||
class MySQLDialect_aiomysql(MySQLDialect_pymysql):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
supports_server_side_cursors: bool
|
||||
is_async: bool
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
@classmethod
|
||||
def get_pool_class(cls, url): ...
|
||||
def create_connect_args(self, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
def get_driver_connection(self, connection): ...
|
||||
|
||||
dialect = MySQLDialect_aiomysql
|
||||
73
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/asyncmy.pyi
Normal file
73
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/asyncmy.pyi
Normal file
@@ -0,0 +1,73 @@
|
||||
from typing import Any
|
||||
|
||||
from ...engine import AdaptedConnection
|
||||
from .pymysql import MySQLDialect_pymysql
|
||||
|
||||
class AsyncAdapt_asyncmy_cursor:
|
||||
server_side: bool
|
||||
await_: Any
|
||||
def __init__(self, adapt_connection) -> None: ...
|
||||
@property
|
||||
def description(self): ...
|
||||
@property
|
||||
def rowcount(self): ...
|
||||
@property
|
||||
def arraysize(self): ...
|
||||
@arraysize.setter
|
||||
def arraysize(self, value) -> None: ...
|
||||
@property
|
||||
def lastrowid(self): ...
|
||||
def close(self) -> None: ...
|
||||
def execute(self, operation, parameters: Any | None = ...): ...
|
||||
def executemany(self, operation, seq_of_parameters): ...
|
||||
def setinputsizes(self, *inputsizes) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def fetchone(self): ...
|
||||
def fetchmany(self, size: Any | None = ...): ...
|
||||
def fetchall(self): ...
|
||||
|
||||
class AsyncAdapt_asyncmy_ss_cursor(AsyncAdapt_asyncmy_cursor):
|
||||
server_side: bool
|
||||
await_: Any
|
||||
def __init__(self, adapt_connection) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def fetchone(self): ...
|
||||
def fetchmany(self, size: Any | None = ...): ...
|
||||
def fetchall(self): ...
|
||||
|
||||
class AsyncAdapt_asyncmy_connection(AdaptedConnection):
|
||||
await_: Any
|
||||
dbapi: Any
|
||||
def __init__(self, dbapi, connection) -> None: ...
|
||||
def ping(self, reconnect): ...
|
||||
def character_set_name(self): ...
|
||||
def autocommit(self, value) -> None: ...
|
||||
def cursor(self, server_side: bool = ...): ...
|
||||
def rollback(self) -> None: ...
|
||||
def commit(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
class AsyncAdaptFallback_asyncmy_connection(AsyncAdapt_asyncmy_connection):
|
||||
await_: Any
|
||||
|
||||
class AsyncAdapt_asyncmy_dbapi:
|
||||
asyncmy: Any
|
||||
pymysql: Any
|
||||
paramstyle: str
|
||||
def __init__(self, asyncmy, pymysql) -> None: ...
|
||||
def connect(self, *arg, **kw): ...
|
||||
|
||||
class MySQLDialect_asyncmy(MySQLDialect_pymysql):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
supports_server_side_cursors: bool
|
||||
is_async: bool
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
@classmethod
|
||||
def get_pool_class(cls, url): ...
|
||||
def create_connect_args(self, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
def get_driver_connection(self, connection): ...
|
||||
|
||||
dialect = MySQLDialect_asyncmy
|
||||
239
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi
Normal file
239
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/base.pyi
Normal file
@@ -0,0 +1,239 @@
|
||||
from typing import Any
|
||||
|
||||
from ...engine import default
|
||||
from ...sql import compiler
|
||||
from ...types import BINARY as BINARY, BLOB as BLOB, BOOLEAN as BOOLEAN, DATE as DATE, VARBINARY as VARBINARY
|
||||
from .enumerated import ENUM as ENUM, SET as SET
|
||||
from .json import JSON as JSON
|
||||
from .types import (
|
||||
BIGINT as BIGINT,
|
||||
BIT as BIT,
|
||||
CHAR as CHAR,
|
||||
DATETIME as DATETIME,
|
||||
DECIMAL as DECIMAL,
|
||||
DOUBLE as DOUBLE,
|
||||
FLOAT as FLOAT,
|
||||
INTEGER as INTEGER,
|
||||
LONGBLOB as LONGBLOB,
|
||||
LONGTEXT as LONGTEXT,
|
||||
MEDIUMBLOB as MEDIUMBLOB,
|
||||
MEDIUMINT as MEDIUMINT,
|
||||
MEDIUMTEXT as MEDIUMTEXT,
|
||||
NCHAR as NCHAR,
|
||||
NUMERIC as NUMERIC,
|
||||
NVARCHAR as NVARCHAR,
|
||||
REAL as REAL,
|
||||
SMALLINT as SMALLINT,
|
||||
TEXT as TEXT,
|
||||
TIME as TIME,
|
||||
TIMESTAMP as TIMESTAMP,
|
||||
TINYBLOB as TINYBLOB,
|
||||
TINYINT as TINYINT,
|
||||
TINYTEXT as TINYTEXT,
|
||||
VARCHAR as VARCHAR,
|
||||
YEAR as YEAR,
|
||||
)
|
||||
|
||||
AUTOCOMMIT_RE: Any
|
||||
SET_RE: Any
|
||||
MSTime = TIME
|
||||
MSSet = SET
|
||||
MSEnum = ENUM
|
||||
MSLongBlob = LONGBLOB
|
||||
MSMediumBlob = MEDIUMBLOB
|
||||
MSTinyBlob = TINYBLOB
|
||||
MSBlob = BLOB
|
||||
MSBinary = BINARY
|
||||
MSVarBinary = VARBINARY
|
||||
MSNChar = NCHAR
|
||||
MSNVarChar = NVARCHAR
|
||||
MSChar = CHAR
|
||||
MSString = VARCHAR
|
||||
MSLongText = LONGTEXT
|
||||
MSMediumText = MEDIUMTEXT
|
||||
MSTinyText = TINYTEXT
|
||||
MSText = TEXT
|
||||
MSYear = YEAR
|
||||
MSTimeStamp = TIMESTAMP
|
||||
MSBit = BIT
|
||||
MSSmallInteger = SMALLINT
|
||||
MSTinyInteger = TINYINT
|
||||
MSMediumInteger = MEDIUMINT
|
||||
MSBigInteger = BIGINT
|
||||
MSNumeric = NUMERIC
|
||||
MSDecimal = DECIMAL
|
||||
MSDouble = DOUBLE
|
||||
MSReal = REAL
|
||||
MSFloat = FLOAT
|
||||
MSInteger = INTEGER
|
||||
colspecs: Any
|
||||
ischema_names: Any
|
||||
|
||||
class MySQLExecutionContext(default.DefaultExecutionContext):
|
||||
def should_autocommit_text(self, statement): ...
|
||||
def create_server_side_cursor(self): ...
|
||||
def fire_sequence(self, seq, type_): ...
|
||||
|
||||
class MySQLCompiler(compiler.SQLCompiler):
|
||||
render_table_with_column_in_update_from: bool
|
||||
extract_map: Any
|
||||
def default_from(self): ...
|
||||
def visit_random_func(self, fn, **kw): ...
|
||||
def visit_sequence(self, seq, **kw): ...
|
||||
def visit_sysdate_func(self, fn, **kw): ...
|
||||
def visit_json_getitem_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_json_path_getitem_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_on_duplicate_key_update(self, on_duplicate, **kw): ...
|
||||
def visit_concat_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_mysql_match(self, element, **kw): ...
|
||||
def visit_match_op_binary(self, binary, operator, **kw): ...
|
||||
def get_from_hint_text(self, table, text): ...
|
||||
def visit_typeclause(self, typeclause, type_: Any | None = ..., **kw): ...
|
||||
def visit_cast(self, cast, **kw): ...
|
||||
def render_literal_value(self, value, type_): ...
|
||||
def visit_true(self, element, **kw): ...
|
||||
def visit_false(self, element, **kw): ...
|
||||
def get_select_precolumns(self, select, **kw): ...
|
||||
def visit_join(self, join, asfrom: bool = ..., from_linter: Any | None = ..., **kwargs): ...
|
||||
def for_update_clause(self, select, **kw): ...
|
||||
def limit_clause(self, select, **kw): ...
|
||||
def update_limit_clause(self, update_stmt): ...
|
||||
def update_tables_clause(self, update_stmt, from_table, extra_froms, **kw): ...
|
||||
def update_from_clause(self, update_stmt, from_table, extra_froms, from_hints, **kw) -> None: ...
|
||||
def delete_table_clause(self, delete_stmt, from_table, extra_froms): ...
|
||||
def delete_extra_from_clause(self, delete_stmt, from_table, extra_froms, from_hints, **kw): ...
|
||||
def visit_empty_set_expr(self, element_types): ...
|
||||
def visit_is_distinct_from_binary(self, binary, operator, **kw): ...
|
||||
def visit_is_not_distinct_from_binary(self, binary, operator, **kw): ...
|
||||
def visit_regexp_match_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_not_regexp_match_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_regexp_replace_op_binary(self, binary, operator, **kw): ...
|
||||
|
||||
class MySQLDDLCompiler(compiler.DDLCompiler):
|
||||
def get_column_specification(self, column, **kw): ...
|
||||
def post_create_table(self, table): ...
|
||||
def visit_create_index(self, create, **kw): ...
|
||||
def visit_primary_key_constraint(self, constraint): ...
|
||||
def visit_drop_index(self, drop): ...
|
||||
def visit_drop_constraint(self, drop): ...
|
||||
def define_constraint_match(self, constraint): ...
|
||||
def visit_set_table_comment(self, create): ...
|
||||
def visit_drop_table_comment(self, create): ...
|
||||
def visit_set_column_comment(self, create): ...
|
||||
|
||||
class MySQLTypeCompiler(compiler.GenericTypeCompiler):
|
||||
def visit_NUMERIC(self, type_, **kw): ...
|
||||
def visit_DECIMAL(self, type_, **kw): ...
|
||||
def visit_DOUBLE(self, type_, **kw): ...
|
||||
def visit_REAL(self, type_, **kw): ...
|
||||
def visit_FLOAT(self, type_, **kw): ...
|
||||
def visit_INTEGER(self, type_, **kw): ...
|
||||
def visit_BIGINT(self, type_, **kw): ...
|
||||
def visit_MEDIUMINT(self, type_, **kw): ...
|
||||
def visit_TINYINT(self, type_, **kw): ...
|
||||
def visit_SMALLINT(self, type_, **kw): ...
|
||||
def visit_BIT(self, type_, **kw): ...
|
||||
def visit_DATETIME(self, type_, **kw): ...
|
||||
def visit_DATE(self, type_, **kw): ...
|
||||
def visit_TIME(self, type_, **kw): ...
|
||||
def visit_TIMESTAMP(self, type_, **kw): ...
|
||||
def visit_YEAR(self, type_, **kw): ...
|
||||
def visit_TEXT(self, type_, **kw): ...
|
||||
def visit_TINYTEXT(self, type_, **kw): ...
|
||||
def visit_MEDIUMTEXT(self, type_, **kw): ...
|
||||
def visit_LONGTEXT(self, type_, **kw): ...
|
||||
def visit_VARCHAR(self, type_, **kw): ...
|
||||
def visit_CHAR(self, type_, **kw): ...
|
||||
def visit_NVARCHAR(self, type_, **kw): ...
|
||||
def visit_NCHAR(self, type_, **kw): ...
|
||||
def visit_VARBINARY(self, type_, **kw): ...
|
||||
def visit_JSON(self, type_, **kw): ...
|
||||
def visit_large_binary(self, type_, **kw): ...
|
||||
def visit_enum(self, type_, **kw): ...
|
||||
def visit_BLOB(self, type_, **kw): ...
|
||||
def visit_TINYBLOB(self, type_, **kw): ...
|
||||
def visit_MEDIUMBLOB(self, type_, **kw): ...
|
||||
def visit_LONGBLOB(self, type_, **kw): ...
|
||||
def visit_ENUM(self, type_, **kw): ...
|
||||
def visit_SET(self, type_, **kw): ...
|
||||
def visit_BOOLEAN(self, type_, **kw): ...
|
||||
|
||||
class MySQLIdentifierPreparer(compiler.IdentifierPreparer):
|
||||
reserved_words: Any
|
||||
def __init__(self, dialect, server_ansiquotes: bool = ..., **kw) -> None: ...
|
||||
|
||||
class MariaDBIdentifierPreparer(MySQLIdentifierPreparer):
|
||||
reserved_words: Any
|
||||
|
||||
class MySQLDialect(default.DefaultDialect):
|
||||
logger: Any
|
||||
name: str
|
||||
supports_statement_cache: bool
|
||||
supports_alter: bool
|
||||
supports_native_boolean: bool
|
||||
max_identifier_length: int
|
||||
max_index_name_length: int
|
||||
max_constraint_name_length: int
|
||||
supports_native_enum: bool
|
||||
supports_sequences: bool
|
||||
sequences_optional: bool
|
||||
supports_for_update_of: bool
|
||||
supports_default_values: bool
|
||||
supports_default_metavalue: bool
|
||||
supports_sane_rowcount: bool
|
||||
supports_sane_multi_rowcount: bool
|
||||
supports_multivalues_insert: bool
|
||||
supports_comments: bool
|
||||
inline_comments: bool
|
||||
default_paramstyle: str
|
||||
colspecs: Any
|
||||
cte_follows_insert: bool
|
||||
statement_compiler: Any
|
||||
ddl_compiler: Any
|
||||
type_compiler: Any
|
||||
ischema_names: Any
|
||||
preparer: Any
|
||||
is_mariadb: bool
|
||||
construct_arguments: Any
|
||||
isolation_level: Any
|
||||
def __init__(
|
||||
self,
|
||||
isolation_level: Any | None = ...,
|
||||
json_serializer: Any | None = ...,
|
||||
json_deserializer: Any | None = ...,
|
||||
is_mariadb: Any | None = ...,
|
||||
**kwargs,
|
||||
) -> None: ...
|
||||
def on_connect(self): ...
|
||||
def set_isolation_level(self, connection, level) -> None: ...
|
||||
def get_isolation_level(self, connection): ...
|
||||
def do_begin_twophase(self, connection, xid) -> None: ...
|
||||
def do_prepare_twophase(self, connection, xid) -> None: ...
|
||||
def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
def do_recover_twophase(self, connection): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
def has_table(self, connection, table_name, schema: Any | None = ...): ... # type: ignore[override]
|
||||
def has_sequence(self, connection, sequence_name, schema: Any | None = ...): ... # type: ignore[override]
|
||||
def get_sequence_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
identifier_preparer: Any
|
||||
def initialize(self, connection) -> None: ...
|
||||
def get_schema_names(self, connection, **kw): ...
|
||||
def get_table_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_view_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_table_options(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_columns(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_pk_constraint(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_foreign_keys(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_check_constraints(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_table_comment(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_indexes(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_unique_constraints(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_view_definition(self, connection, view_name, schema: Any | None = ..., **kw): ...
|
||||
|
||||
class _DecodingRow:
|
||||
rowproxy: Any
|
||||
charset: Any
|
||||
def __init__(self, rowproxy, charset) -> None: ...
|
||||
def __getitem__(self, index): ...
|
||||
def __getattr__(self, attr): ...
|
||||
21
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/cymysql.pyi
Normal file
21
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/cymysql.pyi
Normal file
@@ -0,0 +1,21 @@
|
||||
from typing import Any
|
||||
|
||||
from .base import BIT
|
||||
from .mysqldb import MySQLDialect_mysqldb
|
||||
|
||||
class _cymysqlBIT(BIT):
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class MySQLDialect_cymysql(MySQLDialect_mysqldb):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
description_encoding: Any
|
||||
supports_sane_rowcount: bool
|
||||
supports_sane_multi_rowcount: bool
|
||||
supports_unicode_statements: bool
|
||||
colspecs: Any
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
|
||||
dialect = MySQLDialect_cymysql
|
||||
23
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/dml.pyi
Normal file
23
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/dml.pyi
Normal file
@@ -0,0 +1,23 @@
|
||||
from typing import Any
|
||||
|
||||
from ...sql.dml import Insert as StandardInsert
|
||||
from ...sql.elements import ClauseElement
|
||||
from ...util import memoized_property
|
||||
|
||||
class Insert(StandardInsert):
|
||||
stringify_dialect: str
|
||||
inherit_cache: bool
|
||||
@property
|
||||
def inserted(self): ...
|
||||
@memoized_property
|
||||
def inserted_alias(self): ...
|
||||
def on_duplicate_key_update(self, *args, **kw) -> None: ...
|
||||
|
||||
insert: Any
|
||||
|
||||
class OnDuplicateClause(ClauseElement):
|
||||
__visit_name__: str
|
||||
stringify_dialect: str
|
||||
inserted_alias: Any
|
||||
update: Any
|
||||
def __init__(self, inserted_alias, update) -> None: ...
|
||||
21
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/enumerated.pyi
Normal file
21
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/enumerated.pyi
Normal file
@@ -0,0 +1,21 @@
|
||||
from typing import Any
|
||||
|
||||
from ...sql import sqltypes
|
||||
from .types import _StringType
|
||||
|
||||
class ENUM(sqltypes.NativeForEmulated, sqltypes.Enum, _StringType): # type: ignore[misc]
|
||||
__visit_name__: str
|
||||
native_enum: bool
|
||||
def __init__(self, *enums, **kw) -> None: ...
|
||||
@classmethod
|
||||
def adapt_emulated_to_native(cls, impl, **kw): ...
|
||||
|
||||
class SET(_StringType):
|
||||
__visit_name__: str
|
||||
retrieve_as_bitwise: Any
|
||||
values: Any
|
||||
def __init__(self, *values, **kw) -> None: ...
|
||||
def column_expression(self, colexpr): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
def bind_processor(self, dialect): ...
|
||||
def adapt(self, impltype, **kw): ...
|
||||
13
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/expression.pyi
Normal file
13
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/expression.pyi
Normal file
@@ -0,0 +1,13 @@
|
||||
from typing import Any
|
||||
|
||||
from ...sql import elements
|
||||
from ...sql.base import Generative
|
||||
|
||||
class match(Generative, elements.BinaryExpression):
|
||||
__visit_name__: str
|
||||
inherit_cache: bool
|
||||
def __init__(self, *cols, **kw) -> None: ...
|
||||
modifiers: Any
|
||||
def in_boolean_mode(self) -> None: ...
|
||||
def in_natural_language_mode(self) -> None: ...
|
||||
def with_query_expansion(self) -> None: ...
|
||||
10
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/json.pyi
Normal file
10
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/json.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
import sqlalchemy.types as sqltypes
|
||||
|
||||
class JSON(sqltypes.JSON): ...
|
||||
|
||||
class _FormatTypeMixin:
|
||||
def bind_processor(self, dialect): ...
|
||||
def literal_processor(self, dialect): ...
|
||||
|
||||
class JSONIndexType(_FormatTypeMixin, sqltypes.JSON.JSONIndexType): ...
|
||||
class JSONPathType(_FormatTypeMixin, sqltypes.JSON.JSONPathType): ...
|
||||
11
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadb.pyi
Normal file
11
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mariadb.pyi
Normal file
@@ -0,0 +1,11 @@
|
||||
from typing import Any
|
||||
|
||||
from .base import MySQLDialect
|
||||
|
||||
class MariaDBDialect(MySQLDialect):
|
||||
is_mariadb: bool
|
||||
supports_statement_cache: bool
|
||||
name: str
|
||||
preparer: Any
|
||||
|
||||
def loader(driver): ...
|
||||
@@ -0,0 +1,36 @@
|
||||
from typing import Any
|
||||
|
||||
from .base import MySQLCompiler, MySQLDialect, MySQLExecutionContext
|
||||
|
||||
mariadb_cpy_minimum_version: Any
|
||||
|
||||
class MySQLExecutionContext_mariadbconnector(MySQLExecutionContext):
|
||||
def create_server_side_cursor(self): ...
|
||||
def create_default_cursor(self): ...
|
||||
|
||||
class MySQLCompiler_mariadbconnector(MySQLCompiler): ...
|
||||
|
||||
class MySQLDialect_mariadbconnector(MySQLDialect):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
supports_unicode_statements: bool
|
||||
encoding: str
|
||||
convert_unicode: bool
|
||||
supports_sane_rowcount: bool
|
||||
supports_sane_multi_rowcount: bool
|
||||
supports_native_decimal: bool
|
||||
default_paramstyle: str
|
||||
statement_compiler: Any
|
||||
supports_server_side_cursors: bool
|
||||
paramstyle: str
|
||||
def __init__(self, **kwargs) -> None: ...
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
def create_connect_args(self, url): ...
|
||||
def do_begin_twophase(self, connection, xid) -> None: ...
|
||||
def do_prepare_twophase(self, connection, xid) -> None: ...
|
||||
def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
|
||||
dialect = MySQLDialect_mariadbconnector
|
||||
@@ -0,0 +1,38 @@
|
||||
from typing import Any
|
||||
|
||||
from ...util import memoized_property
|
||||
from .base import BIT, MySQLCompiler, MySQLDialect, MySQLIdentifierPreparer
|
||||
|
||||
class MySQLCompiler_mysqlconnector(MySQLCompiler):
|
||||
def visit_mod_binary(self, binary, operator, **kw): ...
|
||||
def post_process_text(self, text): ...
|
||||
def escape_literal_column(self, text): ...
|
||||
|
||||
class MySQLIdentifierPreparer_mysqlconnector(MySQLIdentifierPreparer): ...
|
||||
|
||||
class _myconnpyBIT(BIT):
|
||||
def result_processor(self, dialect, coltype) -> None: ...
|
||||
|
||||
class MySQLDialect_mysqlconnector(MySQLDialect):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
supports_unicode_binds: bool
|
||||
supports_sane_rowcount: bool
|
||||
supports_sane_multi_rowcount: bool
|
||||
supports_native_decimal: bool
|
||||
default_paramstyle: str
|
||||
statement_compiler: Any
|
||||
preparer: Any
|
||||
colspecs: Any
|
||||
def __init__(self, *arg, **kw) -> None: ...
|
||||
@property
|
||||
def description_encoding(self): ...
|
||||
@memoized_property
|
||||
def supports_unicode_statements(self): ...
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def do_ping(self, dbapi_connection): ...
|
||||
def create_connect_args(self, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
|
||||
dialect = MySQLDialect_mysqlconnector
|
||||
32
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqldb.pyi
Normal file
32
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/mysqldb.pyi
Normal file
@@ -0,0 +1,32 @@
|
||||
from typing import Any
|
||||
|
||||
from ...util import memoized_property
|
||||
from .base import MySQLCompiler, MySQLDialect, MySQLExecutionContext
|
||||
|
||||
class MySQLExecutionContext_mysqldb(MySQLExecutionContext):
|
||||
@property
|
||||
def rowcount(self): ...
|
||||
|
||||
class MySQLCompiler_mysqldb(MySQLCompiler): ...
|
||||
|
||||
class MySQLDialect_mysqldb(MySQLDialect):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
supports_unicode_statements: bool
|
||||
supports_sane_rowcount: bool
|
||||
supports_sane_multi_rowcount: bool
|
||||
supports_native_decimal: bool
|
||||
default_paramstyle: str
|
||||
statement_compiler: Any
|
||||
preparer: Any
|
||||
def __init__(self, **kwargs) -> None: ...
|
||||
@memoized_property
|
||||
def supports_server_side_cursors(self): ...
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def on_connect(self): ...
|
||||
def do_ping(self, dbapi_connection): ...
|
||||
def do_executemany(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
def create_connect_args(self, url, _translate_args: Any | None = ...): ...
|
||||
|
||||
dialect = MySQLDialect_mysqldb
|
||||
39
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/oursql.pyi
Normal file
39
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/oursql.pyi
Normal file
@@ -0,0 +1,39 @@
|
||||
from typing import Any
|
||||
|
||||
from .base import BIT, MySQLDialect, MySQLExecutionContext
|
||||
|
||||
class _oursqlBIT(BIT):
|
||||
def result_processor(self, dialect, coltype) -> None: ...
|
||||
|
||||
class MySQLExecutionContext_oursql(MySQLExecutionContext):
|
||||
@property
|
||||
def plain_query(self): ...
|
||||
|
||||
class MySQLDialect_oursql(MySQLDialect):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
supports_unicode_binds: bool
|
||||
supports_unicode_statements: bool
|
||||
supports_native_decimal: bool
|
||||
supports_sane_rowcount: bool
|
||||
supports_sane_multi_rowcount: bool
|
||||
colspecs: Any
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def do_execute(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
def do_begin(self, connection) -> None: ...
|
||||
def do_begin_twophase(self, connection, xid) -> None: ...
|
||||
def do_prepare_twophase(self, connection, xid) -> None: ...
|
||||
def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
def has_table(self, connection, table_name, schema: Any | None = ...): ... # type: ignore[override]
|
||||
def get_table_options(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_columns(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_view_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_table_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_schema_names(self, connection, **kw): ...
|
||||
def initialize(self, connection): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
def create_connect_args(self, url): ...
|
||||
|
||||
dialect = MySQLDialect_oursql
|
||||
19
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pymysql.pyi
Normal file
19
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pymysql.pyi
Normal file
@@ -0,0 +1,19 @@
|
||||
from typing import Any
|
||||
|
||||
from ...util import memoized_property
|
||||
from .mysqldb import MySQLDialect_mysqldb
|
||||
|
||||
class MySQLDialect_pymysql(MySQLDialect_mysqldb):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
description_encoding: Any
|
||||
supports_unicode_statements: bool
|
||||
supports_unicode_binds: bool
|
||||
@memoized_property
|
||||
def supports_server_side_cursors(self): ...
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def create_connect_args(self, url, _translate_args: Any | None = ...): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
|
||||
dialect = MySQLDialect_pymysql
|
||||
20
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pyodbc.pyi
Normal file
20
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/pyodbc.pyi
Normal file
@@ -0,0 +1,20 @@
|
||||
from typing import Any
|
||||
|
||||
from ...connectors.pyodbc import PyODBCConnector
|
||||
from .base import MySQLDialect, MySQLExecutionContext
|
||||
from .types import TIME
|
||||
|
||||
class _pyodbcTIME(TIME):
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class MySQLExecutionContext_pyodbc(MySQLExecutionContext):
|
||||
def get_lastrowid(self): ...
|
||||
|
||||
class MySQLDialect_pyodbc(PyODBCConnector, MySQLDialect):
|
||||
supports_statement_cache: bool
|
||||
colspecs: Any
|
||||
supports_unicode_statements: bool
|
||||
pyodbc_driver_name: str
|
||||
def on_connect(self): ...
|
||||
|
||||
dialect = MySQLDialect_pyodbc
|
||||
17
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reflection.pyi
Normal file
17
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/reflection.pyi
Normal file
@@ -0,0 +1,17 @@
|
||||
from typing import Any
|
||||
|
||||
class ReflectedState:
|
||||
columns: Any
|
||||
table_options: Any
|
||||
table_name: Any
|
||||
keys: Any
|
||||
fk_constraints: Any
|
||||
ck_constraints: Any
|
||||
def __init__(self) -> None: ...
|
||||
|
||||
class MySQLTableDefinitionParser:
|
||||
logger: Any
|
||||
dialect: Any
|
||||
preparer: Any
|
||||
def __init__(self, dialect, preparer) -> None: ...
|
||||
def parse(self, show_create, charset): ...
|
||||
@@ -0,0 +1,4 @@
|
||||
from typing import Any
|
||||
|
||||
RESERVED_WORDS_MARIADB: Any
|
||||
RESERVED_WORDS_MYSQL: Any
|
||||
145
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/types.pyi
Normal file
145
stubs/SQLAlchemy/sqlalchemy/dialects/mysql/types.pyi
Normal file
@@ -0,0 +1,145 @@
|
||||
from typing import Any
|
||||
|
||||
import sqlalchemy.types as sqltypes
|
||||
|
||||
class _NumericType:
|
||||
unsigned: Any
|
||||
zerofill: Any
|
||||
def __init__(self, unsigned: bool = ..., zerofill: bool = ..., **kw) -> None: ...
|
||||
|
||||
class _FloatType(_NumericType, sqltypes.Float):
|
||||
scale: Any
|
||||
def __init__(self, precision: Any | None = ..., scale: Any | None = ..., asdecimal: bool = ..., **kw) -> None: ...
|
||||
|
||||
class _IntegerType(_NumericType, sqltypes.Integer):
|
||||
display_width: Any
|
||||
def __init__(self, display_width: Any | None = ..., **kw) -> None: ...
|
||||
|
||||
class _StringType(sqltypes.String):
|
||||
charset: Any
|
||||
ascii: Any
|
||||
unicode: Any
|
||||
binary: Any
|
||||
national: Any
|
||||
def __init__(
|
||||
self,
|
||||
charset: Any | None = ...,
|
||||
collation: Any | None = ...,
|
||||
ascii: bool = ...,
|
||||
binary: bool = ...,
|
||||
unicode: bool = ...,
|
||||
national: bool = ...,
|
||||
**kw,
|
||||
) -> None: ...
|
||||
|
||||
class _MatchType(sqltypes.Float, sqltypes.MatchType): # type: ignore[misc]
|
||||
def __init__(self, **kw) -> None: ...
|
||||
|
||||
class NUMERIC(_NumericType, sqltypes.NUMERIC):
|
||||
__visit_name__: str
|
||||
def __init__(self, precision: Any | None = ..., scale: Any | None = ..., asdecimal: bool = ..., **kw) -> None: ...
|
||||
|
||||
class DECIMAL(_NumericType, sqltypes.DECIMAL):
|
||||
__visit_name__: str
|
||||
def __init__(self, precision: Any | None = ..., scale: Any | None = ..., asdecimal: bool = ..., **kw) -> None: ...
|
||||
|
||||
class DOUBLE(_FloatType):
|
||||
__visit_name__: str
|
||||
def __init__(self, precision: Any | None = ..., scale: Any | None = ..., asdecimal: bool = ..., **kw) -> None: ...
|
||||
|
||||
class REAL(_FloatType, sqltypes.REAL):
|
||||
__visit_name__: str
|
||||
def __init__(self, precision: Any | None = ..., scale: Any | None = ..., asdecimal: bool = ..., **kw) -> None: ...
|
||||
|
||||
class FLOAT(_FloatType, sqltypes.FLOAT):
|
||||
__visit_name__: str
|
||||
def __init__(self, precision: Any | None = ..., scale: Any | None = ..., asdecimal: bool = ..., **kw) -> None: ...
|
||||
def bind_processor(self, dialect) -> None: ...
|
||||
|
||||
class INTEGER(_IntegerType, sqltypes.INTEGER):
|
||||
__visit_name__: str
|
||||
def __init__(self, display_width: Any | None = ..., **kw) -> None: ...
|
||||
|
||||
class BIGINT(_IntegerType, sqltypes.BIGINT):
|
||||
__visit_name__: str
|
||||
def __init__(self, display_width: Any | None = ..., **kw) -> None: ...
|
||||
|
||||
class MEDIUMINT(_IntegerType):
|
||||
__visit_name__: str
|
||||
def __init__(self, display_width: Any | None = ..., **kw) -> None: ...
|
||||
|
||||
class TINYINT(_IntegerType):
|
||||
__visit_name__: str
|
||||
def __init__(self, display_width: Any | None = ..., **kw) -> None: ...
|
||||
|
||||
class SMALLINT(_IntegerType, sqltypes.SMALLINT):
|
||||
__visit_name__: str
|
||||
def __init__(self, display_width: Any | None = ..., **kw) -> None: ...
|
||||
|
||||
class BIT(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
length: Any
|
||||
def __init__(self, length: Any | None = ...) -> None: ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class TIME(sqltypes.TIME):
|
||||
__visit_name__: str
|
||||
fsp: Any
|
||||
def __init__(self, timezone: bool = ..., fsp: Any | None = ...) -> None: ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class TIMESTAMP(sqltypes.TIMESTAMP):
|
||||
__visit_name__: str
|
||||
fsp: Any
|
||||
def __init__(self, timezone: bool = ..., fsp: Any | None = ...) -> None: ...
|
||||
|
||||
class DATETIME(sqltypes.DATETIME):
|
||||
__visit_name__: str
|
||||
fsp: Any
|
||||
def __init__(self, timezone: bool = ..., fsp: Any | None = ...) -> None: ...
|
||||
|
||||
class YEAR(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
display_width: Any
|
||||
def __init__(self, display_width: Any | None = ...) -> None: ...
|
||||
|
||||
class TEXT(_StringType, sqltypes.TEXT):
|
||||
__visit_name__: str
|
||||
def __init__(self, length: Any | None = ..., **kw) -> None: ...
|
||||
|
||||
class TINYTEXT(_StringType):
|
||||
__visit_name__: str
|
||||
def __init__(self, **kwargs) -> None: ...
|
||||
|
||||
class MEDIUMTEXT(_StringType):
|
||||
__visit_name__: str
|
||||
def __init__(self, **kwargs) -> None: ...
|
||||
|
||||
class LONGTEXT(_StringType):
|
||||
__visit_name__: str
|
||||
def __init__(self, **kwargs) -> None: ...
|
||||
|
||||
class VARCHAR(_StringType, sqltypes.VARCHAR):
|
||||
__visit_name__: str
|
||||
def __init__(self, length: Any | None = ..., **kwargs) -> None: ...
|
||||
|
||||
class CHAR(_StringType, sqltypes.CHAR):
|
||||
__visit_name__: str
|
||||
def __init__(self, length: Any | None = ..., **kwargs) -> None: ...
|
||||
|
||||
class NVARCHAR(_StringType, sqltypes.NVARCHAR):
|
||||
__visit_name__: str
|
||||
def __init__(self, length: Any | None = ..., **kwargs) -> None: ...
|
||||
|
||||
class NCHAR(_StringType, sqltypes.NCHAR):
|
||||
__visit_name__: str
|
||||
def __init__(self, length: Any | None = ..., **kwargs) -> None: ...
|
||||
|
||||
class TINYBLOB(sqltypes._Binary):
|
||||
__visit_name__: str
|
||||
|
||||
class MEDIUMBLOB(sqltypes._Binary):
|
||||
__visit_name__: str
|
||||
|
||||
class LONGBLOB(sqltypes._Binary):
|
||||
__visit_name__: str
|
||||
52
stubs/SQLAlchemy/sqlalchemy/dialects/oracle/__init__.pyi
Normal file
52
stubs/SQLAlchemy/sqlalchemy/dialects/oracle/__init__.pyi
Normal file
@@ -0,0 +1,52 @@
|
||||
from typing import Any
|
||||
|
||||
from .base import (
|
||||
BFILE as BFILE,
|
||||
BINARY_DOUBLE as BINARY_DOUBLE,
|
||||
BINARY_FLOAT as BINARY_FLOAT,
|
||||
BLOB as BLOB,
|
||||
CHAR as CHAR,
|
||||
CLOB as CLOB,
|
||||
DATE as DATE,
|
||||
DOUBLE_PRECISION as DOUBLE_PRECISION,
|
||||
FLOAT as FLOAT,
|
||||
INTERVAL as INTERVAL,
|
||||
LONG as LONG,
|
||||
NCHAR as NCHAR,
|
||||
NCLOB as NCLOB,
|
||||
NUMBER as NUMBER,
|
||||
NVARCHAR as NVARCHAR,
|
||||
NVARCHAR2 as NVARCHAR2,
|
||||
RAW as RAW,
|
||||
ROWID as ROWID,
|
||||
TIMESTAMP as TIMESTAMP,
|
||||
VARCHAR as VARCHAR,
|
||||
VARCHAR2 as VARCHAR2,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
"VARCHAR",
|
||||
"NVARCHAR",
|
||||
"CHAR",
|
||||
"NCHAR",
|
||||
"DATE",
|
||||
"NUMBER",
|
||||
"BLOB",
|
||||
"BFILE",
|
||||
"CLOB",
|
||||
"NCLOB",
|
||||
"TIMESTAMP",
|
||||
"RAW",
|
||||
"FLOAT",
|
||||
"DOUBLE_PRECISION",
|
||||
"BINARY_DOUBLE",
|
||||
"BINARY_FLOAT",
|
||||
"LONG",
|
||||
"dialect",
|
||||
"INTERVAL",
|
||||
"VARCHAR2",
|
||||
"NVARCHAR2",
|
||||
"ROWID",
|
||||
)
|
||||
|
||||
dialect: Any
|
||||
219
stubs/SQLAlchemy/sqlalchemy/dialects/oracle/base.pyi
Normal file
219
stubs/SQLAlchemy/sqlalchemy/dialects/oracle/base.pyi
Normal file
@@ -0,0 +1,219 @@
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy.sql import ClauseElement
|
||||
|
||||
from ...engine import default
|
||||
from ...sql import compiler, sqltypes
|
||||
from ...types import (
|
||||
BLOB as BLOB,
|
||||
CHAR as CHAR,
|
||||
CLOB as CLOB,
|
||||
FLOAT as FLOAT,
|
||||
INTEGER as INTEGER,
|
||||
NCHAR as NCHAR,
|
||||
NVARCHAR as NVARCHAR,
|
||||
TIMESTAMP as TIMESTAMP,
|
||||
VARCHAR as VARCHAR,
|
||||
)
|
||||
|
||||
RESERVED_WORDS: Any
|
||||
NO_ARG_FNS: Any
|
||||
|
||||
class RAW(sqltypes._Binary):
|
||||
__visit_name__: str
|
||||
|
||||
OracleRaw = RAW
|
||||
|
||||
class NCLOB(sqltypes.Text):
|
||||
__visit_name__: str
|
||||
|
||||
class VARCHAR2(VARCHAR):
|
||||
__visit_name__: str
|
||||
|
||||
NVARCHAR2 = NVARCHAR
|
||||
|
||||
class NUMBER(sqltypes.Numeric, sqltypes.Integer):
|
||||
__visit_name__: str
|
||||
def __init__(self, precision: Any | None = ..., scale: Any | None = ..., asdecimal: Any | None = ...) -> None: ...
|
||||
def adapt(self, impltype): ...
|
||||
|
||||
class DOUBLE_PRECISION(sqltypes.Float):
|
||||
__visit_name__: str
|
||||
|
||||
class BINARY_DOUBLE(sqltypes.Float):
|
||||
__visit_name__: str
|
||||
|
||||
class BINARY_FLOAT(sqltypes.Float):
|
||||
__visit_name__: str
|
||||
|
||||
class BFILE(sqltypes.LargeBinary):
|
||||
__visit_name__: str
|
||||
|
||||
class LONG(sqltypes.Text):
|
||||
__visit_name__: str
|
||||
|
||||
class DATE(sqltypes.DateTime):
|
||||
__visit_name__: str
|
||||
|
||||
class INTERVAL(sqltypes.NativeForEmulated, sqltypes._AbstractInterval):
|
||||
__visit_name__: str
|
||||
day_precision: Any
|
||||
second_precision: Any
|
||||
def __init__(self, day_precision: Any | None = ..., second_precision: Any | None = ...) -> None: ...
|
||||
def as_generic(self, allow_nulltype: bool = ...): ...
|
||||
def coerce_compared_value(self, op, value): ...
|
||||
|
||||
class ROWID(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class _OracleBoolean(sqltypes.Boolean):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
colspecs: Any
|
||||
ischema_names: Any
|
||||
|
||||
class OracleTypeCompiler(compiler.GenericTypeCompiler):
|
||||
def visit_datetime(self, type_, **kw): ...
|
||||
def visit_float(self, type_, **kw): ...
|
||||
def visit_unicode(self, type_, **kw): ...
|
||||
def visit_INTERVAL(self, type_, **kw): ...
|
||||
def visit_LONG(self, type_, **kw): ...
|
||||
def visit_TIMESTAMP(self, type_, **kw): ...
|
||||
def visit_DOUBLE_PRECISION(self, type_, **kw): ...
|
||||
def visit_BINARY_DOUBLE(self, type_, **kw): ...
|
||||
def visit_BINARY_FLOAT(self, type_, **kw): ...
|
||||
def visit_FLOAT(self, type_, **kw): ...
|
||||
def visit_NUMBER(self, type_, **kw): ...
|
||||
def visit_string(self, type_, **kw): ...
|
||||
def visit_VARCHAR2(self, type_, **kw): ...
|
||||
def visit_NVARCHAR2(self, type_, **kw): ...
|
||||
visit_NVARCHAR: Any
|
||||
def visit_VARCHAR(self, type_, **kw): ...
|
||||
def visit_text(self, type_, **kw): ...
|
||||
def visit_unicode_text(self, type_, **kw): ...
|
||||
def visit_large_binary(self, type_, **kw): ...
|
||||
def visit_big_integer(self, type_, **kw): ...
|
||||
def visit_boolean(self, type_, **kw): ...
|
||||
def visit_RAW(self, type_, **kw): ...
|
||||
def visit_ROWID(self, type_, **kw): ...
|
||||
|
||||
class OracleCompiler(compiler.SQLCompiler):
|
||||
compound_keywords: Any
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def visit_mod_binary(self, binary, operator, **kw): ...
|
||||
def visit_now_func(self, fn, **kw): ...
|
||||
def visit_char_length_func(self, fn, **kw): ...
|
||||
def visit_match_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_true(self, expr, **kw): ...
|
||||
def visit_false(self, expr, **kw): ...
|
||||
def get_cte_preamble(self, recursive): ...
|
||||
def get_select_hint_text(self, byfroms): ...
|
||||
def function_argspec(self, fn, **kw): ...
|
||||
def visit_function(self, func, **kw): ...
|
||||
def visit_table_valued_column(self, element, **kw): ...
|
||||
def default_from(self): ...
|
||||
def visit_join(self, join, from_linter: Any | None = ..., **kwargs): ... # type: ignore[override]
|
||||
def visit_outer_join_column(self, vc, **kw): ...
|
||||
def visit_sequence(self, seq, **kw): ...
|
||||
def get_render_as_alias_suffix(self, alias_name_text): ...
|
||||
has_out_parameters: bool
|
||||
def returning_clause(self, stmt, returning_cols): ...
|
||||
def translate_select_structure(self, select_stmt, **kwargs): ...
|
||||
def limit_clause(self, select, **kw): ...
|
||||
def visit_empty_set_expr(self, type_): ...
|
||||
def for_update_clause(self, select, **kw): ...
|
||||
def visit_is_distinct_from_binary(self, binary, operator, **kw): ...
|
||||
def visit_is_not_distinct_from_binary(self, binary, operator, **kw): ...
|
||||
def visit_regexp_match_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_not_regexp_match_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_regexp_replace_op_binary(self, binary, operator, **kw): ...
|
||||
|
||||
class OracleDDLCompiler(compiler.DDLCompiler):
|
||||
def define_constraint_cascades(self, constraint): ...
|
||||
def visit_drop_table_comment(self, drop): ...
|
||||
def visit_create_index(self, create): ...
|
||||
def post_create_table(self, table): ...
|
||||
def get_identity_options(self, identity_options): ...
|
||||
def visit_computed_column(self, generated): ...
|
||||
def visit_identity_column(self, identity, **kw): ...
|
||||
|
||||
class OracleIdentifierPreparer(compiler.IdentifierPreparer):
|
||||
reserved_words: Any
|
||||
illegal_initial_characters: Any
|
||||
def format_savepoint(self, savepoint): ...
|
||||
|
||||
class OracleExecutionContext(default.DefaultExecutionContext):
|
||||
def fire_sequence(self, seq, type_): ...
|
||||
|
||||
class OracleDialect(default.DefaultDialect):
|
||||
name: str
|
||||
supports_statement_cache: bool
|
||||
supports_alter: bool
|
||||
supports_unicode_statements: bool
|
||||
supports_unicode_binds: bool
|
||||
max_identifier_length: int
|
||||
supports_simple_order_by_label: bool
|
||||
cte_follows_insert: bool
|
||||
supports_sequences: bool
|
||||
sequences_optional: bool
|
||||
postfetch_lastrowid: bool
|
||||
default_paramstyle: str
|
||||
colspecs: Any
|
||||
ischema_names: Any
|
||||
requires_name_normalize: bool
|
||||
supports_comments: bool
|
||||
supports_default_values: bool
|
||||
supports_default_metavalue: bool
|
||||
supports_empty_insert: bool
|
||||
supports_identity_columns: bool
|
||||
statement_compiler: Any
|
||||
ddl_compiler: Any
|
||||
type_compiler: Any
|
||||
preparer: Any
|
||||
reflection_options: Any
|
||||
construct_arguments: Any
|
||||
use_ansi: Any
|
||||
optimize_limits: Any
|
||||
exclude_tablespaces: Any
|
||||
def __init__(
|
||||
self,
|
||||
use_ansi: bool = ...,
|
||||
optimize_limits: bool = ...,
|
||||
use_binds_for_limits: Any | None = ...,
|
||||
use_nchar_for_unicode: bool = ...,
|
||||
exclude_tablespaces=...,
|
||||
**kwargs,
|
||||
) -> None: ...
|
||||
implicit_returning: Any
|
||||
def initialize(self, connection) -> None: ...
|
||||
def do_release_savepoint(self, connection, name) -> None: ...
|
||||
def get_isolation_level(self, connection) -> None: ...
|
||||
def get_default_isolation_level(self, dbapi_conn): ...
|
||||
def set_isolation_level(self, connection, level) -> None: ...
|
||||
def has_table(self, connection, table_name, schema: Any | None = ...): ... # type: ignore[override]
|
||||
def has_sequence(self, connection, sequence_name, schema: Any | None = ...): ... # type: ignore[override]
|
||||
def get_schema_names(self, connection, **kw): ...
|
||||
def get_table_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_temp_table_names(self, connection, **kw): ...
|
||||
def get_view_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_sequence_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_table_options(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_columns(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_table_comment(
|
||||
self, connection, table_name, schema: Any | None = ..., resolve_synonyms: bool = ..., dblink: str = ..., **kw
|
||||
): ...
|
||||
def get_indexes(
|
||||
self, connection, table_name, schema: Any | None = ..., resolve_synonyms: bool = ..., dblink: str = ..., **kw
|
||||
): ...
|
||||
def get_pk_constraint(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_foreign_keys(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_unique_constraints(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_view_definition(
|
||||
self, connection, view_name, schema: Any | None = ..., resolve_synonyms: bool = ..., dblink: str = ..., **kw
|
||||
): ...
|
||||
def get_check_constraints(self, connection, table_name, schema: Any | None = ..., include_all: bool = ..., **kw): ...
|
||||
|
||||
class _OuterJoinColumn(ClauseElement):
|
||||
__visit_name__: str
|
||||
column: Any
|
||||
def __init__(self, column) -> None: ...
|
||||
127
stubs/SQLAlchemy/sqlalchemy/dialects/oracle/cx_oracle.pyi
Normal file
127
stubs/SQLAlchemy/sqlalchemy/dialects/oracle/cx_oracle.pyi
Normal file
@@ -0,0 +1,127 @@
|
||||
from typing import Any
|
||||
|
||||
import sqlalchemy.types as sqltypes
|
||||
|
||||
from . import base as oracle
|
||||
from .base import OracleCompiler, OracleDialect, OracleExecutionContext
|
||||
|
||||
class _OracleInteger(sqltypes.Integer):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _OracleNumeric(sqltypes.Numeric):
|
||||
is_number: bool
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype) -> None: ...
|
||||
|
||||
class _OracleBinaryFloat(_OracleNumeric):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _OracleBINARY_FLOAT(_OracleBinaryFloat, oracle.BINARY_FLOAT): ...
|
||||
class _OracleBINARY_DOUBLE(_OracleBinaryFloat, oracle.BINARY_DOUBLE): ...
|
||||
|
||||
class _OracleNUMBER(_OracleNumeric):
|
||||
is_number: bool
|
||||
|
||||
class _OracleDate(sqltypes.Date):
|
||||
def bind_processor(self, dialect) -> None: ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _OracleChar(sqltypes.CHAR):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _OracleNChar(sqltypes.NCHAR):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _OracleUnicodeStringNCHAR(oracle.NVARCHAR2):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _OracleUnicodeStringCHAR(sqltypes.Unicode):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _OracleUnicodeTextNCLOB(oracle.NCLOB):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _OracleUnicodeTextCLOB(sqltypes.UnicodeText):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _OracleText(sqltypes.Text):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _OracleLong(oracle.LONG):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _OracleString(sqltypes.String): ...
|
||||
|
||||
class _OracleEnum(sqltypes.Enum):
|
||||
def bind_processor(self, dialect): ...
|
||||
|
||||
class _OracleBinary(sqltypes.LargeBinary):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
def bind_processor(self, dialect) -> None: ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _OracleInterval(oracle.INTERVAL):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _OracleRaw(oracle.RAW): ...
|
||||
|
||||
class _OracleRowid(oracle.ROWID):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class OracleCompiler_cx_oracle(OracleCompiler):
|
||||
def bindparam_string(self, name, **kw): ...
|
||||
|
||||
class OracleExecutionContext_cx_oracle(OracleExecutionContext):
|
||||
out_parameters: Any
|
||||
include_set_input_sizes: Any
|
||||
def pre_exec(self) -> None: ...
|
||||
cursor_fetch_strategy: Any
|
||||
def post_exec(self) -> None: ...
|
||||
def create_cursor(self): ...
|
||||
def get_out_parameter_values(self, out_param_names): ...
|
||||
|
||||
class OracleDialect_cx_oracle(OracleDialect):
|
||||
supports_statement_cache: bool
|
||||
statement_compiler: Any
|
||||
supports_sane_rowcount: bool
|
||||
supports_sane_multi_rowcount: bool
|
||||
supports_unicode_statements: bool
|
||||
supports_unicode_binds: bool
|
||||
use_setinputsizes: bool
|
||||
driver: str
|
||||
colspecs: Any
|
||||
execute_sequence_format: Any
|
||||
arraysize: Any
|
||||
encoding_errors: Any
|
||||
auto_convert_lobs: Any
|
||||
coerce_to_unicode: Any
|
||||
coerce_to_decimal: Any
|
||||
cx_oracle_ver: Any
|
||||
def __init__(
|
||||
self,
|
||||
auto_convert_lobs: bool = ...,
|
||||
coerce_to_unicode: bool = ...,
|
||||
coerce_to_decimal: bool = ...,
|
||||
arraysize: int = ...,
|
||||
encoding_errors: Any | None = ...,
|
||||
threaded: Any | None = ...,
|
||||
**kwargs,
|
||||
): ...
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def initialize(self, connection) -> None: ...
|
||||
def get_isolation_level(self, connection): ...
|
||||
def set_isolation_level(self, connection, level) -> None: ...
|
||||
def on_connect(self): ...
|
||||
def create_connect_args(self, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
def create_xid(self): ...
|
||||
def do_executemany(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
def do_begin_twophase(self, connection, xid) -> None: ...
|
||||
def do_prepare_twophase(self, connection, xid) -> None: ...
|
||||
def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
def do_set_input_sizes(self, cursor, list_of_tuples, context) -> None: ...
|
||||
def do_recover_twophase(self, connection) -> None: ...
|
||||
|
||||
dialect = OracleDialect_cx_oracle
|
||||
98
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/__init__.pyi
Normal file
98
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/__init__.pyi
Normal file
@@ -0,0 +1,98 @@
|
||||
import typing
|
||||
|
||||
from .array import ARRAY as ARRAY, All as All, Any as Any, array as array
|
||||
from .base import (
|
||||
BIGINT as BIGINT,
|
||||
BIT as BIT,
|
||||
BOOLEAN as BOOLEAN,
|
||||
BYTEA as BYTEA,
|
||||
CHAR as CHAR,
|
||||
CIDR as CIDR,
|
||||
DATE as DATE,
|
||||
DOUBLE_PRECISION as DOUBLE_PRECISION,
|
||||
ENUM as ENUM,
|
||||
FLOAT as FLOAT,
|
||||
INET as INET,
|
||||
INTEGER as INTEGER,
|
||||
INTERVAL as INTERVAL,
|
||||
MACADDR as MACADDR,
|
||||
MONEY as MONEY,
|
||||
NUMERIC as NUMERIC,
|
||||
OID as OID,
|
||||
REAL as REAL,
|
||||
REGCLASS as REGCLASS,
|
||||
SMALLINT as SMALLINT,
|
||||
TEXT as TEXT,
|
||||
TIME as TIME,
|
||||
TIMESTAMP as TIMESTAMP,
|
||||
TSVECTOR as TSVECTOR,
|
||||
UUID as UUID,
|
||||
VARCHAR as VARCHAR,
|
||||
CreateEnumType as CreateEnumType,
|
||||
DropEnumType as DropEnumType,
|
||||
)
|
||||
from .dml import Insert as Insert, insert as insert
|
||||
from .ext import ExcludeConstraint as ExcludeConstraint, aggregate_order_by as aggregate_order_by, array_agg as array_agg
|
||||
from .hstore import HSTORE as HSTORE, hstore as hstore
|
||||
from .json import JSON as JSON, JSONB as JSONB
|
||||
from .ranges import (
|
||||
DATERANGE as DATERANGE,
|
||||
INT4RANGE as INT4RANGE,
|
||||
INT8RANGE as INT8RANGE,
|
||||
NUMRANGE as NUMRANGE,
|
||||
TSRANGE as TSRANGE,
|
||||
TSTZRANGE as TSTZRANGE,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
"INTEGER",
|
||||
"BIGINT",
|
||||
"SMALLINT",
|
||||
"VARCHAR",
|
||||
"CHAR",
|
||||
"TEXT",
|
||||
"NUMERIC",
|
||||
"FLOAT",
|
||||
"REAL",
|
||||
"INET",
|
||||
"CIDR",
|
||||
"UUID",
|
||||
"BIT",
|
||||
"MACADDR",
|
||||
"MONEY",
|
||||
"OID",
|
||||
"REGCLASS",
|
||||
"DOUBLE_PRECISION",
|
||||
"TIMESTAMP",
|
||||
"TIME",
|
||||
"DATE",
|
||||
"BYTEA",
|
||||
"BOOLEAN",
|
||||
"INTERVAL",
|
||||
"ARRAY",
|
||||
"ENUM",
|
||||
"dialect",
|
||||
"array",
|
||||
"HSTORE",
|
||||
"hstore",
|
||||
"INT4RANGE",
|
||||
"INT8RANGE",
|
||||
"NUMRANGE",
|
||||
"DATERANGE",
|
||||
"TSVECTOR",
|
||||
"TSRANGE",
|
||||
"TSTZRANGE",
|
||||
"JSON",
|
||||
"JSONB",
|
||||
"Any",
|
||||
"All",
|
||||
"DropEnumType",
|
||||
"CreateEnumType",
|
||||
"ExcludeConstraint",
|
||||
"aggregate_order_by",
|
||||
"array_agg",
|
||||
"insert",
|
||||
"Insert",
|
||||
)
|
||||
|
||||
dialect: typing.Any
|
||||
40
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/array.pyi
Normal file
40
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/array.pyi
Normal file
@@ -0,0 +1,40 @@
|
||||
from typing import Any as _Any
|
||||
|
||||
import sqlalchemy.types as sqltypes
|
||||
|
||||
from ...sql import expression
|
||||
|
||||
def Any(other, arrexpr, operator=...): ...
|
||||
def All(other, arrexpr, operator=...): ...
|
||||
|
||||
class array(expression.ClauseList, expression.ColumnElement):
|
||||
__visit_name__: str
|
||||
stringify_dialect: str
|
||||
inherit_cache: bool
|
||||
type: _Any
|
||||
def __init__(self, clauses, **kw) -> None: ...
|
||||
def self_group(self, against: _Any | None = ...): ...
|
||||
|
||||
CONTAINS: _Any
|
||||
CONTAINED_BY: _Any
|
||||
OVERLAP: _Any
|
||||
|
||||
class ARRAY(sqltypes.ARRAY):
|
||||
class Comparator(sqltypes.ARRAY.Comparator):
|
||||
def contains(self, other, **kwargs): ...
|
||||
def contained_by(self, other): ...
|
||||
def overlap(self, other): ...
|
||||
comparator_factory: _Any
|
||||
item_type: _Any
|
||||
as_tuple: _Any
|
||||
dimensions: _Any
|
||||
zero_indexes: _Any
|
||||
def __init__(self, item_type, as_tuple: bool = ..., dimensions: _Any | None = ..., zero_indexes: bool = ...) -> None: ...
|
||||
@property
|
||||
def hashable(self): ...
|
||||
@property
|
||||
def python_type(self): ...
|
||||
def compare_values(self, x, y): ...
|
||||
def bind_expression(self, bindvalue): ...
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
199
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/asyncpg.pyi
Normal file
199
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/asyncpg.pyi
Normal file
@@ -0,0 +1,199 @@
|
||||
from typing import Any
|
||||
|
||||
from ...engine import AdaptedConnection
|
||||
from ...sql import sqltypes
|
||||
from . import json
|
||||
from .base import ENUM, INTERVAL, OID, REGCLASS, UUID, PGCompiler, PGDialect, PGExecutionContext, PGIdentifierPreparer
|
||||
|
||||
class AsyncpgTime(sqltypes.Time):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class AsyncpgDate(sqltypes.Date):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class AsyncpgDateTime(sqltypes.DateTime):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class AsyncpgBoolean(sqltypes.Boolean):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class AsyncPgInterval(INTERVAL):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
@classmethod
|
||||
def adapt_emulated_to_native(cls, interval, **kw): ...
|
||||
|
||||
class AsyncPgEnum(ENUM):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class AsyncpgInteger(sqltypes.Integer):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class AsyncpgBigInteger(sqltypes.BigInteger):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class AsyncpgJSON(json.JSON):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
def result_processor(self, dialect, coltype) -> None: ...
|
||||
|
||||
class AsyncpgJSONB(json.JSONB):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
def result_processor(self, dialect, coltype) -> None: ...
|
||||
|
||||
class AsyncpgJSONIndexType(sqltypes.JSON.JSONIndexType):
|
||||
def get_dbapi_type(self, dbapi) -> None: ...
|
||||
|
||||
class AsyncpgJSONIntIndexType(sqltypes.JSON.JSONIntIndexType):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class AsyncpgJSONStrIndexType(sqltypes.JSON.JSONStrIndexType):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class AsyncpgJSONPathType(json.JSONPathType):
|
||||
def bind_processor(self, dialect): ...
|
||||
|
||||
class AsyncpgUUID(UUID):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class AsyncpgNumeric(sqltypes.Numeric):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
def bind_processor(self, dialect) -> None: ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class AsyncpgFloat(AsyncpgNumeric):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class AsyncpgREGCLASS(REGCLASS):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class AsyncpgOID(OID):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class PGExecutionContext_asyncpg(PGExecutionContext):
|
||||
def handle_dbapi_exception(self, e) -> None: ...
|
||||
exclude_set_input_sizes: Any
|
||||
def pre_exec(self) -> None: ...
|
||||
def create_server_side_cursor(self): ...
|
||||
|
||||
class PGCompiler_asyncpg(PGCompiler): ...
|
||||
class PGIdentifierPreparer_asyncpg(PGIdentifierPreparer): ...
|
||||
|
||||
class AsyncAdapt_asyncpg_cursor:
|
||||
server_side: bool
|
||||
description: Any
|
||||
arraysize: int
|
||||
rowcount: int
|
||||
def __init__(self, adapt_connection) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def execute(self, operation, parameters: Any | None = ...) -> None: ...
|
||||
def executemany(self, operation, seq_of_parameters): ...
|
||||
def setinputsizes(self, *inputsizes) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def fetchone(self): ...
|
||||
def fetchmany(self, size: Any | None = ...): ...
|
||||
def fetchall(self): ...
|
||||
|
||||
class AsyncAdapt_asyncpg_ss_cursor(AsyncAdapt_asyncpg_cursor):
|
||||
server_side: bool
|
||||
def __init__(self, adapt_connection) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def __aiter__(self): ...
|
||||
async def __anext__(self) -> None: ...
|
||||
def fetchone(self): ...
|
||||
def fetchmany(self, size: Any | None = ...): ...
|
||||
def fetchall(self): ...
|
||||
def executemany(self, operation, seq_of_parameters) -> None: ...
|
||||
|
||||
class AsyncAdapt_asyncpg_connection(AdaptedConnection):
|
||||
await_: Any
|
||||
dbapi: Any
|
||||
isolation_level: str
|
||||
readonly: bool
|
||||
deferrable: bool
|
||||
def __init__(self, dbapi, connection, prepared_statement_cache_size: int = ...) -> None: ...
|
||||
@property
|
||||
def autocommit(self): ...
|
||||
@autocommit.setter
|
||||
def autocommit(self, value) -> None: ...
|
||||
def set_isolation_level(self, level) -> None: ...
|
||||
def cursor(self, server_side: bool = ...): ...
|
||||
def rollback(self) -> None: ...
|
||||
def commit(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
class AsyncAdaptFallback_asyncpg_connection(AsyncAdapt_asyncpg_connection):
|
||||
await_: Any
|
||||
|
||||
class AsyncAdapt_asyncpg_dbapi:
|
||||
asyncpg: Any
|
||||
paramstyle: str
|
||||
def __init__(self, asyncpg) -> None: ...
|
||||
def connect(self, *arg, **kw): ...
|
||||
class Error(Exception): ...
|
||||
class Warning(Exception): ...
|
||||
class InterfaceError(Error): ...
|
||||
class DatabaseError(Error): ...
|
||||
class InternalError(DatabaseError): ...
|
||||
class OperationalError(DatabaseError): ...
|
||||
class ProgrammingError(DatabaseError): ...
|
||||
class IntegrityError(DatabaseError): ...
|
||||
class DataError(DatabaseError): ...
|
||||
class NotSupportedError(DatabaseError): ...
|
||||
class InternalServerError(InternalError): ...
|
||||
class InvalidCachedStatementError(NotSupportedError):
|
||||
def __init__(self, message) -> None: ...
|
||||
def Binary(self, value): ...
|
||||
STRING: Any
|
||||
TIMESTAMP: Any
|
||||
TIMESTAMP_W_TZ: Any
|
||||
TIME: Any
|
||||
DATE: Any
|
||||
INTERVAL: Any
|
||||
NUMBER: Any
|
||||
FLOAT: Any
|
||||
BOOLEAN: Any
|
||||
INTEGER: Any
|
||||
BIGINTEGER: Any
|
||||
BYTES: Any
|
||||
DECIMAL: Any
|
||||
JSON: Any
|
||||
JSONB: Any
|
||||
ENUM: Any
|
||||
UUID: Any
|
||||
BYTEA: Any
|
||||
DATETIME: Any
|
||||
BINARY: Any
|
||||
|
||||
class PGDialect_asyncpg(PGDialect):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
supports_unicode_statements: bool
|
||||
supports_server_side_cursors: bool
|
||||
supports_unicode_binds: bool
|
||||
default_paramstyle: str
|
||||
supports_sane_multi_rowcount: bool
|
||||
statement_compiler: Any
|
||||
preparer: Any
|
||||
use_setinputsizes: bool
|
||||
use_native_uuid: bool
|
||||
colspecs: Any
|
||||
is_async: bool
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def set_isolation_level(self, connection, level) -> None: ...
|
||||
def set_readonly(self, connection, value) -> None: ...
|
||||
def get_readonly(self, connection): ...
|
||||
def set_deferrable(self, connection, value) -> None: ...
|
||||
def get_deferrable(self, connection): ...
|
||||
def create_connect_args(self, url): ...
|
||||
@classmethod
|
||||
def get_pool_class(cls, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
def do_set_input_sizes(self, cursor, list_of_tuples, context) -> None: ...
|
||||
async def setup_asyncpg_json_codec(self, conn): ...
|
||||
async def setup_asyncpg_jsonb_codec(self, conn): ...
|
||||
def on_connect(self): ...
|
||||
def get_driver_connection(self, connection): ...
|
||||
|
||||
dialect = PGDialect_asyncpg
|
||||
300
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/base.pyi
Normal file
300
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/base.pyi
Normal file
@@ -0,0 +1,300 @@
|
||||
from typing import Any
|
||||
|
||||
from ...engine import characteristics, default, reflection
|
||||
from ...schema import _CreateDropBase
|
||||
from ...sql import compiler, elements, sqltypes
|
||||
from ...sql.ddl import DDLBase
|
||||
from ...types import (
|
||||
BIGINT as BIGINT,
|
||||
BOOLEAN as BOOLEAN,
|
||||
CHAR as CHAR,
|
||||
DATE as DATE,
|
||||
FLOAT as FLOAT,
|
||||
INTEGER as INTEGER,
|
||||
NUMERIC as NUMERIC,
|
||||
REAL as REAL,
|
||||
SMALLINT as SMALLINT,
|
||||
TEXT as TEXT,
|
||||
VARCHAR as VARCHAR,
|
||||
)
|
||||
|
||||
IDX_USING: Any
|
||||
AUTOCOMMIT_REGEXP: Any
|
||||
RESERVED_WORDS: Any
|
||||
|
||||
class BYTEA(sqltypes.LargeBinary):
|
||||
__visit_name__: str
|
||||
|
||||
class DOUBLE_PRECISION(sqltypes.Float):
|
||||
__visit_name__: str
|
||||
|
||||
class INET(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
PGInet = INET
|
||||
|
||||
class CIDR(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
PGCidr = CIDR
|
||||
|
||||
class MACADDR(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
PGMacAddr = MACADDR
|
||||
|
||||
class MONEY(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class OID(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class REGCLASS(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class TIMESTAMP(sqltypes.TIMESTAMP):
|
||||
precision: Any
|
||||
def __init__(self, timezone: bool = ..., precision: Any | None = ...) -> None: ...
|
||||
|
||||
class TIME(sqltypes.TIME):
|
||||
precision: Any
|
||||
def __init__(self, timezone: bool = ..., precision: Any | None = ...) -> None: ...
|
||||
|
||||
class INTERVAL(sqltypes.NativeForEmulated, sqltypes._AbstractInterval):
|
||||
__visit_name__: str
|
||||
native: bool
|
||||
precision: Any
|
||||
fields: Any
|
||||
def __init__(self, precision: Any | None = ..., fields: Any | None = ...) -> None: ...
|
||||
@classmethod
|
||||
def adapt_emulated_to_native(cls, interval, **kw): ...
|
||||
def as_generic(self, allow_nulltype: bool = ...): ...
|
||||
@property
|
||||
def python_type(self): ...
|
||||
def coerce_compared_value(self, op, value): ...
|
||||
|
||||
PGInterval = INTERVAL
|
||||
|
||||
class BIT(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
length: Any
|
||||
varying: Any
|
||||
def __init__(self, length: Any | None = ..., varying: bool = ...) -> None: ...
|
||||
|
||||
PGBit = BIT
|
||||
|
||||
class UUID(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
as_uuid: Any
|
||||
def __init__(self, as_uuid: bool = ...) -> None: ...
|
||||
def coerce_compared_value(self, op, value): ...
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
PGUuid = UUID
|
||||
|
||||
class TSVECTOR(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class ENUM(sqltypes.NativeForEmulated, sqltypes.Enum): # type: ignore[misc]
|
||||
native_enum: bool
|
||||
create_type: Any
|
||||
def __init__(self, *enums, **kw) -> None: ...
|
||||
@classmethod
|
||||
def adapt_emulated_to_native(cls, impl, **kw): ...
|
||||
def create(self, bind: Any | None = ..., checkfirst: bool = ...) -> None: ...
|
||||
def drop(self, bind: Any | None = ..., checkfirst: bool = ...) -> None: ...
|
||||
class EnumGenerator(DDLBase):
|
||||
checkfirst: Any
|
||||
def __init__(self, dialect, connection, checkfirst: bool = ..., **kwargs) -> None: ...
|
||||
def visit_enum(self, enum) -> None: ...
|
||||
class EnumDropper(DDLBase):
|
||||
checkfirst: Any
|
||||
def __init__(self, dialect, connection, checkfirst: bool = ..., **kwargs) -> None: ...
|
||||
def visit_enum(self, enum) -> None: ...
|
||||
|
||||
class _ColonCast(elements.Cast):
|
||||
__visit_name__: str
|
||||
type: Any
|
||||
clause: Any
|
||||
typeclause: Any
|
||||
def __init__(self, expression, type_) -> None: ...
|
||||
|
||||
colspecs: Any
|
||||
ischema_names: Any
|
||||
|
||||
class PGCompiler(compiler.SQLCompiler):
|
||||
def visit_colon_cast(self, element, **kw): ...
|
||||
def visit_array(self, element, **kw): ...
|
||||
def visit_slice(self, element, **kw): ...
|
||||
def visit_json_getitem_op_binary(self, binary, operator, _cast_applied: bool = ..., **kw): ...
|
||||
def visit_json_path_getitem_op_binary(self, binary, operator, _cast_applied: bool = ..., **kw): ...
|
||||
def visit_getitem_binary(self, binary, operator, **kw): ...
|
||||
def visit_aggregate_order_by(self, element, **kw): ...
|
||||
def visit_match_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_ilike_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_not_ilike_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_regexp_match_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_not_regexp_match_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_regexp_replace_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_empty_set_expr(self, element_types): ...
|
||||
def render_literal_value(self, value, type_): ...
|
||||
def visit_sequence(self, seq, **kw): ...
|
||||
def limit_clause(self, select, **kw): ...
|
||||
def format_from_hint_text(self, sqltext, table, hint, iscrud): ...
|
||||
def get_select_precolumns(self, select, **kw): ...
|
||||
def for_update_clause(self, select, **kw): ...
|
||||
def returning_clause(self, stmt, returning_cols): ...
|
||||
def visit_substring_func(self, func, **kw): ...
|
||||
def visit_on_conflict_do_nothing(self, on_conflict, **kw): ...
|
||||
def visit_on_conflict_do_update(self, on_conflict, **kw): ...
|
||||
def update_from_clause(self, update_stmt, from_table, extra_froms, from_hints, **kw): ...
|
||||
def delete_extra_from_clause(self, delete_stmt, from_table, extra_froms, from_hints, **kw): ...
|
||||
def fetch_clause(self, select, **kw): ...
|
||||
|
||||
class PGDDLCompiler(compiler.DDLCompiler):
|
||||
def get_column_specification(self, column, **kwargs): ...
|
||||
def visit_check_constraint(self, constraint): ...
|
||||
def visit_drop_table_comment(self, drop): ...
|
||||
def visit_create_enum_type(self, create): ...
|
||||
def visit_drop_enum_type(self, drop): ...
|
||||
def visit_create_index(self, create): ...
|
||||
def visit_drop_index(self, drop): ...
|
||||
def visit_exclude_constraint(self, constraint, **kw): ...
|
||||
def post_create_table(self, table): ...
|
||||
def visit_computed_column(self, generated): ...
|
||||
def visit_create_sequence(self, create, **kw): ...
|
||||
|
||||
class PGTypeCompiler(compiler.GenericTypeCompiler):
|
||||
def visit_TSVECTOR(self, type_, **kw): ...
|
||||
def visit_INET(self, type_, **kw): ...
|
||||
def visit_CIDR(self, type_, **kw): ...
|
||||
def visit_MACADDR(self, type_, **kw): ...
|
||||
def visit_MONEY(self, type_, **kw): ...
|
||||
def visit_OID(self, type_, **kw): ...
|
||||
def visit_REGCLASS(self, type_, **kw): ...
|
||||
def visit_FLOAT(self, type_, **kw): ...
|
||||
def visit_DOUBLE_PRECISION(self, type_, **kw): ...
|
||||
def visit_BIGINT(self, type_, **kw): ...
|
||||
def visit_HSTORE(self, type_, **kw): ...
|
||||
def visit_JSON(self, type_, **kw): ...
|
||||
def visit_JSONB(self, type_, **kw): ...
|
||||
def visit_INT4RANGE(self, type_, **kw): ...
|
||||
def visit_INT8RANGE(self, type_, **kw): ...
|
||||
def visit_NUMRANGE(self, type_, **kw): ...
|
||||
def visit_DATERANGE(self, type_, **kw): ...
|
||||
def visit_TSRANGE(self, type_, **kw): ...
|
||||
def visit_TSTZRANGE(self, type_, **kw): ...
|
||||
def visit_datetime(self, type_, **kw): ...
|
||||
def visit_enum(self, type_, **kw): ...
|
||||
def visit_ENUM(self, type_, identifier_preparer: Any | None = ..., **kw): ...
|
||||
def visit_TIMESTAMP(self, type_, **kw): ...
|
||||
def visit_TIME(self, type_, **kw): ...
|
||||
def visit_INTERVAL(self, type_, **kw): ...
|
||||
def visit_BIT(self, type_, **kw): ...
|
||||
def visit_UUID(self, type_, **kw): ...
|
||||
def visit_large_binary(self, type_, **kw): ...
|
||||
def visit_BYTEA(self, type_, **kw): ...
|
||||
def visit_ARRAY(self, type_, **kw): ...
|
||||
|
||||
class PGIdentifierPreparer(compiler.IdentifierPreparer):
|
||||
reserved_words: Any
|
||||
def format_type(self, type_, use_schema: bool = ...): ...
|
||||
|
||||
class PGInspector(reflection.Inspector):
|
||||
def get_table_oid(self, table_name, schema: Any | None = ...): ...
|
||||
def get_enums(self, schema: Any | None = ...): ...
|
||||
def get_foreign_table_names(self, schema: Any | None = ...): ...
|
||||
def get_view_names(self, schema: Any | None = ..., include=...): ...
|
||||
|
||||
class CreateEnumType(_CreateDropBase):
|
||||
__visit_name__: str
|
||||
|
||||
class DropEnumType(_CreateDropBase):
|
||||
__visit_name__: str
|
||||
|
||||
class PGExecutionContext(default.DefaultExecutionContext):
|
||||
def fire_sequence(self, seq, type_): ...
|
||||
def get_insert_default(self, column): ...
|
||||
def should_autocommit_text(self, statement): ...
|
||||
|
||||
class PGReadOnlyConnectionCharacteristic(characteristics.ConnectionCharacteristic):
|
||||
transactional: bool
|
||||
def reset_characteristic(self, dialect, dbapi_conn) -> None: ...
|
||||
def set_characteristic(self, dialect, dbapi_conn, value) -> None: ...
|
||||
def get_characteristic(self, dialect, dbapi_conn): ...
|
||||
|
||||
class PGDeferrableConnectionCharacteristic(characteristics.ConnectionCharacteristic):
|
||||
transactional: bool
|
||||
def reset_characteristic(self, dialect, dbapi_conn) -> None: ...
|
||||
def set_characteristic(self, dialect, dbapi_conn, value) -> None: ...
|
||||
def get_characteristic(self, dialect, dbapi_conn): ...
|
||||
|
||||
class PGDialect(default.DefaultDialect):
|
||||
name: str
|
||||
supports_statement_cache: bool
|
||||
supports_alter: bool
|
||||
max_identifier_length: int
|
||||
supports_sane_rowcount: bool
|
||||
supports_native_enum: bool
|
||||
supports_native_boolean: bool
|
||||
supports_smallserial: bool
|
||||
supports_sequences: bool
|
||||
sequences_optional: bool
|
||||
preexecute_autoincrement_sequences: bool
|
||||
postfetch_lastrowid: bool
|
||||
supports_comments: bool
|
||||
supports_default_values: bool
|
||||
supports_default_metavalue: bool
|
||||
supports_empty_insert: bool
|
||||
supports_multivalues_insert: bool
|
||||
supports_identity_columns: bool
|
||||
default_paramstyle: str
|
||||
ischema_names: Any
|
||||
colspecs: Any
|
||||
statement_compiler: Any
|
||||
ddl_compiler: Any
|
||||
type_compiler: Any
|
||||
preparer: Any
|
||||
inspector: Any
|
||||
isolation_level: Any
|
||||
implicit_returning: bool
|
||||
full_returning: bool
|
||||
connection_characteristics: Any
|
||||
construct_arguments: Any
|
||||
reflection_options: Any
|
||||
def __init__(
|
||||
self, isolation_level: Any | None = ..., json_serializer: Any | None = ..., json_deserializer: Any | None = ..., **kwargs
|
||||
) -> None: ...
|
||||
def initialize(self, connection) -> None: ...
|
||||
def on_connect(self): ...
|
||||
def set_isolation_level(self, connection, level) -> None: ...
|
||||
def get_isolation_level(self, connection): ...
|
||||
def set_readonly(self, connection, value) -> None: ...
|
||||
def get_readonly(self, connection) -> None: ...
|
||||
def set_deferrable(self, connection, value) -> None: ...
|
||||
def get_deferrable(self, connection) -> None: ...
|
||||
def do_begin_twophase(self, connection, xid) -> None: ...
|
||||
def do_prepare_twophase(self, connection, xid) -> None: ...
|
||||
def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
def do_recover_twophase(self, connection): ...
|
||||
def has_schema(self, connection, schema): ...
|
||||
def has_table(self, connection, table_name, schema: Any | None = ...): ... # type: ignore[override]
|
||||
def has_sequence(self, connection, sequence_name, schema: Any | None = ...): ... # type: ignore[override]
|
||||
def has_type(self, connection, type_name, schema: Any | None = ...): ...
|
||||
def get_table_oid(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_schema_names(self, connection, **kw): ...
|
||||
def get_table_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_view_names(self, connection, schema: Any | None = ..., include=..., **kw): ...
|
||||
def get_sequence_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_view_definition(self, connection, view_name, schema: Any | None = ..., **kw): ...
|
||||
def get_columns(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_pk_constraint(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_foreign_keys(
|
||||
self, connection, table_name, schema: Any | None = ..., postgresql_ignore_search_path: bool = ..., **kw
|
||||
): ...
|
||||
def get_indexes(self, connection, table_name, schema, **kw): ...
|
||||
def get_unique_constraints(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_table_comment(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_check_constraints(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
47
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/dml.pyi
Normal file
47
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/dml.pyi
Normal file
@@ -0,0 +1,47 @@
|
||||
from typing import Any
|
||||
|
||||
from ...sql.dml import Insert as StandardInsert
|
||||
from ...sql.elements import ClauseElement
|
||||
from ...util import memoized_property
|
||||
|
||||
class Insert(StandardInsert):
|
||||
stringify_dialect: str
|
||||
inherit_cache: bool
|
||||
@memoized_property
|
||||
def excluded(self): ...
|
||||
def on_conflict_do_update(
|
||||
self,
|
||||
constraint: Any | None = ...,
|
||||
index_elements: Any | None = ...,
|
||||
index_where: Any | None = ...,
|
||||
set_: Any | None = ...,
|
||||
where: Any | None = ...,
|
||||
) -> None: ...
|
||||
def on_conflict_do_nothing(
|
||||
self, constraint: Any | None = ..., index_elements: Any | None = ..., index_where: Any | None = ...
|
||||
) -> None: ...
|
||||
|
||||
insert: Any
|
||||
|
||||
class OnConflictClause(ClauseElement):
|
||||
stringify_dialect: str
|
||||
constraint_target: Any
|
||||
inferred_target_elements: Any
|
||||
inferred_target_whereclause: Any
|
||||
def __init__(self, constraint: Any | None = ..., index_elements: Any | None = ..., index_where: Any | None = ...) -> None: ...
|
||||
|
||||
class OnConflictDoNothing(OnConflictClause):
|
||||
__visit_name__: str
|
||||
|
||||
class OnConflictDoUpdate(OnConflictClause):
|
||||
__visit_name__: str
|
||||
update_values_to_set: Any
|
||||
update_whereclause: Any
|
||||
def __init__(
|
||||
self,
|
||||
constraint: Any | None = ...,
|
||||
index_elements: Any | None = ...,
|
||||
index_where: Any | None = ...,
|
||||
set_: Any | None = ...,
|
||||
where: Any | None = ...,
|
||||
) -> None: ...
|
||||
27
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ext.pyi
Normal file
27
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ext.pyi
Normal file
@@ -0,0 +1,27 @@
|
||||
from typing import Any
|
||||
|
||||
from ...sql import expression
|
||||
from ...sql.schema import ColumnCollectionConstraint
|
||||
|
||||
class aggregate_order_by(expression.ColumnElement):
|
||||
__visit_name__: str
|
||||
stringify_dialect: str
|
||||
inherit_cache: bool
|
||||
target: Any
|
||||
type: Any
|
||||
order_by: Any
|
||||
def __init__(self, target, *order_by) -> None: ...
|
||||
def self_group(self, against: Any | None = ...): ...
|
||||
def get_children(self, **kwargs): ...
|
||||
|
||||
class ExcludeConstraint(ColumnCollectionConstraint):
|
||||
__visit_name__: str
|
||||
where: Any
|
||||
inherit_cache: bool
|
||||
create_drop_stringify_dialect: str
|
||||
operators: Any
|
||||
using: Any
|
||||
ops: Any
|
||||
def __init__(self, *elements, **kw) -> None: ...
|
||||
|
||||
def array_agg(*arg, **kw): ...
|
||||
67
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/hstore.pyi
Normal file
67
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/hstore.pyi
Normal file
@@ -0,0 +1,67 @@
|
||||
from typing import Any
|
||||
|
||||
import sqlalchemy.types as sqltypes
|
||||
|
||||
from ...sql import functions as sqlfunc
|
||||
|
||||
class HSTORE(sqltypes.Indexable, sqltypes.Concatenable, sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
hashable: bool
|
||||
text_type: Any
|
||||
def __init__(self, text_type: Any | None = ...) -> None: ...
|
||||
class Comparator(sqltypes.Indexable.Comparator, sqltypes.Concatenable.Comparator):
|
||||
def has_key(self, other): ...
|
||||
def has_all(self, other): ...
|
||||
def has_any(self, other): ...
|
||||
def contains(self, other, **kwargs): ...
|
||||
def contained_by(self, other): ...
|
||||
def defined(self, key): ...
|
||||
def delete(self, key): ...
|
||||
def slice(self, array): ...
|
||||
def keys(self): ...
|
||||
def vals(self): ...
|
||||
def array(self): ...
|
||||
def matrix(self): ...
|
||||
comparator_factory: Any
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class hstore(sqlfunc.GenericFunction):
|
||||
type: Any
|
||||
name: str
|
||||
inherit_cache: bool
|
||||
|
||||
class _HStoreDefinedFunction(sqlfunc.GenericFunction):
|
||||
type: Any
|
||||
name: str
|
||||
inherit_cache: bool
|
||||
|
||||
class _HStoreDeleteFunction(sqlfunc.GenericFunction):
|
||||
type: Any
|
||||
name: str
|
||||
inherit_cache: bool
|
||||
|
||||
class _HStoreSliceFunction(sqlfunc.GenericFunction):
|
||||
type: Any
|
||||
name: str
|
||||
inherit_cache: bool
|
||||
|
||||
class _HStoreKeysFunction(sqlfunc.GenericFunction):
|
||||
type: Any
|
||||
name: str
|
||||
inherit_cache: bool
|
||||
|
||||
class _HStoreValsFunction(sqlfunc.GenericFunction):
|
||||
type: Any
|
||||
name: str
|
||||
inherit_cache: bool
|
||||
|
||||
class _HStoreArrayFunction(sqlfunc.GenericFunction):
|
||||
type: Any
|
||||
name: str
|
||||
inherit_cache: bool
|
||||
|
||||
class _HStoreMatrixFunction(sqlfunc.GenericFunction):
|
||||
type: Any
|
||||
name: str
|
||||
inherit_cache: bool
|
||||
25
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/json.pyi
Normal file
25
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/json.pyi
Normal file
@@ -0,0 +1,25 @@
|
||||
from typing import Any
|
||||
|
||||
import sqlalchemy.types as sqltypes
|
||||
|
||||
class JSONPathType(sqltypes.JSON.JSONPathType):
|
||||
def bind_processor(self, dialect): ...
|
||||
def literal_processor(self, dialect): ...
|
||||
|
||||
class JSON(sqltypes.JSON):
|
||||
astext_type: Any
|
||||
def __init__(self, none_as_null: bool = ..., astext_type: Any | None = ...) -> None: ...
|
||||
class Comparator(sqltypes.JSON.Comparator):
|
||||
@property
|
||||
def astext(self): ...
|
||||
comparator_factory: Any
|
||||
|
||||
class JSONB(JSON):
|
||||
__visit_name__: str
|
||||
class Comparator(JSON.Comparator):
|
||||
def has_key(self, other): ...
|
||||
def has_all(self, other): ...
|
||||
def has_any(self, other): ...
|
||||
def contains(self, other, **kwargs): ...
|
||||
def contained_by(self, other): ...
|
||||
comparator_factory: Any
|
||||
134
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pg8000.pyi
Normal file
134
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pg8000.pyi
Normal file
@@ -0,0 +1,134 @@
|
||||
from typing import Any
|
||||
|
||||
import sqlalchemy.types as sqltypes
|
||||
|
||||
from .array import ARRAY as PGARRAY
|
||||
from .base import ENUM, INTERVAL, UUID, PGCompiler, PGDialect, PGExecutionContext, PGIdentifierPreparer
|
||||
from .json import JSON, JSONB, JSONPathType
|
||||
|
||||
class _PGNumeric(sqltypes.Numeric):
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _PGNumericNoBind(_PGNumeric):
|
||||
def bind_processor(self, dialect) -> None: ...
|
||||
|
||||
class _PGJSON(JSON):
|
||||
def result_processor(self, dialect, coltype) -> None: ...
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _PGJSONB(JSONB):
|
||||
def result_processor(self, dialect, coltype) -> None: ...
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _PGJSONIndexType(sqltypes.JSON.JSONIndexType):
|
||||
def get_dbapi_type(self, dbapi) -> None: ...
|
||||
|
||||
class _PGJSONIntIndexType(sqltypes.JSON.JSONIntIndexType):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _PGJSONStrIndexType(sqltypes.JSON.JSONStrIndexType):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _PGJSONPathType(JSONPathType):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _PGUUID(UUID):
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _PGEnum(ENUM):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _PGInterval(INTERVAL):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
@classmethod
|
||||
def adapt_emulated_to_native(cls, interval, **kw): ...
|
||||
|
||||
class _PGTimeStamp(sqltypes.DateTime):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _PGTime(sqltypes.Time):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _PGInteger(sqltypes.Integer):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _PGSmallInteger(sqltypes.SmallInteger):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _PGNullType(sqltypes.NullType):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _PGBigInteger(sqltypes.BigInteger):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _PGBoolean(sqltypes.Boolean):
|
||||
def get_dbapi_type(self, dbapi): ...
|
||||
|
||||
class _PGARRAY(PGARRAY):
|
||||
def bind_expression(self, bindvalue): ...
|
||||
|
||||
class PGExecutionContext_pg8000(PGExecutionContext):
|
||||
def create_server_side_cursor(self): ...
|
||||
def pre_exec(self) -> None: ...
|
||||
|
||||
class ServerSideCursor:
|
||||
server_side: bool
|
||||
ident: Any
|
||||
cursor: Any
|
||||
def __init__(self, cursor, ident) -> None: ...
|
||||
@property
|
||||
def connection(self): ...
|
||||
@property
|
||||
def rowcount(self): ...
|
||||
@property
|
||||
def description(self): ...
|
||||
def execute(self, operation, args=..., stream: Any | None = ...): ...
|
||||
def executemany(self, operation, param_sets): ...
|
||||
def fetchone(self): ...
|
||||
def fetchmany(self, num: Any | None = ...): ...
|
||||
def fetchall(self): ...
|
||||
def close(self) -> None: ...
|
||||
def setinputsizes(self, *sizes) -> None: ...
|
||||
def setoutputsize(self, size, column: Any | None = ...) -> None: ...
|
||||
|
||||
class PGCompiler_pg8000(PGCompiler):
|
||||
def visit_mod_binary(self, binary, operator, **kw): ...
|
||||
|
||||
class PGIdentifierPreparer_pg8000(PGIdentifierPreparer):
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
|
||||
class PGDialect_pg8000(PGDialect):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
supports_unicode_statements: bool
|
||||
supports_unicode_binds: bool
|
||||
default_paramstyle: str
|
||||
supports_sane_multi_rowcount: bool
|
||||
statement_compiler: Any
|
||||
preparer: Any
|
||||
supports_server_side_cursors: bool
|
||||
use_setinputsizes: bool
|
||||
description_encoding: Any
|
||||
colspecs: Any
|
||||
client_encoding: Any
|
||||
def __init__(self, client_encoding: Any | None = ..., **kwargs) -> None: ...
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def create_connect_args(self, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
def set_isolation_level(self, connection, level) -> None: ...
|
||||
def set_readonly(self, connection, value) -> None: ...
|
||||
def get_readonly(self, connection): ...
|
||||
def set_deferrable(self, connection, value) -> None: ...
|
||||
def get_deferrable(self, connection): ...
|
||||
def set_client_encoding(self, connection, client_encoding) -> None: ...
|
||||
def do_set_input_sizes(self, cursor, list_of_tuples, context) -> None: ...
|
||||
def do_begin_twophase(self, connection, xid) -> None: ...
|
||||
def do_prepare_twophase(self, connection, xid) -> None: ...
|
||||
def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
def do_recover_twophase(self, connection): ...
|
||||
def on_connect(self): ...
|
||||
|
||||
dialect = PGDialect_pg8000
|
||||
95
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2.pyi
Normal file
95
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/psycopg2.pyi
Normal file
@@ -0,0 +1,95 @@
|
||||
from typing import Any
|
||||
|
||||
import sqlalchemy.types as sqltypes
|
||||
|
||||
from .array import ARRAY as PGARRAY
|
||||
from .base import ENUM, UUID, PGCompiler, PGDialect, PGExecutionContext, PGIdentifierPreparer
|
||||
from .hstore import HSTORE
|
||||
from .json import JSON, JSONB
|
||||
|
||||
logger: Any
|
||||
|
||||
class _PGNumeric(sqltypes.Numeric):
|
||||
def bind_processor(self, dialect) -> None: ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _PGEnum(ENUM):
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _PGHStore(HSTORE):
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _PGARRAY(PGARRAY):
|
||||
def bind_expression(self, bindvalue): ...
|
||||
|
||||
class _PGJSON(JSON):
|
||||
def result_processor(self, dialect, coltype) -> None: ...
|
||||
|
||||
class _PGJSONB(JSONB):
|
||||
def result_processor(self, dialect, coltype) -> None: ...
|
||||
|
||||
class _PGUUID(UUID):
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class PGExecutionContext_psycopg2(PGExecutionContext):
|
||||
def create_server_side_cursor(self): ...
|
||||
cursor_fetch_strategy: Any
|
||||
def post_exec(self) -> None: ...
|
||||
|
||||
class PGCompiler_psycopg2(PGCompiler): ...
|
||||
class PGIdentifierPreparer_psycopg2(PGIdentifierPreparer): ...
|
||||
|
||||
EXECUTEMANY_PLAIN: Any
|
||||
EXECUTEMANY_BATCH: Any
|
||||
EXECUTEMANY_VALUES: Any
|
||||
EXECUTEMANY_VALUES_PLUS_BATCH: Any
|
||||
|
||||
class PGDialect_psycopg2(PGDialect):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
supports_unicode_statements: bool
|
||||
supports_server_side_cursors: bool
|
||||
default_paramstyle: str
|
||||
supports_sane_multi_rowcount: bool
|
||||
statement_compiler: Any
|
||||
preparer: Any
|
||||
psycopg2_version: Any
|
||||
engine_config_types: Any
|
||||
colspecs: Any
|
||||
use_native_unicode: Any
|
||||
use_native_hstore: Any
|
||||
use_native_uuid: Any
|
||||
supports_unicode_binds: Any
|
||||
client_encoding: Any
|
||||
executemany_mode: Any
|
||||
insert_executemany_returning: bool
|
||||
executemany_batch_page_size: Any
|
||||
executemany_values_page_size: Any
|
||||
def __init__(
|
||||
self,
|
||||
use_native_unicode: bool = ...,
|
||||
client_encoding: Any | None = ...,
|
||||
use_native_hstore: bool = ...,
|
||||
use_native_uuid: bool = ...,
|
||||
executemany_mode: str = ...,
|
||||
executemany_batch_page_size: int = ...,
|
||||
executemany_values_page_size: int = ...,
|
||||
**kwargs,
|
||||
) -> None: ...
|
||||
def initialize(self, connection) -> None: ...
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def set_isolation_level(self, connection, level) -> None: ...
|
||||
def set_readonly(self, connection, value) -> None: ...
|
||||
def get_readonly(self, connection): ...
|
||||
def set_deferrable(self, connection, value) -> None: ...
|
||||
def get_deferrable(self, connection): ...
|
||||
def do_ping(self, dbapi_connection): ...
|
||||
def on_connect(self): ...
|
||||
def do_executemany(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
def create_connect_args(self, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
|
||||
dialect = PGDialect_psycopg2
|
||||
@@ -0,0 +1,13 @@
|
||||
from typing import Any
|
||||
|
||||
from .psycopg2 import PGDialect_psycopg2
|
||||
|
||||
class PGDialect_psycopg2cffi(PGDialect_psycopg2):
|
||||
driver: str
|
||||
supports_unicode_statements: bool
|
||||
supports_statement_cache: bool
|
||||
FEATURE_VERSION_MAP: Any
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
|
||||
dialect = PGDialect_psycopg2cffi
|
||||
52
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pygresql.pyi
Normal file
52
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/pygresql.pyi
Normal file
@@ -0,0 +1,52 @@
|
||||
from typing import Any
|
||||
|
||||
from ...types import Numeric
|
||||
from .base import UUID, PGCompiler, PGDialect, PGIdentifierPreparer
|
||||
from .hstore import HSTORE
|
||||
from .json import JSON, JSONB
|
||||
|
||||
class _PGNumeric(Numeric):
|
||||
def bind_processor(self, dialect) -> None: ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _PGHStore(HSTORE):
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _PGJSON(JSON):
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _PGJSONB(JSONB):
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _PGUUID(UUID):
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _PGCompiler(PGCompiler):
|
||||
def visit_mod_binary(self, binary, operator, **kw): ...
|
||||
def post_process_text(self, text): ...
|
||||
|
||||
class _PGIdentifierPreparer(PGIdentifierPreparer): ...
|
||||
|
||||
class PGDialect_pygresql(PGDialect):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
statement_compiler: Any
|
||||
preparer: Any
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
colspecs: Any
|
||||
dbapi_version: Any
|
||||
supports_unicode_statements: bool
|
||||
supports_unicode_binds: bool
|
||||
has_native_hstore: Any
|
||||
has_native_json: Any
|
||||
has_native_uuid: Any
|
||||
def __init__(self, **kwargs) -> None: ...
|
||||
def create_connect_args(self, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
|
||||
dialect = PGDialect_pygresql
|
||||
@@ -0,0 +1,31 @@
|
||||
from typing import Any
|
||||
|
||||
import sqlalchemy.types as sqltypes
|
||||
|
||||
from ...util import memoized_property
|
||||
from .base import PGDialect, PGExecutionContext
|
||||
|
||||
class PGNumeric(sqltypes.Numeric):
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class PGExecutionContext_pypostgresql(PGExecutionContext): ...
|
||||
|
||||
class PGDialect_pypostgresql(PGDialect):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
supports_unicode_statements: bool
|
||||
supports_unicode_binds: bool
|
||||
description_encoding: Any
|
||||
default_paramstyle: str
|
||||
supports_sane_rowcount: bool
|
||||
supports_sane_multi_rowcount: bool
|
||||
colspecs: Any
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
@memoized_property
|
||||
def dbapi_exception_translation_map(self): ...
|
||||
def create_connect_args(self, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
|
||||
dialect = PGDialect_pypostgresql
|
||||
36
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ranges.pyi
Normal file
36
stubs/SQLAlchemy/sqlalchemy/dialects/postgresql/ranges.pyi
Normal file
@@ -0,0 +1,36 @@
|
||||
from typing import Any
|
||||
|
||||
import sqlalchemy.types as sqltypes
|
||||
|
||||
class RangeOperators:
|
||||
class comparator_factory(sqltypes.Concatenable.Comparator):
|
||||
def __ne__(self, other): ...
|
||||
def contains(self, other, **kw): ...
|
||||
def contained_by(self, other): ...
|
||||
def overlaps(self, other): ...
|
||||
def strictly_left_of(self, other): ...
|
||||
__lshift__: Any
|
||||
def strictly_right_of(self, other): ...
|
||||
__rshift__: Any
|
||||
def not_extend_right_of(self, other): ...
|
||||
def not_extend_left_of(self, other): ...
|
||||
def adjacent_to(self, other): ...
|
||||
def __add__(self, other): ...
|
||||
|
||||
class INT4RANGE(RangeOperators, sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class INT8RANGE(RangeOperators, sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class NUMRANGE(RangeOperators, sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class DATERANGE(RangeOperators, sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class TSRANGE(RangeOperators, sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class TSTZRANGE(RangeOperators, sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
45
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/__init__.pyi
Normal file
45
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/__init__.pyi
Normal file
@@ -0,0 +1,45 @@
|
||||
from typing import Any
|
||||
|
||||
from .base import (
|
||||
BLOB as BLOB,
|
||||
BOOLEAN as BOOLEAN,
|
||||
CHAR as CHAR,
|
||||
DATE as DATE,
|
||||
DATETIME as DATETIME,
|
||||
DECIMAL as DECIMAL,
|
||||
FLOAT as FLOAT,
|
||||
INTEGER as INTEGER,
|
||||
JSON as JSON,
|
||||
NUMERIC as NUMERIC,
|
||||
REAL as REAL,
|
||||
SMALLINT as SMALLINT,
|
||||
TEXT as TEXT,
|
||||
TIME as TIME,
|
||||
TIMESTAMP as TIMESTAMP,
|
||||
VARCHAR as VARCHAR,
|
||||
)
|
||||
from .dml import Insert as Insert, insert as insert
|
||||
|
||||
__all__ = (
|
||||
"BLOB",
|
||||
"BOOLEAN",
|
||||
"CHAR",
|
||||
"DATE",
|
||||
"DATETIME",
|
||||
"DECIMAL",
|
||||
"FLOAT",
|
||||
"INTEGER",
|
||||
"JSON",
|
||||
"NUMERIC",
|
||||
"SMALLINT",
|
||||
"TEXT",
|
||||
"TIME",
|
||||
"TIMESTAMP",
|
||||
"VARCHAR",
|
||||
"REAL",
|
||||
"Insert",
|
||||
"insert",
|
||||
"dialect",
|
||||
)
|
||||
|
||||
dialect: Any
|
||||
72
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/aiosqlite.pyi
Normal file
72
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/aiosqlite.pyi
Normal file
@@ -0,0 +1,72 @@
|
||||
from typing import Any
|
||||
|
||||
from ...engine import AdaptedConnection
|
||||
from .base import SQLiteExecutionContext
|
||||
from .pysqlite import SQLiteDialect_pysqlite
|
||||
|
||||
class AsyncAdapt_aiosqlite_cursor:
|
||||
server_side: bool
|
||||
await_: Any
|
||||
arraysize: int
|
||||
rowcount: int
|
||||
description: Any
|
||||
def __init__(self, adapt_connection) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
lastrowid: int
|
||||
def execute(self, operation, parameters: Any | None = ...) -> None: ...
|
||||
def executemany(self, operation, seq_of_parameters) -> None: ...
|
||||
def setinputsizes(self, *inputsizes) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def fetchone(self): ...
|
||||
def fetchmany(self, size: Any | None = ...): ...
|
||||
def fetchall(self): ...
|
||||
|
||||
class AsyncAdapt_aiosqlite_ss_cursor(AsyncAdapt_aiosqlite_cursor):
|
||||
server_side: bool
|
||||
def __init__(self, *arg, **kw) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def fetchone(self): ...
|
||||
def fetchmany(self, size: Any | None = ...): ...
|
||||
def fetchall(self): ...
|
||||
|
||||
class AsyncAdapt_aiosqlite_connection(AdaptedConnection):
|
||||
await_: Any
|
||||
dbapi: Any
|
||||
def __init__(self, dbapi, connection) -> None: ...
|
||||
@property
|
||||
def isolation_level(self): ...
|
||||
@isolation_level.setter
|
||||
def isolation_level(self, value) -> None: ...
|
||||
def create_function(self, *args, **kw) -> None: ...
|
||||
def cursor(self, server_side: bool = ...): ...
|
||||
def execute(self, *args, **kw): ...
|
||||
def rollback(self) -> None: ...
|
||||
def commit(self) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
|
||||
class AsyncAdaptFallback_aiosqlite_connection(AsyncAdapt_aiosqlite_connection):
|
||||
await_: Any
|
||||
|
||||
class AsyncAdapt_aiosqlite_dbapi:
|
||||
aiosqlite: Any
|
||||
sqlite: Any
|
||||
paramstyle: str
|
||||
def __init__(self, aiosqlite, sqlite) -> None: ...
|
||||
def connect(self, *arg, **kw): ...
|
||||
|
||||
class SQLiteExecutionContext_aiosqlite(SQLiteExecutionContext):
|
||||
def create_server_side_cursor(self): ...
|
||||
|
||||
class SQLiteDialect_aiosqlite(SQLiteDialect_pysqlite):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
is_async: bool
|
||||
supports_server_side_cursors: bool
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
@classmethod
|
||||
def get_pool_class(cls, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
def get_driver_connection(self, connection): ...
|
||||
|
||||
dialect = SQLiteDialect_aiosqlite
|
||||
142
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/base.pyi
Normal file
142
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/base.pyi
Normal file
@@ -0,0 +1,142 @@
|
||||
from typing import Any
|
||||
|
||||
import sqlalchemy.types as sqltypes
|
||||
|
||||
from ...engine import default
|
||||
from ...sql import compiler
|
||||
from ...types import (
|
||||
BLOB as BLOB,
|
||||
BOOLEAN as BOOLEAN,
|
||||
CHAR as CHAR,
|
||||
DECIMAL as DECIMAL,
|
||||
FLOAT as FLOAT,
|
||||
INTEGER as INTEGER,
|
||||
NUMERIC as NUMERIC,
|
||||
REAL as REAL,
|
||||
SMALLINT as SMALLINT,
|
||||
TEXT as TEXT,
|
||||
TIMESTAMP as TIMESTAMP,
|
||||
VARCHAR as VARCHAR,
|
||||
)
|
||||
from .json import JSON as JSON
|
||||
|
||||
class _SQliteJson(JSON):
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _DateTimeMixin:
|
||||
def __init__(self, storage_format: Any | None = ..., regexp: Any | None = ..., **kw) -> None: ...
|
||||
@property
|
||||
def format_is_text_affinity(self): ...
|
||||
def adapt(self, cls, **kw): ...
|
||||
def literal_processor(self, dialect): ...
|
||||
|
||||
class DATETIME(_DateTimeMixin, sqltypes.DateTime):
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class DATE(_DateTimeMixin, sqltypes.Date):
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class TIME(_DateTimeMixin, sqltypes.Time):
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
colspecs: Any
|
||||
ischema_names: Any
|
||||
|
||||
class SQLiteCompiler(compiler.SQLCompiler):
|
||||
extract_map: Any
|
||||
def visit_now_func(self, fn, **kw): ...
|
||||
def visit_localtimestamp_func(self, func, **kw): ...
|
||||
def visit_true(self, expr, **kw): ...
|
||||
def visit_false(self, expr, **kw): ...
|
||||
def visit_char_length_func(self, fn, **kw): ...
|
||||
def visit_cast(self, cast, **kwargs): ...
|
||||
def visit_extract(self, extract, **kw): ...
|
||||
def limit_clause(self, select, **kw): ...
|
||||
def for_update_clause(self, select, **kw): ...
|
||||
def visit_is_distinct_from_binary(self, binary, operator, **kw): ...
|
||||
def visit_is_not_distinct_from_binary(self, binary, operator, **kw): ...
|
||||
def visit_json_getitem_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_json_path_getitem_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_empty_set_op_expr(self, type_, expand_op): ...
|
||||
def visit_empty_set_expr(self, element_types): ...
|
||||
def visit_regexp_match_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_not_regexp_match_op_binary(self, binary, operator, **kw): ...
|
||||
def visit_on_conflict_do_nothing(self, on_conflict, **kw): ...
|
||||
def visit_on_conflict_do_update(self, on_conflict, **kw): ...
|
||||
|
||||
class SQLiteDDLCompiler(compiler.DDLCompiler):
|
||||
def get_column_specification(self, column, **kwargs): ...
|
||||
def visit_primary_key_constraint(self, constraint): ...
|
||||
def visit_unique_constraint(self, constraint): ...
|
||||
def visit_check_constraint(self, constraint): ...
|
||||
def visit_column_check_constraint(self, constraint): ...
|
||||
def visit_foreign_key_constraint(self, constraint): ...
|
||||
def define_constraint_remote_table(self, constraint, table, preparer): ...
|
||||
def visit_create_index(self, create, include_schema: bool = ..., include_table_schema: bool = ...): ... # type: ignore[override]
|
||||
def post_create_table(self, table): ...
|
||||
|
||||
class SQLiteTypeCompiler(compiler.GenericTypeCompiler):
|
||||
def visit_large_binary(self, type_, **kw): ...
|
||||
def visit_DATETIME(self, type_, **kw): ...
|
||||
def visit_DATE(self, type_, **kw): ...
|
||||
def visit_TIME(self, type_, **kw): ...
|
||||
def visit_JSON(self, type_, **kw): ...
|
||||
|
||||
class SQLiteIdentifierPreparer(compiler.IdentifierPreparer):
|
||||
reserved_words: Any
|
||||
|
||||
class SQLiteExecutionContext(default.DefaultExecutionContext): ...
|
||||
|
||||
class SQLiteDialect(default.DefaultDialect):
|
||||
name: str
|
||||
supports_alter: bool
|
||||
supports_unicode_statements: bool
|
||||
supports_unicode_binds: bool
|
||||
supports_default_values: bool
|
||||
supports_default_metavalue: bool
|
||||
supports_empty_insert: bool
|
||||
supports_cast: bool
|
||||
supports_multivalues_insert: bool
|
||||
tuple_in_values: bool
|
||||
supports_statement_cache: bool
|
||||
default_paramstyle: str
|
||||
statement_compiler: Any
|
||||
ddl_compiler: Any
|
||||
type_compiler: Any
|
||||
preparer: Any
|
||||
ischema_names: Any
|
||||
colspecs: Any
|
||||
isolation_level: Any
|
||||
construct_arguments: Any
|
||||
native_datetime: Any
|
||||
def __init__(
|
||||
self,
|
||||
isolation_level: Any | None = ...,
|
||||
native_datetime: bool = ...,
|
||||
json_serializer: Any | None = ...,
|
||||
json_deserializer: Any | None = ...,
|
||||
_json_serializer: Any | None = ...,
|
||||
_json_deserializer: Any | None = ...,
|
||||
**kwargs,
|
||||
) -> None: ...
|
||||
def set_isolation_level(self, connection, level) -> None: ...
|
||||
def get_isolation_level(self, connection): ...
|
||||
def on_connect(self): ...
|
||||
def get_schema_names(self, connection, **kw): ...
|
||||
def get_table_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_temp_table_names(self, connection, **kw): ...
|
||||
def get_temp_view_names(self, connection, **kw): ...
|
||||
def has_table(self, connection, table_name, schema: Any | None = ...): ... # type: ignore[override]
|
||||
def get_view_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_view_definition(self, connection, view_name, schema: Any | None = ..., **kw): ...
|
||||
def get_columns(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_pk_constraint(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_foreign_keys(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_unique_constraints(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_check_constraints(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_indexes(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
35
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/dml.pyi
Normal file
35
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/dml.pyi
Normal file
@@ -0,0 +1,35 @@
|
||||
from typing import Any
|
||||
|
||||
from ...sql.dml import Insert as StandardInsert
|
||||
from ...sql.elements import ClauseElement
|
||||
from ...util import memoized_property
|
||||
|
||||
class Insert(StandardInsert):
|
||||
stringify_dialect: str
|
||||
inherit_cache: bool
|
||||
@memoized_property
|
||||
def excluded(self): ...
|
||||
def on_conflict_do_update(
|
||||
self, index_elements: Any | None = ..., index_where: Any | None = ..., set_: Any | None = ..., where: Any | None = ...
|
||||
) -> None: ...
|
||||
def on_conflict_do_nothing(self, index_elements: Any | None = ..., index_where: Any | None = ...) -> None: ...
|
||||
|
||||
insert: Any
|
||||
|
||||
class OnConflictClause(ClauseElement):
|
||||
stringify_dialect: str
|
||||
constraint_target: Any
|
||||
inferred_target_elements: Any
|
||||
inferred_target_whereclause: Any
|
||||
def __init__(self, index_elements: Any | None = ..., index_where: Any | None = ...) -> None: ...
|
||||
|
||||
class OnConflictDoNothing(OnConflictClause):
|
||||
__visit_name__: str
|
||||
|
||||
class OnConflictDoUpdate(OnConflictClause):
|
||||
__visit_name__: str
|
||||
update_values_to_set: Any
|
||||
update_whereclause: Any
|
||||
def __init__(
|
||||
self, index_elements: Any | None = ..., index_where: Any | None = ..., set_: Any | None = ..., where: Any | None = ...
|
||||
) -> None: ...
|
||||
10
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/json.pyi
Normal file
10
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/json.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from ...types import JSON as _JSON
|
||||
|
||||
class JSON(_JSON): ...
|
||||
|
||||
class _FormatTypeMixin:
|
||||
def bind_processor(self, dialect): ...
|
||||
def literal_processor(self, dialect): ...
|
||||
|
||||
class JSONIndexType(_FormatTypeMixin, _JSON.JSONIndexType): ...
|
||||
class JSONPathType(_FormatTypeMixin, _JSON.JSONPathType): ...
|
||||
16
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/pysqlcipher.pyi
Normal file
16
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/pysqlcipher.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
from typing import Any
|
||||
|
||||
from .pysqlite import SQLiteDialect_pysqlite
|
||||
|
||||
class SQLiteDialect_pysqlcipher(SQLiteDialect_pysqlite):
|
||||
driver: str
|
||||
supports_statement_cache: bool
|
||||
pragmas: Any
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
@classmethod
|
||||
def get_pool_class(cls, url): ...
|
||||
def on_connect_url(self, url): ...
|
||||
def create_connect_args(self, url): ...
|
||||
|
||||
dialect = SQLiteDialect_pysqlcipher
|
||||
28
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/pysqlite.pyi
Normal file
28
stubs/SQLAlchemy/sqlalchemy/dialects/sqlite/pysqlite.pyi
Normal file
@@ -0,0 +1,28 @@
|
||||
from typing import Any
|
||||
|
||||
from .base import DATE, DATETIME, SQLiteDialect
|
||||
|
||||
class _SQLite_pysqliteTimeStamp(DATETIME):
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class _SQLite_pysqliteDate(DATE):
|
||||
def bind_processor(self, dialect): ...
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class SQLiteDialect_pysqlite(SQLiteDialect):
|
||||
default_paramstyle: str
|
||||
supports_statement_cache: bool
|
||||
colspecs: Any
|
||||
description_encoding: Any
|
||||
driver: str
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
@classmethod
|
||||
def get_pool_class(cls, url): ...
|
||||
def set_isolation_level(self, connection, level): ...
|
||||
def on_connect(self): ...
|
||||
def create_connect_args(self, url): ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
|
||||
dialect = SQLiteDialect_pysqlite
|
||||
58
stubs/SQLAlchemy/sqlalchemy/dialects/sybase/__init__.pyi
Normal file
58
stubs/SQLAlchemy/sqlalchemy/dialects/sybase/__init__.pyi
Normal file
@@ -0,0 +1,58 @@
|
||||
from typing import Any
|
||||
|
||||
from .base import (
|
||||
BIGINT as BIGINT,
|
||||
BINARY as BINARY,
|
||||
BIT as BIT,
|
||||
CHAR as CHAR,
|
||||
DATE as DATE,
|
||||
DATETIME as DATETIME,
|
||||
FLOAT as FLOAT,
|
||||
IMAGE as IMAGE,
|
||||
INT as INT,
|
||||
INTEGER as INTEGER,
|
||||
MONEY as MONEY,
|
||||
NCHAR as NCHAR,
|
||||
NUMERIC as NUMERIC,
|
||||
NVARCHAR as NVARCHAR,
|
||||
SMALLINT as SMALLINT,
|
||||
SMALLMONEY as SMALLMONEY,
|
||||
TEXT as TEXT,
|
||||
TIME as TIME,
|
||||
TINYINT as TINYINT,
|
||||
UNICHAR as UNICHAR,
|
||||
UNITEXT as UNITEXT,
|
||||
UNIVARCHAR as UNIVARCHAR,
|
||||
VARBINARY as VARBINARY,
|
||||
VARCHAR as VARCHAR,
|
||||
)
|
||||
|
||||
__all__ = (
|
||||
"CHAR",
|
||||
"VARCHAR",
|
||||
"TIME",
|
||||
"NCHAR",
|
||||
"NVARCHAR",
|
||||
"TEXT",
|
||||
"DATE",
|
||||
"DATETIME",
|
||||
"FLOAT",
|
||||
"NUMERIC",
|
||||
"BIGINT",
|
||||
"INT",
|
||||
"INTEGER",
|
||||
"SMALLINT",
|
||||
"BINARY",
|
||||
"VARBINARY",
|
||||
"UNITEXT",
|
||||
"UNICHAR",
|
||||
"UNIVARCHAR",
|
||||
"IMAGE",
|
||||
"BIT",
|
||||
"MONEY",
|
||||
"SMALLMONEY",
|
||||
"TINYINT",
|
||||
"dialect",
|
||||
)
|
||||
|
||||
dialect: Any
|
||||
135
stubs/SQLAlchemy/sqlalchemy/dialects/sybase/base.pyi
Normal file
135
stubs/SQLAlchemy/sqlalchemy/dialects/sybase/base.pyi
Normal file
@@ -0,0 +1,135 @@
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy import types as sqltypes
|
||||
from sqlalchemy.engine import default, reflection
|
||||
from sqlalchemy.sql import compiler
|
||||
from sqlalchemy.types import (
|
||||
BIGINT as BIGINT,
|
||||
BINARY as BINARY,
|
||||
CHAR as CHAR,
|
||||
DATE as DATE,
|
||||
DATETIME as DATETIME,
|
||||
DECIMAL as DECIMAL,
|
||||
FLOAT as FLOAT,
|
||||
INT as INT,
|
||||
INTEGER as INTEGER,
|
||||
NCHAR as NCHAR,
|
||||
NUMERIC as NUMERIC,
|
||||
NVARCHAR as NVARCHAR,
|
||||
REAL as REAL,
|
||||
SMALLINT as SMALLINT,
|
||||
TEXT as TEXT,
|
||||
TIME as TIME,
|
||||
TIMESTAMP as TIMESTAMP,
|
||||
VARBINARY as VARBINARY,
|
||||
VARCHAR as VARCHAR,
|
||||
Unicode as Unicode,
|
||||
)
|
||||
|
||||
RESERVED_WORDS: Any
|
||||
|
||||
class _SybaseUnitypeMixin:
|
||||
def result_processor(self, dialect, coltype): ...
|
||||
|
||||
class UNICHAR(_SybaseUnitypeMixin, sqltypes.Unicode):
|
||||
__visit_name__: str
|
||||
|
||||
class UNIVARCHAR(_SybaseUnitypeMixin, sqltypes.Unicode):
|
||||
__visit_name__: str
|
||||
|
||||
class UNITEXT(_SybaseUnitypeMixin, sqltypes.UnicodeText):
|
||||
__visit_name__: str
|
||||
|
||||
class TINYINT(sqltypes.Integer):
|
||||
__visit_name__: str
|
||||
|
||||
class BIT(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class MONEY(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class SMALLMONEY(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class UNIQUEIDENTIFIER(sqltypes.TypeEngine):
|
||||
__visit_name__: str
|
||||
|
||||
class IMAGE(sqltypes.LargeBinary):
|
||||
__visit_name__: str
|
||||
|
||||
class SybaseTypeCompiler(compiler.GenericTypeCompiler):
|
||||
def visit_large_binary(self, type_, **kw): ...
|
||||
def visit_boolean(self, type_, **kw): ...
|
||||
def visit_unicode(self, type_, **kw): ...
|
||||
def visit_UNICHAR(self, type_, **kw): ...
|
||||
def visit_UNIVARCHAR(self, type_, **kw): ...
|
||||
def visit_UNITEXT(self, type_, **kw): ...
|
||||
def visit_TINYINT(self, type_, **kw): ...
|
||||
def visit_IMAGE(self, type_, **kw): ...
|
||||
def visit_BIT(self, type_, **kw): ...
|
||||
def visit_MONEY(self, type_, **kw): ...
|
||||
def visit_SMALLMONEY(self, type_, **kw): ...
|
||||
def visit_UNIQUEIDENTIFIER(self, type_, **kw): ...
|
||||
|
||||
ischema_names: Any
|
||||
|
||||
class SybaseInspector(reflection.Inspector):
|
||||
def __init__(self, conn) -> None: ...
|
||||
def get_table_id(self, table_name, schema: Any | None = ...): ...
|
||||
|
||||
class SybaseExecutionContext(default.DefaultExecutionContext):
|
||||
def set_ddl_autocommit(self, connection, value) -> None: ...
|
||||
def pre_exec(self) -> None: ...
|
||||
def post_exec(self) -> None: ...
|
||||
def get_lastrowid(self): ...
|
||||
|
||||
class SybaseSQLCompiler(compiler.SQLCompiler):
|
||||
ansi_bind_rules: bool
|
||||
extract_map: Any
|
||||
def get_from_hint_text(self, table, text): ...
|
||||
def limit_clause(self, select, **kw): ...
|
||||
def visit_extract(self, extract, **kw): ...
|
||||
def visit_now_func(self, fn, **kw): ...
|
||||
def for_update_clause(self, select): ...
|
||||
def order_by_clause(self, select, **kw): ...
|
||||
def delete_table_clause(self, delete_stmt, from_table, extra_froms): ...
|
||||
def delete_extra_from_clause(self, delete_stmt, from_table, extra_froms, from_hints, **kw): ...
|
||||
|
||||
class SybaseDDLCompiler(compiler.DDLCompiler):
|
||||
def get_column_specification(self, column, **kwargs): ...
|
||||
def visit_drop_index(self, drop): ...
|
||||
|
||||
class SybaseIdentifierPreparer(compiler.IdentifierPreparer):
|
||||
reserved_words: Any
|
||||
|
||||
class SybaseDialect(default.DefaultDialect):
|
||||
name: str
|
||||
supports_unicode_statements: bool
|
||||
supports_sane_rowcount: bool
|
||||
supports_sane_multi_rowcount: bool
|
||||
supports_statement_cache: bool
|
||||
supports_native_boolean: bool
|
||||
supports_unicode_binds: bool
|
||||
postfetch_lastrowid: bool
|
||||
colspecs: Any
|
||||
ischema_names: Any
|
||||
type_compiler: Any
|
||||
statement_compiler: Any
|
||||
ddl_compiler: Any
|
||||
preparer: Any
|
||||
inspector: Any
|
||||
construct_arguments: Any
|
||||
def __init__(self, *args, **kwargs) -> None: ...
|
||||
max_identifier_length: int
|
||||
def initialize(self, connection) -> None: ...
|
||||
def get_table_id(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_columns(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_foreign_keys(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_indexes(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_pk_constraint(self, connection, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_schema_names(self, connection, **kw): ...
|
||||
def get_table_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def get_view_definition(self, connection, view_name, schema: Any | None = ..., **kw): ...
|
||||
def get_view_names(self, connection, schema: Any | None = ..., **kw): ...
|
||||
def has_table(self, connection, table_name, schema: Any | None = ...): ... # type: ignore[override]
|
||||
9
stubs/SQLAlchemy/sqlalchemy/dialects/sybase/mxodbc.pyi
Normal file
9
stubs/SQLAlchemy/sqlalchemy/dialects/sybase/mxodbc.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from sqlalchemy.connectors.mxodbc import MxODBCConnector
|
||||
from sqlalchemy.dialects.sybase.base import SybaseDialect, SybaseExecutionContext
|
||||
|
||||
class SybaseExecutionContext_mxodbc(SybaseExecutionContext): ...
|
||||
|
||||
class SybaseDialect_mxodbc(MxODBCConnector, SybaseDialect):
|
||||
supports_statement_cache: bool
|
||||
|
||||
dialect = SybaseDialect_mxodbc
|
||||
19
stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pyodbc.pyi
Normal file
19
stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pyodbc.pyi
Normal file
@@ -0,0 +1,19 @@
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy import types as sqltypes
|
||||
from sqlalchemy.connectors.pyodbc import PyODBCConnector
|
||||
from sqlalchemy.dialects.sybase.base import SybaseDialect, SybaseExecutionContext
|
||||
|
||||
class _SybNumeric_pyodbc(sqltypes.Numeric):
|
||||
def bind_processor(self, dialect): ...
|
||||
|
||||
class SybaseExecutionContext_pyodbc(SybaseExecutionContext):
|
||||
def set_ddl_autocommit(self, connection, value) -> None: ...
|
||||
|
||||
class SybaseDialect_pyodbc(PyODBCConnector, SybaseDialect):
|
||||
supports_statement_cache: bool
|
||||
colspecs: Any
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
|
||||
dialect = SybaseDialect_pyodbc
|
||||
27
stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pysybase.pyi
Normal file
27
stubs/SQLAlchemy/sqlalchemy/dialects/sybase/pysybase.pyi
Normal file
@@ -0,0 +1,27 @@
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy import types as sqltypes
|
||||
from sqlalchemy.dialects.sybase.base import SybaseDialect, SybaseExecutionContext, SybaseSQLCompiler
|
||||
|
||||
class _SybNumeric(sqltypes.Numeric):
|
||||
def result_processor(self, dialect, type_): ...
|
||||
|
||||
class SybaseExecutionContext_pysybase(SybaseExecutionContext):
|
||||
def set_ddl_autocommit(self, dbapi_connection, value) -> None: ...
|
||||
def pre_exec(self) -> None: ...
|
||||
|
||||
class SybaseSQLCompiler_pysybase(SybaseSQLCompiler):
|
||||
def bindparam_string(self, name, **kw): ...
|
||||
|
||||
class SybaseDialect_pysybase(SybaseDialect):
|
||||
driver: str
|
||||
statement_compiler: Any
|
||||
supports_statement_cache: bool
|
||||
colspecs: Any
|
||||
@classmethod
|
||||
def dbapi(cls): ...
|
||||
def create_connect_args(self, url): ...
|
||||
def do_executemany(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
|
||||
dialect = SybaseDialect_pysybase
|
||||
46
stubs/SQLAlchemy/sqlalchemy/engine/__init__.pyi
Normal file
46
stubs/SQLAlchemy/sqlalchemy/engine/__init__.pyi
Normal file
@@ -0,0 +1,46 @@
|
||||
from ..sql import ddl as ddl
|
||||
from . import events as events, util as util
|
||||
from .base import (
|
||||
Connection as Connection,
|
||||
Engine as Engine,
|
||||
NestedTransaction as NestedTransaction,
|
||||
RootTransaction as RootTransaction,
|
||||
Transaction as Transaction,
|
||||
TwoPhaseTransaction as TwoPhaseTransaction,
|
||||
)
|
||||
from .create import create_engine as create_engine, engine_from_config as engine_from_config
|
||||
from .cursor import (
|
||||
BaseCursorResult as BaseCursorResult,
|
||||
BufferedColumnResultProxy as BufferedColumnResultProxy,
|
||||
BufferedColumnRow as BufferedColumnRow,
|
||||
BufferedRowResultProxy as BufferedRowResultProxy,
|
||||
CursorResult as CursorResult,
|
||||
FullyBufferedResultProxy as FullyBufferedResultProxy,
|
||||
LegacyCursorResult as LegacyCursorResult,
|
||||
ResultProxy as ResultProxy,
|
||||
)
|
||||
from .interfaces import (
|
||||
AdaptedConnection as AdaptedConnection,
|
||||
Compiled as Compiled,
|
||||
Connectable as Connectable,
|
||||
CreateEnginePlugin as CreateEnginePlugin,
|
||||
Dialect as Dialect,
|
||||
ExceptionContext as ExceptionContext,
|
||||
ExecutionContext as ExecutionContext,
|
||||
TypeCompiler as TypeCompiler,
|
||||
)
|
||||
from .mock import create_mock_engine as create_mock_engine
|
||||
from .reflection import Inspector as Inspector
|
||||
from .result import (
|
||||
ChunkedIteratorResult as ChunkedIteratorResult,
|
||||
FrozenResult as FrozenResult,
|
||||
IteratorResult as IteratorResult,
|
||||
MappingResult as MappingResult,
|
||||
MergedResult as MergedResult,
|
||||
Result as Result,
|
||||
ScalarResult as ScalarResult,
|
||||
result_tuple as result_tuple,
|
||||
)
|
||||
from .row import BaseRow as BaseRow, LegacyRow as LegacyRow, Row as Row, RowMapping as RowMapping
|
||||
from .url import URL as URL, make_url as make_url
|
||||
from .util import connection_memoize as connection_memoize
|
||||
169
stubs/SQLAlchemy/sqlalchemy/engine/base.pyi
Normal file
169
stubs/SQLAlchemy/sqlalchemy/engine/base.pyi
Normal file
@@ -0,0 +1,169 @@
|
||||
from typing import Any
|
||||
|
||||
from .. import log
|
||||
from .interfaces import Connectable as Connectable, ExceptionContext
|
||||
from .util import TransactionalContext
|
||||
|
||||
class Connection(Connectable):
|
||||
engine: Any
|
||||
dialect: Any
|
||||
should_close_with_result: bool
|
||||
dispatch: Any
|
||||
def __init__(
|
||||
self,
|
||||
engine,
|
||||
connection: Any | None = ...,
|
||||
close_with_result: bool = ...,
|
||||
_branch_from: Any | None = ...,
|
||||
_execution_options: Any | None = ...,
|
||||
_dispatch: Any | None = ...,
|
||||
_has_events: Any | None = ...,
|
||||
_allow_revalidate: bool = ...,
|
||||
) -> None: ...
|
||||
def schema_for_object(self, obj): ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, type_, value, traceback) -> None: ...
|
||||
def execution_options(self, **opt): ...
|
||||
def get_execution_options(self): ...
|
||||
@property
|
||||
def closed(self): ...
|
||||
@property
|
||||
def invalidated(self): ...
|
||||
@property
|
||||
def connection(self): ...
|
||||
def get_isolation_level(self): ...
|
||||
@property
|
||||
def default_isolation_level(self): ...
|
||||
@property
|
||||
def info(self): ...
|
||||
def connect(self, close_with_result: bool = ...): ... # type: ignore[override]
|
||||
def invalidate(self, exception: Any | None = ...): ...
|
||||
def detach(self) -> None: ...
|
||||
def begin(self): ...
|
||||
def begin_nested(self): ...
|
||||
def begin_twophase(self, xid: Any | None = ...): ...
|
||||
def recover_twophase(self): ...
|
||||
def rollback_prepared(self, xid, recover: bool = ...) -> None: ...
|
||||
def commit_prepared(self, xid, recover: bool = ...) -> None: ...
|
||||
def in_transaction(self): ...
|
||||
def in_nested_transaction(self): ...
|
||||
def get_transaction(self): ...
|
||||
def get_nested_transaction(self): ...
|
||||
def close(self) -> None: ...
|
||||
def scalar(self, object_, *multiparams, **params): ...
|
||||
def scalars(self, object_, *multiparams, **params): ...
|
||||
def execute(self, statement, *multiparams, **params): ...
|
||||
def exec_driver_sql(self, statement, parameters: Any | None = ..., execution_options: Any | None = ...): ...
|
||||
def transaction(self, callable_, *args, **kwargs): ...
|
||||
def run_callable(self, callable_, *args, **kwargs): ...
|
||||
|
||||
class ExceptionContextImpl(ExceptionContext):
|
||||
engine: Any
|
||||
connection: Any
|
||||
sqlalchemy_exception: Any
|
||||
original_exception: Any
|
||||
execution_context: Any
|
||||
statement: Any
|
||||
parameters: Any
|
||||
is_disconnect: Any
|
||||
invalidate_pool_on_disconnect: Any
|
||||
def __init__(
|
||||
self,
|
||||
exception,
|
||||
sqlalchemy_exception,
|
||||
engine,
|
||||
connection,
|
||||
cursor,
|
||||
statement,
|
||||
parameters,
|
||||
context,
|
||||
is_disconnect,
|
||||
invalidate_pool_on_disconnect,
|
||||
) -> None: ...
|
||||
|
||||
class Transaction(TransactionalContext):
|
||||
def __init__(self, connection) -> None: ...
|
||||
@property
|
||||
def is_valid(self): ...
|
||||
def close(self) -> None: ...
|
||||
def rollback(self) -> None: ...
|
||||
def commit(self) -> None: ...
|
||||
|
||||
class MarkerTransaction(Transaction):
|
||||
connection: Any
|
||||
def __init__(self, connection) -> None: ...
|
||||
@property
|
||||
def is_active(self): ...
|
||||
|
||||
class RootTransaction(Transaction):
|
||||
connection: Any
|
||||
is_active: bool
|
||||
def __init__(self, connection) -> None: ...
|
||||
|
||||
class NestedTransaction(Transaction):
|
||||
connection: Any
|
||||
is_active: bool
|
||||
def __init__(self, connection) -> None: ...
|
||||
|
||||
class TwoPhaseTransaction(RootTransaction):
|
||||
xid: Any
|
||||
def __init__(self, connection, xid) -> None: ...
|
||||
def prepare(self) -> None: ...
|
||||
|
||||
class Engine(Connectable, log.Identified):
|
||||
pool: Any
|
||||
url: Any
|
||||
dialect: Any
|
||||
logging_name: Any
|
||||
echo: Any
|
||||
hide_parameters: Any
|
||||
def __init__(
|
||||
self,
|
||||
pool,
|
||||
dialect,
|
||||
url,
|
||||
logging_name: Any | None = ...,
|
||||
echo: Any | None = ...,
|
||||
query_cache_size: int = ...,
|
||||
execution_options: Any | None = ...,
|
||||
hide_parameters: bool = ...,
|
||||
) -> None: ...
|
||||
@property
|
||||
def engine(self): ...
|
||||
def clear_compiled_cache(self) -> None: ...
|
||||
def update_execution_options(self, **opt) -> None: ...
|
||||
def execution_options(self, **opt): ...
|
||||
def get_execution_options(self): ...
|
||||
@property
|
||||
def name(self): ...
|
||||
@property
|
||||
def driver(self): ...
|
||||
def dispose(self) -> None: ...
|
||||
class _trans_ctx:
|
||||
conn: Any
|
||||
transaction: Any
|
||||
close_with_result: Any
|
||||
def __init__(self, conn, transaction, close_with_result) -> None: ...
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, type_, value, traceback) -> None: ...
|
||||
def begin(self, close_with_result: bool = ...): ...
|
||||
def transaction(self, callable_, *args, **kwargs): ...
|
||||
def run_callable(self, callable_, *args, **kwargs): ...
|
||||
def execute(self, statement, *multiparams, **params): ...
|
||||
def scalar(self, statement, *multiparams, **params): ...
|
||||
def connect(self, close_with_result: bool = ...): ... # type: ignore[override]
|
||||
def table_names(self, schema: Any | None = ..., connection: Any | None = ...): ...
|
||||
def has_table(self, table_name, schema: Any | None = ...): ...
|
||||
def raw_connection(self, _connection: Any | None = ...): ...
|
||||
|
||||
class OptionEngineMixin:
|
||||
url: Any
|
||||
dialect: Any
|
||||
logging_name: Any
|
||||
echo: Any
|
||||
hide_parameters: Any
|
||||
dispatch: Any
|
||||
def __init__(self, proxied, execution_options) -> None: ...
|
||||
pool: Any
|
||||
|
||||
class OptionEngine(OptionEngineMixin, Engine): ...
|
||||
18
stubs/SQLAlchemy/sqlalchemy/engine/characteristics.pyi
Normal file
18
stubs/SQLAlchemy/sqlalchemy/engine/characteristics.pyi
Normal file
@@ -0,0 +1,18 @@
|
||||
import abc
|
||||
|
||||
from ..util import ABC
|
||||
|
||||
class ConnectionCharacteristic(ABC, metaclass=abc.ABCMeta):
|
||||
transactional: bool
|
||||
@abc.abstractmethod
|
||||
def reset_characteristic(self, dialect, dbapi_conn): ...
|
||||
@abc.abstractmethod
|
||||
def set_characteristic(self, dialect, dbapi_conn, value): ...
|
||||
@abc.abstractmethod
|
||||
def get_characteristic(self, dialect, dbapi_conn): ...
|
||||
|
||||
class IsolationLevelCharacteristic(ConnectionCharacteristic):
|
||||
transactional: bool
|
||||
def reset_characteristic(self, dialect, dbapi_conn) -> None: ...
|
||||
def set_characteristic(self, dialect, dbapi_conn, value) -> None: ...
|
||||
def get_characteristic(self, dialect, dbapi_conn): ...
|
||||
2
stubs/SQLAlchemy/sqlalchemy/engine/create.pyi
Normal file
2
stubs/SQLAlchemy/sqlalchemy/engine/create.pyi
Normal file
@@ -0,0 +1,2 @@
|
||||
def create_engine(url, **kwargs): ...
|
||||
def engine_from_config(configuration, prefix: str = ..., **kwargs): ...
|
||||
128
stubs/SQLAlchemy/sqlalchemy/engine/cursor.pyi
Normal file
128
stubs/SQLAlchemy/sqlalchemy/engine/cursor.pyi
Normal file
@@ -0,0 +1,128 @@
|
||||
import abc
|
||||
from typing import Any
|
||||
|
||||
from ..util import memoized_property
|
||||
from .result import Result, ResultMetaData
|
||||
from .row import LegacyRow
|
||||
|
||||
MD_INDEX: int
|
||||
MD_RESULT_MAP_INDEX: int
|
||||
MD_OBJECTS: int
|
||||
MD_LOOKUP_KEY: int
|
||||
MD_RENDERED_NAME: int
|
||||
MD_PROCESSOR: int
|
||||
MD_UNTRANSLATED: int
|
||||
|
||||
class CursorResultMetaData(ResultMetaData):
|
||||
returns_rows: bool
|
||||
case_sensitive: Any
|
||||
def __init__(self, parent, cursor_description) -> None: ...
|
||||
|
||||
class LegacyCursorResultMetaData(CursorResultMetaData): ...
|
||||
|
||||
class ResultFetchStrategy:
|
||||
alternate_cursor_description: Any
|
||||
def soft_close(self, result, dbapi_cursor) -> None: ...
|
||||
def hard_close(self, result, dbapi_cursor) -> None: ...
|
||||
def yield_per(self, result, dbapi_cursor, num) -> None: ...
|
||||
def fetchone(self, result, dbapi_cursor, hard_close: bool = ...) -> None: ...
|
||||
def fetchmany(self, result, dbapi_cursor, size: Any | None = ...) -> None: ...
|
||||
def fetchall(self, result) -> None: ...
|
||||
def handle_exception(self, result, dbapi_cursor, err) -> None: ...
|
||||
|
||||
class NoCursorFetchStrategy(ResultFetchStrategy):
|
||||
def soft_close(self, result, dbapi_cursor) -> None: ...
|
||||
def hard_close(self, result, dbapi_cursor) -> None: ...
|
||||
def fetchone(self, result, dbapi_cursor, hard_close: bool = ...): ...
|
||||
def fetchmany(self, result, dbapi_cursor, size: Any | None = ...): ...
|
||||
def fetchall(self, result, dbapi_cursor): ...
|
||||
|
||||
class NoCursorDQLFetchStrategy(NoCursorFetchStrategy): ...
|
||||
class NoCursorDMLFetchStrategy(NoCursorFetchStrategy): ...
|
||||
|
||||
class CursorFetchStrategy(ResultFetchStrategy):
|
||||
def soft_close(self, result, dbapi_cursor) -> None: ...
|
||||
def hard_close(self, result, dbapi_cursor) -> None: ...
|
||||
def handle_exception(self, result, dbapi_cursor, err) -> None: ...
|
||||
def yield_per(self, result, dbapi_cursor, num) -> None: ...
|
||||
def fetchone(self, result, dbapi_cursor, hard_close: bool = ...): ...
|
||||
def fetchmany(self, result, dbapi_cursor, size: Any | None = ...): ...
|
||||
def fetchall(self, result, dbapi_cursor): ...
|
||||
|
||||
class BufferedRowCursorFetchStrategy(CursorFetchStrategy):
|
||||
def __init__(self, dbapi_cursor, execution_options, growth_factor: int = ..., initial_buffer: Any | None = ...) -> None: ...
|
||||
@classmethod
|
||||
def create(cls, result): ...
|
||||
def yield_per(self, result, dbapi_cursor, num) -> None: ...
|
||||
def soft_close(self, result, dbapi_cursor) -> None: ...
|
||||
def hard_close(self, result, dbapi_cursor) -> None: ...
|
||||
def fetchone(self, result, dbapi_cursor, hard_close: bool = ...): ...
|
||||
def fetchmany(self, result, dbapi_cursor, size: Any | None = ...): ...
|
||||
def fetchall(self, result, dbapi_cursor): ...
|
||||
|
||||
class FullyBufferedCursorFetchStrategy(CursorFetchStrategy):
|
||||
alternate_cursor_description: Any
|
||||
def __init__(self, dbapi_cursor, alternate_description: Any | None = ..., initial_buffer: Any | None = ...) -> None: ...
|
||||
def yield_per(self, result, dbapi_cursor, num) -> None: ...
|
||||
def soft_close(self, result, dbapi_cursor) -> None: ...
|
||||
def hard_close(self, result, dbapi_cursor) -> None: ...
|
||||
def fetchone(self, result, dbapi_cursor, hard_close: bool = ...): ...
|
||||
def fetchmany(self, result, dbapi_cursor, size: Any | None = ...): ...
|
||||
def fetchall(self, result, dbapi_cursor): ...
|
||||
|
||||
class _NoResultMetaData(ResultMetaData):
|
||||
returns_rows: bool
|
||||
@property
|
||||
def keys(self) -> None: ...
|
||||
|
||||
class _LegacyNoResultMetaData(_NoResultMetaData):
|
||||
@property
|
||||
def keys(self): ...
|
||||
|
||||
class BaseCursorResult:
|
||||
out_parameters: Any
|
||||
closed: bool
|
||||
context: Any
|
||||
dialect: Any
|
||||
cursor: Any
|
||||
cursor_strategy: Any
|
||||
connection: Any
|
||||
def __init__(self, context, cursor_strategy, cursor_description): ...
|
||||
@property
|
||||
def inserted_primary_key_rows(self): ...
|
||||
@property
|
||||
def inserted_primary_key(self): ...
|
||||
def last_updated_params(self): ...
|
||||
def last_inserted_params(self): ...
|
||||
@property
|
||||
def returned_defaults_rows(self): ...
|
||||
@property
|
||||
def returned_defaults(self): ...
|
||||
def lastrow_has_defaults(self): ...
|
||||
def postfetch_cols(self): ...
|
||||
def prefetch_cols(self): ...
|
||||
def supports_sane_rowcount(self): ...
|
||||
def supports_sane_multi_rowcount(self): ...
|
||||
@memoized_property
|
||||
def rowcount(self): ...
|
||||
@property
|
||||
def lastrowid(self): ...
|
||||
@property
|
||||
def returns_rows(self): ...
|
||||
@property
|
||||
def is_insert(self): ...
|
||||
|
||||
class CursorResult(BaseCursorResult, Result):
|
||||
def merge(self, *others): ...
|
||||
def close(self) -> None: ...
|
||||
def yield_per(self, num) -> None: ...
|
||||
|
||||
class LegacyCursorResult(CursorResult):
|
||||
def close(self) -> None: ...
|
||||
|
||||
ResultProxy = LegacyCursorResult
|
||||
|
||||
class BufferedRowResultProxy(ResultProxy): ...
|
||||
class FullyBufferedResultProxy(ResultProxy): ...
|
||||
class BufferedColumnRow(LegacyRow, metaclass=abc.ABCMeta): ...
|
||||
class BufferedColumnResultProxy(ResultProxy): ...
|
||||
220
stubs/SQLAlchemy/sqlalchemy/engine/default.pyi
Normal file
220
stubs/SQLAlchemy/sqlalchemy/engine/default.pyi
Normal file
@@ -0,0 +1,220 @@
|
||||
from typing import Any, ClassVar, Type
|
||||
|
||||
from .. import types as sqltypes
|
||||
from ..util import memoized_property
|
||||
from . import interfaces
|
||||
|
||||
AUTOCOMMIT_REGEXP: Any
|
||||
SERVER_SIDE_CURSOR_RE: Any
|
||||
CACHE_HIT: Any
|
||||
CACHE_MISS: Any
|
||||
CACHING_DISABLED: Any
|
||||
NO_CACHE_KEY: Any
|
||||
NO_DIALECT_SUPPORT: Any
|
||||
|
||||
class DefaultDialect(interfaces.Dialect):
|
||||
execution_ctx_cls: ClassVar[Type[interfaces.ExecutionContext]]
|
||||
statement_compiler: Any
|
||||
ddl_compiler: Any
|
||||
type_compiler: Any
|
||||
preparer: Any
|
||||
supports_alter: bool
|
||||
supports_comments: bool
|
||||
inline_comments: bool
|
||||
use_setinputsizes: bool
|
||||
supports_statement_cache: bool
|
||||
default_sequence_base: int
|
||||
execute_sequence_format: Any
|
||||
supports_schemas: bool
|
||||
supports_views: bool
|
||||
supports_sequences: bool
|
||||
sequences_optional: bool
|
||||
preexecute_autoincrement_sequences: bool
|
||||
supports_identity_columns: bool
|
||||
postfetch_lastrowid: bool
|
||||
implicit_returning: bool
|
||||
full_returning: bool
|
||||
insert_executemany_returning: bool
|
||||
cte_follows_insert: bool
|
||||
supports_native_enum: bool
|
||||
supports_native_boolean: bool
|
||||
non_native_boolean_check_constraint: bool
|
||||
supports_simple_order_by_label: bool
|
||||
tuple_in_values: bool
|
||||
connection_characteristics: Any
|
||||
engine_config_types: Any
|
||||
supports_native_decimal: bool
|
||||
supports_unicode_statements: bool
|
||||
supports_unicode_binds: bool
|
||||
returns_unicode_strings: Any
|
||||
description_encoding: Any
|
||||
name: str
|
||||
max_identifier_length: int
|
||||
isolation_level: Any
|
||||
max_index_name_length: Any
|
||||
max_constraint_name_length: Any
|
||||
supports_sane_rowcount: bool
|
||||
supports_sane_multi_rowcount: bool
|
||||
colspecs: Any
|
||||
default_paramstyle: str
|
||||
supports_default_values: bool
|
||||
supports_default_metavalue: bool
|
||||
supports_empty_insert: bool
|
||||
supports_multivalues_insert: bool
|
||||
supports_is_distinct_from: bool
|
||||
supports_server_side_cursors: bool
|
||||
server_side_cursors: bool
|
||||
supports_for_update_of: bool
|
||||
server_version_info: Any
|
||||
default_schema_name: Any
|
||||
construct_arguments: Any
|
||||
requires_name_normalize: bool
|
||||
reflection_options: Any
|
||||
dbapi_exception_translation_map: Any
|
||||
is_async: bool
|
||||
CACHE_HIT: Any
|
||||
CACHE_MISS: Any
|
||||
CACHING_DISABLED: Any
|
||||
NO_CACHE_KEY: Any
|
||||
NO_DIALECT_SUPPORT: Any
|
||||
convert_unicode: Any
|
||||
encoding: Any
|
||||
positional: bool
|
||||
dbapi: Any
|
||||
paramstyle: Any
|
||||
identifier_preparer: Any
|
||||
case_sensitive: Any
|
||||
label_length: Any
|
||||
compiler_linting: Any
|
||||
def __init__(
|
||||
self,
|
||||
convert_unicode: bool = ...,
|
||||
encoding: str = ...,
|
||||
paramstyle: Any | None = ...,
|
||||
dbapi: Any | None = ...,
|
||||
implicit_returning: Any | None = ...,
|
||||
case_sensitive: bool = ...,
|
||||
supports_native_boolean: Any | None = ...,
|
||||
max_identifier_length: Any | None = ...,
|
||||
label_length: Any | None = ...,
|
||||
compiler_linting=...,
|
||||
server_side_cursors: bool = ...,
|
||||
**kwargs,
|
||||
) -> None: ...
|
||||
@property
|
||||
def dialect_description(self): ...
|
||||
@property
|
||||
def supports_sane_rowcount_returning(self): ...
|
||||
@classmethod
|
||||
def get_pool_class(cls, url): ...
|
||||
def get_dialect_pool_class(self, url): ...
|
||||
@classmethod
|
||||
def load_provisioning(cls) -> None: ...
|
||||
default_isolation_level: Any
|
||||
def initialize(self, connection) -> None: ...
|
||||
def on_connect(self) -> None: ...
|
||||
def get_default_isolation_level(self, dbapi_conn): ...
|
||||
def type_descriptor(self, typeobj): ...
|
||||
def has_index(self, connection, table_name, index_name, schema: Any | None = ...): ...
|
||||
def validate_identifier(self, ident) -> None: ...
|
||||
def connect(self, *cargs, **cparams): ...
|
||||
def create_connect_args(self, url): ...
|
||||
def set_engine_execution_options(self, engine, opts) -> None: ...
|
||||
def set_connection_execution_options(self, connection, opts) -> None: ...
|
||||
def do_begin(self, dbapi_connection) -> None: ...
|
||||
def do_rollback(self, dbapi_connection) -> None: ...
|
||||
def do_commit(self, dbapi_connection) -> None: ...
|
||||
def do_close(self, dbapi_connection) -> None: ...
|
||||
def do_ping(self, dbapi_connection): ...
|
||||
def create_xid(self): ...
|
||||
def do_savepoint(self, connection, name) -> None: ...
|
||||
def do_rollback_to_savepoint(self, connection, name) -> None: ...
|
||||
def do_release_savepoint(self, connection, name) -> None: ...
|
||||
def do_executemany(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
def do_execute(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
def do_execute_no_params(self, cursor, statement, context: Any | None = ...) -> None: ... # type: ignore[override]
|
||||
def is_disconnect(self, e, connection, cursor): ...
|
||||
def reset_isolation_level(self, dbapi_conn) -> None: ...
|
||||
def normalize_name(self, name): ...
|
||||
def denormalize_name(self, name): ...
|
||||
def get_driver_connection(self, connection): ...
|
||||
|
||||
class _RendersLiteral:
|
||||
def literal_processor(self, dialect): ...
|
||||
|
||||
class _StrDateTime(_RendersLiteral, sqltypes.DateTime): ...
|
||||
class _StrDate(_RendersLiteral, sqltypes.Date): ...
|
||||
class _StrTime(_RendersLiteral, sqltypes.Time): ...
|
||||
|
||||
class StrCompileDialect(DefaultDialect):
|
||||
statement_compiler: Any
|
||||
ddl_compiler: Any
|
||||
type_compiler: Any
|
||||
preparer: Any
|
||||
supports_statement_cache: bool
|
||||
supports_identity_columns: bool
|
||||
supports_sequences: bool
|
||||
sequences_optional: bool
|
||||
preexecute_autoincrement_sequences: bool
|
||||
implicit_returning: bool
|
||||
supports_native_boolean: bool
|
||||
supports_multivalues_insert: bool
|
||||
supports_simple_order_by_label: bool
|
||||
colspecs: Any
|
||||
|
||||
class DefaultExecutionContext(interfaces.ExecutionContext):
|
||||
isinsert: bool
|
||||
isupdate: bool
|
||||
isdelete: bool
|
||||
is_crud: bool
|
||||
is_text: bool
|
||||
isddl: bool
|
||||
executemany: bool
|
||||
compiled: Any
|
||||
statement: Any
|
||||
result_column_struct: Any
|
||||
returned_default_rows: Any
|
||||
execution_options: Any
|
||||
include_set_input_sizes: Any
|
||||
exclude_set_input_sizes: Any
|
||||
cursor_fetch_strategy: Any
|
||||
cache_stats: Any
|
||||
invoked_statement: Any
|
||||
cache_hit: Any
|
||||
@memoized_property
|
||||
def identifier_preparer(self): ...
|
||||
@memoized_property
|
||||
def engine(self): ...
|
||||
@memoized_property
|
||||
def postfetch_cols(self): ...
|
||||
@memoized_property
|
||||
def prefetch_cols(self): ...
|
||||
@memoized_property
|
||||
def returning_cols(self) -> None: ...
|
||||
@memoized_property
|
||||
def no_parameters(self): ...
|
||||
@memoized_property
|
||||
def should_autocommit(self): ...
|
||||
@property
|
||||
def connection(self): ...
|
||||
def should_autocommit_text(self, statement): ...
|
||||
def create_cursor(self): ...
|
||||
def create_default_cursor(self): ...
|
||||
def create_server_side_cursor(self) -> None: ...
|
||||
def pre_exec(self) -> None: ...
|
||||
def get_out_parameter_values(self, names) -> None: ...
|
||||
def post_exec(self) -> None: ...
|
||||
def get_result_processor(self, type_, colname, coltype): ...
|
||||
def get_lastrowid(self): ...
|
||||
def handle_dbapi_exception(self, e) -> None: ...
|
||||
@property
|
||||
def rowcount(self): ...
|
||||
def supports_sane_rowcount(self): ...
|
||||
def supports_sane_multi_rowcount(self): ...
|
||||
@memoized_property
|
||||
def inserted_primary_key_rows(self): ...
|
||||
def lastrow_has_defaults(self): ...
|
||||
current_parameters: Any
|
||||
def get_current_parameters(self, isolate_multiinsert_groups: bool = ...): ...
|
||||
def get_insert_default(self, column): ...
|
||||
def get_update_default(self, column): ...
|
||||
29
stubs/SQLAlchemy/sqlalchemy/engine/events.pyi
Normal file
29
stubs/SQLAlchemy/sqlalchemy/engine/events.pyi
Normal file
@@ -0,0 +1,29 @@
|
||||
from .. import event as event
|
||||
|
||||
class ConnectionEvents(event.Events):
|
||||
def before_execute(self, conn, clauseelement, multiparams, params, execution_options) -> None: ...
|
||||
def after_execute(self, conn, clauseelement, multiparams, params, execution_options, result) -> None: ...
|
||||
def before_cursor_execute(self, conn, cursor, statement, parameters, context, executemany) -> None: ...
|
||||
def after_cursor_execute(self, conn, cursor, statement, parameters, context, executemany) -> None: ...
|
||||
def handle_error(self, exception_context) -> None: ...
|
||||
def engine_connect(self, conn, branch) -> None: ...
|
||||
def set_connection_execution_options(self, conn, opts) -> None: ...
|
||||
def set_engine_execution_options(self, engine, opts) -> None: ...
|
||||
def engine_disposed(self, engine) -> None: ...
|
||||
def begin(self, conn) -> None: ...
|
||||
def rollback(self, conn) -> None: ...
|
||||
def commit(self, conn) -> None: ...
|
||||
def savepoint(self, conn, name) -> None: ...
|
||||
def rollback_savepoint(self, conn, name, context) -> None: ...
|
||||
def release_savepoint(self, conn, name, context) -> None: ...
|
||||
def begin_twophase(self, conn, xid) -> None: ...
|
||||
def prepare_twophase(self, conn, xid) -> None: ...
|
||||
def rollback_twophase(self, conn, xid, is_prepared) -> None: ...
|
||||
def commit_twophase(self, conn, xid, is_prepared) -> None: ...
|
||||
|
||||
class DialectEvents(event.Events):
|
||||
def do_connect(self, dialect, conn_rec, cargs, cparams) -> None: ...
|
||||
def do_executemany(self, cursor, statement, parameters, context) -> None: ...
|
||||
def do_execute_no_params(self, cursor, statement, context) -> None: ...
|
||||
def do_execute(self, cursor, statement, parameters, context) -> None: ...
|
||||
def do_setinputsizes(self, inputsizes, cursor, statement, parameters, context) -> None: ...
|
||||
102
stubs/SQLAlchemy/sqlalchemy/engine/interfaces.pyi
Normal file
102
stubs/SQLAlchemy/sqlalchemy/engine/interfaces.pyi
Normal file
@@ -0,0 +1,102 @@
|
||||
from typing import Any
|
||||
|
||||
from ..sql.compiler import Compiled as Compiled, TypeCompiler as TypeCompiler
|
||||
|
||||
class Dialect:
|
||||
supports_statement_cache: bool
|
||||
def create_connect_args(self, url) -> None: ...
|
||||
@classmethod
|
||||
def type_descriptor(cls, typeobj) -> None: ...
|
||||
def initialize(self, connection) -> None: ...
|
||||
def get_columns(self, connection, table_name, schema: Any | None = ..., **kw) -> None: ...
|
||||
def get_pk_constraint(self, connection, table_name, schema: Any | None = ..., **kw) -> None: ...
|
||||
def get_foreign_keys(self, connection, table_name, schema: Any | None = ..., **kw) -> None: ...
|
||||
def get_table_names(self, connection, schema: Any | None = ..., **kw) -> None: ...
|
||||
def get_temp_table_names(self, connection, schema: Any | None = ..., **kw) -> None: ...
|
||||
def get_view_names(self, connection, schema: Any | None = ..., **kw) -> None: ...
|
||||
def get_sequence_names(self, connection, schema: Any | None = ..., **kw) -> None: ...
|
||||
def get_temp_view_names(self, connection, schema: Any | None = ..., **kw) -> None: ...
|
||||
def get_view_definition(self, connection, view_name, schema: Any | None = ..., **kw) -> None: ...
|
||||
def get_indexes(self, connection, table_name, schema: Any | None = ..., **kw) -> None: ...
|
||||
def get_unique_constraints(self, connection, table_name, schema: Any | None = ..., **kw) -> None: ...
|
||||
def get_check_constraints(self, connection, table_name, schema: Any | None = ..., **kw) -> None: ...
|
||||
def get_table_comment(self, connection, table_name, schema: Any | None = ..., **kw) -> None: ...
|
||||
def normalize_name(self, name) -> None: ...
|
||||
def denormalize_name(self, name) -> None: ...
|
||||
def has_table(self, connection, table_name, schema: Any | None = ..., **kw) -> None: ...
|
||||
def has_index(self, connection, table_name, index_name, schema: Any | None = ...) -> None: ...
|
||||
def has_sequence(self, connection, sequence_name, schema: Any | None = ..., **kw) -> None: ...
|
||||
def do_begin(self, dbapi_connection) -> None: ...
|
||||
def do_rollback(self, dbapi_connection) -> None: ...
|
||||
def do_commit(self, dbapi_connection) -> None: ...
|
||||
def do_close(self, dbapi_connection) -> None: ...
|
||||
def do_set_input_sizes(self, cursor, list_of_tuples, context) -> None: ...
|
||||
def create_xid(self) -> None: ...
|
||||
def do_savepoint(self, connection, name) -> None: ...
|
||||
def do_rollback_to_savepoint(self, connection, name) -> None: ...
|
||||
def do_release_savepoint(self, connection, name) -> None: ...
|
||||
def do_begin_twophase(self, connection, xid) -> None: ...
|
||||
def do_prepare_twophase(self, connection, xid) -> None: ...
|
||||
def do_rollback_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
def do_commit_twophase(self, connection, xid, is_prepared: bool = ..., recover: bool = ...) -> None: ...
|
||||
def do_recover_twophase(self, connection) -> None: ...
|
||||
def do_executemany(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
def do_execute(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
def do_execute_no_params(self, cursor, statement, parameters, context: Any | None = ...) -> None: ...
|
||||
def is_disconnect(self, e, connection, cursor) -> None: ...
|
||||
def connect(self, *cargs, **cparams) -> None: ...
|
||||
def on_connect_url(self, url): ...
|
||||
def on_connect(self) -> None: ...
|
||||
def reset_isolation_level(self, dbapi_conn) -> None: ...
|
||||
def set_isolation_level(self, dbapi_conn, level) -> None: ...
|
||||
def get_isolation_level(self, dbapi_conn) -> None: ...
|
||||
def get_default_isolation_level(self, dbapi_conn) -> None: ...
|
||||
@classmethod
|
||||
def get_dialect_cls(cls, url): ...
|
||||
@classmethod
|
||||
def load_provisioning(cls) -> None: ...
|
||||
@classmethod
|
||||
def engine_created(cls, engine) -> None: ...
|
||||
def get_driver_connection(self, connection) -> None: ...
|
||||
|
||||
class CreateEnginePlugin:
|
||||
url: Any
|
||||
def __init__(self, url, kwargs) -> None: ...
|
||||
def update_url(self, url) -> None: ...
|
||||
def handle_dialect_kwargs(self, dialect_cls, dialect_args) -> None: ...
|
||||
def handle_pool_kwargs(self, pool_cls, pool_args) -> None: ...
|
||||
def engine_created(self, engine) -> None: ...
|
||||
|
||||
class ExecutionContext:
|
||||
def create_cursor(self) -> None: ...
|
||||
def pre_exec(self) -> None: ...
|
||||
def get_out_parameter_values(self, out_param_names) -> None: ...
|
||||
def post_exec(self) -> None: ...
|
||||
def get_result_cursor_strategy(self, result) -> None: ...
|
||||
def handle_dbapi_exception(self, e) -> None: ...
|
||||
def should_autocommit_text(self, statement) -> None: ...
|
||||
def lastrow_has_defaults(self) -> None: ...
|
||||
def get_rowcount(self) -> None: ...
|
||||
|
||||
class Connectable:
|
||||
def connect(self, **kwargs) -> None: ...
|
||||
engine: Any
|
||||
def execute(self, object_, *multiparams, **params) -> None: ...
|
||||
def scalar(self, object_, *multiparams, **params) -> None: ...
|
||||
|
||||
class ExceptionContext:
|
||||
connection: Any
|
||||
engine: Any
|
||||
cursor: Any
|
||||
statement: Any
|
||||
parameters: Any
|
||||
original_exception: Any
|
||||
sqlalchemy_exception: Any
|
||||
chained_exception: Any
|
||||
execution_context: Any
|
||||
is_disconnect: Any
|
||||
invalidate_pool_on_disconnect: bool
|
||||
|
||||
class AdaptedConnection:
|
||||
@property
|
||||
def driver_connection(self): ...
|
||||
18
stubs/SQLAlchemy/sqlalchemy/engine/mock.pyi
Normal file
18
stubs/SQLAlchemy/sqlalchemy/engine/mock.pyi
Normal file
@@ -0,0 +1,18 @@
|
||||
from typing import Any
|
||||
|
||||
from . import base
|
||||
|
||||
class MockConnection(base.Connectable):
|
||||
def __init__(self, dialect, execute) -> None: ...
|
||||
engine: Any
|
||||
dialect: Any
|
||||
name: Any
|
||||
def schema_for_object(self, obj): ...
|
||||
def connect(self, **kwargs): ...
|
||||
def execution_options(self, **kw): ...
|
||||
def compiler(self, statement, parameters, **kwargs): ...
|
||||
def create(self, entity, **kwargs) -> None: ...
|
||||
def drop(self, entity, **kwargs) -> None: ...
|
||||
def execute(self, object_, *multiparams, **params) -> None: ...
|
||||
|
||||
def create_mock_engine(url, executor, **kw): ...
|
||||
32
stubs/SQLAlchemy/sqlalchemy/engine/reflection.pyi
Normal file
32
stubs/SQLAlchemy/sqlalchemy/engine/reflection.pyi
Normal file
@@ -0,0 +1,32 @@
|
||||
from typing import Any
|
||||
|
||||
def cache(fn, self, con, *args, **kw): ...
|
||||
|
||||
class Inspector:
|
||||
def __init__(self, bind): ...
|
||||
@classmethod
|
||||
def from_engine(cls, bind): ...
|
||||
@property
|
||||
def default_schema_name(self): ...
|
||||
def get_schema_names(self): ...
|
||||
def get_table_names(self, schema: Any | None = ...): ...
|
||||
def has_table(self, table_name, schema: Any | None = ...): ...
|
||||
def has_sequence(self, sequence_name, schema: Any | None = ...): ...
|
||||
def get_sorted_table_and_fkc_names(self, schema: Any | None = ...): ...
|
||||
def get_temp_table_names(self): ...
|
||||
def get_temp_view_names(self): ...
|
||||
def get_table_options(self, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_view_names(self, schema: Any | None = ...): ...
|
||||
def get_sequence_names(self, schema: Any | None = ...): ...
|
||||
def get_view_definition(self, view_name, schema: Any | None = ...): ...
|
||||
def get_columns(self, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_pk_constraint(self, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_foreign_keys(self, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_indexes(self, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_unique_constraints(self, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_table_comment(self, table_name, schema: Any | None = ..., **kw): ...
|
||||
def get_check_constraints(self, table_name, schema: Any | None = ..., **kw): ...
|
||||
def reflecttable(self, *args, **kwargs): ...
|
||||
def reflect_table(
|
||||
self, table, include_columns, exclude_columns=..., resolve_fks: bool = ..., _extend_on: Any | None = ...
|
||||
) -> None: ...
|
||||
117
stubs/SQLAlchemy/sqlalchemy/engine/result.pyi
Normal file
117
stubs/SQLAlchemy/sqlalchemy/engine/result.pyi
Normal file
@@ -0,0 +1,117 @@
|
||||
from collections.abc import KeysView
|
||||
from typing import Any
|
||||
|
||||
from ..sql.base import InPlaceGenerative
|
||||
|
||||
class ResultMetaData:
|
||||
@property
|
||||
def keys(self): ...
|
||||
|
||||
class RMKeyView(KeysView[Any]):
|
||||
def __init__(self, parent) -> None: ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self): ...
|
||||
def __contains__(self, item): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
|
||||
class SimpleResultMetaData(ResultMetaData):
|
||||
def __init__(
|
||||
self,
|
||||
keys,
|
||||
extra: Any | None = ...,
|
||||
_processors: Any | None = ...,
|
||||
_tuplefilter: Any | None = ...,
|
||||
_translated_indexes: Any | None = ...,
|
||||
_unique_filters: Any | None = ...,
|
||||
) -> None: ...
|
||||
|
||||
def result_tuple(fields, extra: Any | None = ...): ...
|
||||
|
||||
class ResultInternal(InPlaceGenerative): ...
|
||||
|
||||
class _WithKeys:
|
||||
def keys(self): ...
|
||||
|
||||
class Result(_WithKeys, ResultInternal):
|
||||
def __init__(self, cursor_metadata) -> None: ...
|
||||
def close(self) -> None: ...
|
||||
def yield_per(self, num) -> None: ...
|
||||
def unique(self, strategy: Any | None = ...) -> None: ...
|
||||
def columns(self, *col_expressions): ...
|
||||
def scalars(self, index: int = ...): ...
|
||||
def mappings(self): ...
|
||||
def __iter__(self): ...
|
||||
def __next__(self): ...
|
||||
def partitions(self, size: Any | None = ...) -> None: ...
|
||||
def fetchall(self): ...
|
||||
def fetchone(self): ...
|
||||
def fetchmany(self, size: Any | None = ...): ...
|
||||
def all(self): ...
|
||||
def first(self): ...
|
||||
def one_or_none(self): ...
|
||||
def scalar_one(self): ...
|
||||
def scalar_one_or_none(self): ...
|
||||
def one(self): ...
|
||||
def scalar(self): ...
|
||||
def freeze(self): ...
|
||||
def merge(self, *others): ...
|
||||
|
||||
class FilterResult(ResultInternal): ...
|
||||
|
||||
class ScalarResult(FilterResult):
|
||||
def __init__(self, real_result, index) -> None: ...
|
||||
def unique(self, strategy: Any | None = ...): ...
|
||||
def partitions(self, size: Any | None = ...) -> None: ...
|
||||
def fetchall(self): ...
|
||||
def fetchmany(self, size: Any | None = ...): ...
|
||||
def all(self): ...
|
||||
def __iter__(self): ...
|
||||
def __next__(self): ...
|
||||
def first(self): ...
|
||||
def one_or_none(self): ...
|
||||
def one(self): ...
|
||||
|
||||
class MappingResult(_WithKeys, FilterResult):
|
||||
def __init__(self, result) -> None: ...
|
||||
def unique(self, strategy: Any | None = ...): ...
|
||||
def columns(self, *col_expressions): ...
|
||||
def partitions(self, size: Any | None = ...) -> None: ...
|
||||
def fetchall(self): ...
|
||||
def fetchone(self): ...
|
||||
def fetchmany(self, size: Any | None = ...): ...
|
||||
def all(self): ...
|
||||
def __iter__(self): ...
|
||||
def __next__(self): ...
|
||||
def first(self): ...
|
||||
def one_or_none(self): ...
|
||||
def one(self): ...
|
||||
|
||||
class FrozenResult:
|
||||
metadata: Any
|
||||
data: Any
|
||||
def __init__(self, result) -> None: ...
|
||||
def rewrite_rows(self): ...
|
||||
def with_new_rows(self, tuple_data): ...
|
||||
def __call__(self): ...
|
||||
|
||||
class IteratorResult(Result):
|
||||
iterator: Any
|
||||
raw: Any
|
||||
def __init__(self, cursor_metadata, iterator, raw: Any | None = ..., _source_supports_scalars: bool = ...) -> None: ...
|
||||
|
||||
def null_result(): ...
|
||||
|
||||
class ChunkedIteratorResult(IteratorResult):
|
||||
chunks: Any
|
||||
raw: Any
|
||||
iterator: Any
|
||||
dynamic_yield_per: Any
|
||||
def __init__(
|
||||
self, cursor_metadata, chunks, source_supports_scalars: bool = ..., raw: Any | None = ..., dynamic_yield_per: bool = ...
|
||||
) -> None: ...
|
||||
def yield_per(self, num) -> None: ...
|
||||
|
||||
class MergedResult(IteratorResult):
|
||||
closed: bool
|
||||
def __init__(self, cursor_metadata, results) -> None: ...
|
||||
55
stubs/SQLAlchemy/sqlalchemy/engine/row.pyi
Normal file
55
stubs/SQLAlchemy/sqlalchemy/engine/row.pyi
Normal file
@@ -0,0 +1,55 @@
|
||||
import abc
|
||||
from collections.abc import ItemsView, KeysView, Mapping, Sequence, ValuesView
|
||||
from typing import Any
|
||||
|
||||
from ..cresultproxy import BaseRow as BaseRow
|
||||
|
||||
MD_INDEX: int
|
||||
|
||||
def rowproxy_reconstructor(cls, state): ...
|
||||
|
||||
KEY_INTEGER_ONLY: int
|
||||
KEY_OBJECTS_ONLY: int
|
||||
KEY_OBJECTS_BUT_WARN: int
|
||||
KEY_OBJECTS_NO_WARN: int
|
||||
|
||||
class Row(BaseRow, Sequence[Any], metaclass=abc.ABCMeta):
|
||||
count: Any
|
||||
index: Any
|
||||
def __contains__(self, key): ...
|
||||
__hash__: Any
|
||||
def __lt__(self, other): ...
|
||||
def __le__(self, other): ...
|
||||
def __ge__(self, other): ...
|
||||
def __gt__(self, other): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def keys(self): ...
|
||||
|
||||
class LegacyRow(Row, metaclass=abc.ABCMeta):
|
||||
def __contains__(self, key): ...
|
||||
def has_key(self, key): ...
|
||||
def items(self): ...
|
||||
def iterkeys(self): ...
|
||||
def itervalues(self): ...
|
||||
def values(self): ...
|
||||
|
||||
BaseRowProxy = BaseRow
|
||||
RowProxy = Row
|
||||
|
||||
class ROMappingView(KeysView[Any], ValuesView[Any], ItemsView[Any, Any]):
|
||||
def __init__(self, mapping, items) -> None: ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self): ...
|
||||
def __contains__(self, item): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
|
||||
class RowMapping(BaseRow, Mapping[Any, Any]):
|
||||
__getitem__: Any
|
||||
def __iter__(self): ...
|
||||
def __len__(self): ...
|
||||
def __contains__(self, key): ...
|
||||
def items(self): ...
|
||||
def keys(self): ...
|
||||
def values(self): ...
|
||||
4
stubs/SQLAlchemy/sqlalchemy/engine/strategies.pyi
Normal file
4
stubs/SQLAlchemy/sqlalchemy/engine/strategies.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from typing import Any
|
||||
|
||||
class MockEngineStrategy:
|
||||
MockConnection: Any
|
||||
46
stubs/SQLAlchemy/sqlalchemy/engine/url.pyi
Normal file
46
stubs/SQLAlchemy/sqlalchemy/engine/url.pyi
Normal file
@@ -0,0 +1,46 @@
|
||||
from typing import Any
|
||||
|
||||
from ..util import memoized_property
|
||||
|
||||
class URL:
|
||||
def __new__(cls, *arg, **kw): ...
|
||||
@classmethod
|
||||
def create(
|
||||
cls,
|
||||
drivername,
|
||||
username: Any | None = ...,
|
||||
password: Any | None = ...,
|
||||
host: Any | None = ...,
|
||||
port: Any | None = ...,
|
||||
database: Any | None = ...,
|
||||
query=...,
|
||||
): ...
|
||||
def set(
|
||||
self,
|
||||
drivername: Any | None = ...,
|
||||
username: Any | None = ...,
|
||||
password: Any | None = ...,
|
||||
host: Any | None = ...,
|
||||
port: Any | None = ...,
|
||||
database: Any | None = ...,
|
||||
query: Any | None = ...,
|
||||
): ...
|
||||
def update_query_string(self, query_string, append: bool = ...): ...
|
||||
def update_query_pairs(self, key_value_pairs, append: bool = ...): ...
|
||||
def update_query_dict(self, query_parameters, append: bool = ...): ...
|
||||
def difference_update_query(self, names): ...
|
||||
@memoized_property
|
||||
def normalized_query(self): ...
|
||||
def __to_string__(self, hide_password: bool = ...): ...
|
||||
def render_as_string(self, hide_password: bool = ...): ...
|
||||
def __copy__(self): ...
|
||||
def __deepcopy__(self, memo): ...
|
||||
def __hash__(self): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def get_backend_name(self): ...
|
||||
def get_driver_name(self): ...
|
||||
def get_dialect(self): ...
|
||||
def translate_connect_args(self, names: Any | None = ..., **kw): ...
|
||||
|
||||
def make_url(name_or_url): ...
|
||||
5
stubs/SQLAlchemy/sqlalchemy/engine/util.pyi
Normal file
5
stubs/SQLAlchemy/sqlalchemy/engine/util.pyi
Normal file
@@ -0,0 +1,5 @@
|
||||
def connection_memoize(key): ...
|
||||
|
||||
class TransactionalContext:
|
||||
def __enter__(self): ...
|
||||
def __exit__(self, type_, value, traceback) -> None: ...
|
||||
10
stubs/SQLAlchemy/sqlalchemy/event/__init__.pyi
Normal file
10
stubs/SQLAlchemy/sqlalchemy/event/__init__.pyi
Normal file
@@ -0,0 +1,10 @@
|
||||
from .api import (
|
||||
CANCEL as CANCEL,
|
||||
NO_RETVAL as NO_RETVAL,
|
||||
contains as contains,
|
||||
listen as listen,
|
||||
listens_for as listens_for,
|
||||
remove as remove,
|
||||
)
|
||||
from .attr import RefCollection as RefCollection
|
||||
from .base import Events as Events, dispatcher as dispatcher
|
||||
9
stubs/SQLAlchemy/sqlalchemy/event/api.pyi
Normal file
9
stubs/SQLAlchemy/sqlalchemy/event/api.pyi
Normal file
@@ -0,0 +1,9 @@
|
||||
from typing import Any
|
||||
|
||||
CANCEL: Any
|
||||
NO_RETVAL: Any
|
||||
|
||||
def listen(target, identifier, fn, *args, **kw) -> None: ...
|
||||
def listens_for(target, identifier, *args, **kw): ...
|
||||
def remove(target, identifier, fn) -> None: ...
|
||||
def contains(target, identifier, fn): ...
|
||||
85
stubs/SQLAlchemy/sqlalchemy/event/attr.pyi
Normal file
85
stubs/SQLAlchemy/sqlalchemy/event/attr.pyi
Normal file
@@ -0,0 +1,85 @@
|
||||
from typing import Any
|
||||
|
||||
from .. import util
|
||||
|
||||
class RefCollection(util.MemoizedSlots):
|
||||
ref: Any
|
||||
|
||||
class _empty_collection:
|
||||
def append(self, element) -> None: ...
|
||||
def extend(self, other) -> None: ...
|
||||
def remove(self, element) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def clear(self) -> None: ...
|
||||
|
||||
class _ClsLevelDispatch(RefCollection):
|
||||
name: Any
|
||||
clsname: Any
|
||||
arg_names: Any
|
||||
has_kw: Any
|
||||
legacy_signatures: Any
|
||||
def __init__(self, parent_dispatch_cls, fn): ...
|
||||
def insert(self, event_key, propagate) -> None: ...
|
||||
def append(self, event_key, propagate) -> None: ...
|
||||
def update_subclass(self, target) -> None: ...
|
||||
def remove(self, event_key) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
def for_modify(self, obj): ...
|
||||
|
||||
class _InstanceLevelDispatch(RefCollection): ...
|
||||
|
||||
class _EmptyListener(_InstanceLevelDispatch):
|
||||
propagate: Any
|
||||
listeners: Any
|
||||
parent: Any
|
||||
parent_listeners: Any
|
||||
name: Any
|
||||
def __init__(self, parent, target_cls) -> None: ...
|
||||
def for_modify(self, obj): ...
|
||||
exec_once: Any
|
||||
exec_once_unless_exception: Any
|
||||
insert: Any
|
||||
append: Any
|
||||
remove: Any
|
||||
clear: Any
|
||||
def __call__(self, *args, **kw) -> None: ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self): ...
|
||||
def __bool__(self): ...
|
||||
__nonzero__: Any
|
||||
|
||||
class _CompoundListener(_InstanceLevelDispatch):
|
||||
def exec_once(self, *args, **kw) -> None: ...
|
||||
def exec_once_unless_exception(self, *args, **kw) -> None: ...
|
||||
def __call__(self, *args, **kw) -> None: ...
|
||||
def __len__(self): ...
|
||||
def __iter__(self): ...
|
||||
def __bool__(self): ...
|
||||
__nonzero__: Any
|
||||
|
||||
class _ListenerCollection(_CompoundListener):
|
||||
parent_listeners: Any
|
||||
parent: Any
|
||||
name: Any
|
||||
listeners: Any
|
||||
propagate: Any
|
||||
def __init__(self, parent, target_cls) -> None: ...
|
||||
def for_modify(self, obj): ...
|
||||
def insert(self, event_key, propagate) -> None: ...
|
||||
def append(self, event_key, propagate) -> None: ...
|
||||
def remove(self, event_key) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
|
||||
class _JoinedListener(_CompoundListener):
|
||||
parent: Any
|
||||
name: Any
|
||||
local: Any
|
||||
parent_listeners: Any
|
||||
def __init__(self, parent, name, local) -> None: ...
|
||||
@property
|
||||
def listeners(self): ...
|
||||
def for_modify(self, obj): ...
|
||||
def insert(self, event_key, propagate) -> None: ...
|
||||
def append(self, event_key, propagate) -> None: ...
|
||||
def remove(self, event_key) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
30
stubs/SQLAlchemy/sqlalchemy/event/base.pyi
Normal file
30
stubs/SQLAlchemy/sqlalchemy/event/base.pyi
Normal file
@@ -0,0 +1,30 @@
|
||||
from typing import Any
|
||||
|
||||
class _UnpickleDispatch:
|
||||
def __call__(self, _instance_cls): ...
|
||||
|
||||
class _Dispatch:
|
||||
def __init__(self, parent, instance_cls: Any | None = ...) -> None: ...
|
||||
def __getattr__(self, name): ...
|
||||
def __reduce__(self): ...
|
||||
|
||||
class _EventMeta(type):
|
||||
def __init__(cls, classname, bases, dict_) -> None: ...
|
||||
|
||||
class Events:
|
||||
dispatch: Any
|
||||
|
||||
class _JoinedDispatcher:
|
||||
local: Any
|
||||
parent: Any
|
||||
def __init__(self, local, parent) -> None: ...
|
||||
def __getattr__(self, name): ...
|
||||
|
||||
class dispatcher:
|
||||
dispatch: Any
|
||||
events: Any
|
||||
def __init__(self, events) -> None: ...
|
||||
def __get__(self, obj, cls): ...
|
||||
|
||||
class slots_dispatcher(dispatcher):
|
||||
def __get__(self, obj, cls): ...
|
||||
0
stubs/SQLAlchemy/sqlalchemy/event/legacy.pyi
Normal file
0
stubs/SQLAlchemy/sqlalchemy/event/legacy.pyi
Normal file
21
stubs/SQLAlchemy/sqlalchemy/event/registry.pyi
Normal file
21
stubs/SQLAlchemy/sqlalchemy/event/registry.pyi
Normal file
@@ -0,0 +1,21 @@
|
||||
from typing import Any
|
||||
|
||||
class _EventKey:
|
||||
target: Any
|
||||
identifier: Any
|
||||
fn: Any
|
||||
fn_key: Any
|
||||
fn_wrap: Any
|
||||
dispatch_target: Any
|
||||
def __init__(self, target, identifier, fn, dispatch_target, _fn_wrap: Any | None = ...) -> None: ...
|
||||
def with_wrapper(self, fn_wrap): ...
|
||||
def with_dispatch_target(self, dispatch_target): ...
|
||||
def listen(self, *args, **kw) -> None: ...
|
||||
def remove(self) -> None: ...
|
||||
def contains(self): ...
|
||||
def base_listen(
|
||||
self, propagate: bool = ..., insert: bool = ..., named: bool = ..., retval: Any | None = ..., asyncio: bool = ...
|
||||
) -> None: ...
|
||||
def append_to_list(self, owner, list_): ...
|
||||
def remove_from_list(self, owner, list_) -> None: ...
|
||||
def prepend_to_list(self, owner, list_): ...
|
||||
4
stubs/SQLAlchemy/sqlalchemy/events.pyi
Normal file
4
stubs/SQLAlchemy/sqlalchemy/events.pyi
Normal file
@@ -0,0 +1,4 @@
|
||||
from .engine.events import ConnectionEvents as ConnectionEvents, DialectEvents as DialectEvents
|
||||
from .pool.events import PoolEvents as PoolEvents
|
||||
from .sql.base import SchemaEventTarget as SchemaEventTarget
|
||||
from .sql.events import DDLEvents as DDLEvents
|
||||
154
stubs/SQLAlchemy/sqlalchemy/exc.pyi
Normal file
154
stubs/SQLAlchemy/sqlalchemy/exc.pyi
Normal file
@@ -0,0 +1,154 @@
|
||||
from typing import Any
|
||||
|
||||
class HasDescriptionCode:
|
||||
code: Any
|
||||
def __init__(self, *arg, **kw) -> None: ...
|
||||
|
||||
class SQLAlchemyError(HasDescriptionCode, Exception):
|
||||
def __unicode__(self): ...
|
||||
|
||||
class ArgumentError(SQLAlchemyError): ...
|
||||
|
||||
class ObjectNotExecutableError(ArgumentError):
|
||||
target: Any
|
||||
def __init__(self, target) -> None: ...
|
||||
def __reduce__(self): ...
|
||||
|
||||
class NoSuchModuleError(ArgumentError): ...
|
||||
class NoForeignKeysError(ArgumentError): ...
|
||||
class AmbiguousForeignKeysError(ArgumentError): ...
|
||||
|
||||
class CircularDependencyError(SQLAlchemyError):
|
||||
cycles: Any
|
||||
edges: Any
|
||||
def __init__(self, message, cycles, edges, msg: Any | None = ..., code: Any | None = ...) -> None: ...
|
||||
def __reduce__(self): ...
|
||||
|
||||
class CompileError(SQLAlchemyError): ...
|
||||
|
||||
class UnsupportedCompilationError(CompileError):
|
||||
code: str
|
||||
compiler: Any
|
||||
element_type: Any
|
||||
message: Any
|
||||
def __init__(self, compiler, element_type, message: Any | None = ...) -> None: ...
|
||||
def __reduce__(self): ...
|
||||
|
||||
class IdentifierError(SQLAlchemyError): ...
|
||||
|
||||
class DisconnectionError(SQLAlchemyError):
|
||||
invalidate_pool: bool
|
||||
|
||||
class InvalidatePoolError(DisconnectionError):
|
||||
invalidate_pool: bool
|
||||
|
||||
class TimeoutError(SQLAlchemyError): ...
|
||||
class InvalidRequestError(SQLAlchemyError): ...
|
||||
class NoInspectionAvailable(InvalidRequestError): ...
|
||||
class PendingRollbackError(InvalidRequestError): ...
|
||||
class ResourceClosedError(InvalidRequestError): ...
|
||||
class NoSuchColumnError(InvalidRequestError, KeyError): ...
|
||||
class NoResultFound(InvalidRequestError): ...
|
||||
class MultipleResultsFound(InvalidRequestError): ...
|
||||
class NoReferenceError(InvalidRequestError): ...
|
||||
|
||||
class AwaitRequired(InvalidRequestError):
|
||||
code: str
|
||||
|
||||
class MissingGreenlet(InvalidRequestError):
|
||||
code: str
|
||||
|
||||
class NoReferencedTableError(NoReferenceError):
|
||||
table_name: Any
|
||||
def __init__(self, message, tname) -> None: ...
|
||||
def __reduce__(self): ...
|
||||
|
||||
class NoReferencedColumnError(NoReferenceError):
|
||||
table_name: Any
|
||||
column_name: Any
|
||||
def __init__(self, message, tname, cname) -> None: ...
|
||||
def __reduce__(self): ...
|
||||
|
||||
class NoSuchTableError(InvalidRequestError): ...
|
||||
class UnreflectableTableError(InvalidRequestError): ...
|
||||
class UnboundExecutionError(InvalidRequestError): ...
|
||||
class DontWrapMixin: ...
|
||||
|
||||
class StatementError(SQLAlchemyError):
|
||||
statement: Any
|
||||
params: Any
|
||||
orig: Any
|
||||
ismulti: Any
|
||||
hide_parameters: Any
|
||||
detail: Any
|
||||
def __init__(
|
||||
self, message, statement, params, orig, hide_parameters: bool = ..., code: Any | None = ..., ismulti: Any | None = ...
|
||||
) -> None: ...
|
||||
def add_detail(self, msg) -> None: ...
|
||||
def __reduce__(self): ...
|
||||
|
||||
class DBAPIError(StatementError):
|
||||
code: str
|
||||
@classmethod
|
||||
def instance(
|
||||
cls,
|
||||
statement,
|
||||
params,
|
||||
orig,
|
||||
dbapi_base_err,
|
||||
hide_parameters: bool = ...,
|
||||
connection_invalidated: bool = ...,
|
||||
dialect: Any | None = ...,
|
||||
ismulti: Any | None = ...,
|
||||
): ...
|
||||
def __reduce__(self): ...
|
||||
connection_invalidated: Any
|
||||
def __init__(
|
||||
self,
|
||||
statement,
|
||||
params,
|
||||
orig,
|
||||
hide_parameters: bool = ...,
|
||||
connection_invalidated: bool = ...,
|
||||
code: Any | None = ...,
|
||||
ismulti: Any | None = ...,
|
||||
) -> None: ...
|
||||
|
||||
class InterfaceError(DBAPIError):
|
||||
code: str
|
||||
|
||||
class DatabaseError(DBAPIError):
|
||||
code: str
|
||||
|
||||
class DataError(DatabaseError):
|
||||
code: str
|
||||
|
||||
class OperationalError(DatabaseError):
|
||||
code: str
|
||||
|
||||
class IntegrityError(DatabaseError):
|
||||
code: str
|
||||
|
||||
class InternalError(DatabaseError):
|
||||
code: str
|
||||
|
||||
class ProgrammingError(DatabaseError):
|
||||
code: str
|
||||
|
||||
class NotSupportedError(DatabaseError):
|
||||
code: str
|
||||
|
||||
class SADeprecationWarning(HasDescriptionCode, DeprecationWarning):
|
||||
deprecated_since: Any
|
||||
|
||||
class Base20DeprecationWarning(SADeprecationWarning):
|
||||
deprecated_since: str
|
||||
|
||||
class LegacyAPIWarning(Base20DeprecationWarning): ...
|
||||
class RemovedIn20Warning(Base20DeprecationWarning): ...
|
||||
class MovedIn20Warning(RemovedIn20Warning): ...
|
||||
|
||||
class SAPendingDeprecationWarning(PendingDeprecationWarning):
|
||||
deprecated_since: Any
|
||||
|
||||
class SAWarning(HasDescriptionCode, RuntimeWarning): ...
|
||||
0
stubs/SQLAlchemy/sqlalchemy/ext/__init__.pyi
Normal file
0
stubs/SQLAlchemy/sqlalchemy/ext/__init__.pyi
Normal file
198
stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi
Normal file
198
stubs/SQLAlchemy/sqlalchemy/ext/associationproxy.pyi
Normal file
@@ -0,0 +1,198 @@
|
||||
from typing import Any
|
||||
|
||||
from ..orm import interfaces
|
||||
from ..sql.operators import ColumnOperators
|
||||
from ..util import memoized_property
|
||||
|
||||
def association_proxy(target_collection, attr, **kw): ...
|
||||
|
||||
ASSOCIATION_PROXY: Any
|
||||
|
||||
class AssociationProxy(interfaces.InspectionAttrInfo):
|
||||
is_attribute: bool
|
||||
extension_type: Any
|
||||
target_collection: Any
|
||||
value_attr: Any
|
||||
creator: Any
|
||||
getset_factory: Any
|
||||
proxy_factory: Any
|
||||
proxy_bulk_set: Any
|
||||
cascade_scalar_deletes: Any
|
||||
key: Any
|
||||
info: Any
|
||||
def __init__(
|
||||
self,
|
||||
target_collection,
|
||||
attr,
|
||||
creator: Any | None = ...,
|
||||
getset_factory: Any | None = ...,
|
||||
proxy_factory: Any | None = ...,
|
||||
proxy_bulk_set: Any | None = ...,
|
||||
info: Any | None = ...,
|
||||
cascade_scalar_deletes: bool = ...,
|
||||
) -> None: ...
|
||||
def __get__(self, obj, class_): ...
|
||||
def __set__(self, obj, values): ...
|
||||
def __delete__(self, obj): ...
|
||||
def for_class(self, class_, obj: Any | None = ...): ...
|
||||
|
||||
class AssociationProxyInstance:
|
||||
parent: Any
|
||||
key: Any
|
||||
owning_class: Any
|
||||
target_collection: Any
|
||||
collection_class: Any
|
||||
target_class: Any
|
||||
value_attr: Any
|
||||
def __init__(self, parent, owning_class, target_class, value_attr) -> None: ...
|
||||
@classmethod
|
||||
def for_proxy(cls, parent, owning_class, parent_instance): ...
|
||||
def __clause_element__(self) -> None: ...
|
||||
@property
|
||||
def remote_attr(self): ...
|
||||
@property
|
||||
def local_attr(self): ...
|
||||
@property
|
||||
def attr(self): ...
|
||||
@memoized_property
|
||||
def scalar(self): ...
|
||||
@property
|
||||
def info(self): ...
|
||||
def get(self, obj): ...
|
||||
def set(self, obj, values) -> None: ...
|
||||
def delete(self, obj) -> None: ...
|
||||
def any(self, criterion: Any | None = ..., **kwargs): ...
|
||||
def has(self, criterion: Any | None = ..., **kwargs): ...
|
||||
|
||||
class AmbiguousAssociationProxyInstance(AssociationProxyInstance):
|
||||
def get(self, obj): ...
|
||||
def __eq__(self, obj): ...
|
||||
def __ne__(self, obj): ...
|
||||
def any(self, criterion: Any | None = ..., **kwargs) -> None: ...
|
||||
def has(self, criterion: Any | None = ..., **kwargs) -> None: ...
|
||||
|
||||
class ObjectAssociationProxyInstance(AssociationProxyInstance):
|
||||
def contains(self, obj): ...
|
||||
def __eq__(self, obj): ...
|
||||
def __ne__(self, obj): ...
|
||||
|
||||
class ColumnAssociationProxyInstance(ColumnOperators, AssociationProxyInstance):
|
||||
def __eq__(self, other): ...
|
||||
def operate(self, op, *other, **kwargs): ...
|
||||
|
||||
class _lazy_collection:
|
||||
parent: Any
|
||||
target: Any
|
||||
def __init__(self, obj, target) -> None: ...
|
||||
def __call__(self): ...
|
||||
|
||||
class _AssociationCollection:
|
||||
lazy_collection: Any
|
||||
creator: Any
|
||||
getter: Any
|
||||
setter: Any
|
||||
parent: Any
|
||||
def __init__(self, lazy_collection, creator, getter, setter, parent) -> None: ...
|
||||
col: Any
|
||||
def __len__(self): ...
|
||||
def __bool__(self): ...
|
||||
__nonzero__: Any
|
||||
|
||||
class _AssociationList(_AssociationCollection):
|
||||
def __getitem__(self, index): ...
|
||||
def __setitem__(self, index, value) -> None: ...
|
||||
def __delitem__(self, index) -> None: ...
|
||||
def __contains__(self, value): ...
|
||||
def __getslice__(self, start, end): ...
|
||||
def __setslice__(self, start, end, values) -> None: ...
|
||||
def __delslice__(self, start, end) -> None: ...
|
||||
def __iter__(self): ...
|
||||
def append(self, value) -> None: ...
|
||||
def count(self, value): ...
|
||||
def extend(self, values) -> None: ...
|
||||
def insert(self, index, value) -> None: ...
|
||||
def pop(self, index: int = ...): ...
|
||||
def remove(self, value) -> None: ...
|
||||
def reverse(self) -> None: ...
|
||||
def sort(self) -> None: ...
|
||||
def clear(self) -> None: ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def __lt__(self, other): ...
|
||||
def __le__(self, other): ...
|
||||
def __gt__(self, other): ...
|
||||
def __ge__(self, other): ...
|
||||
def __cmp__(self, other): ...
|
||||
def __add__(self, iterable): ...
|
||||
def __radd__(self, iterable): ...
|
||||
def __mul__(self, n): ...
|
||||
__rmul__: Any
|
||||
def __iadd__(self, iterable): ...
|
||||
def __imul__(self, n): ...
|
||||
def index(self, item, *args): ...
|
||||
def copy(self): ...
|
||||
def __hash__(self): ...
|
||||
|
||||
class _AssociationDict(_AssociationCollection):
|
||||
def __getitem__(self, key): ...
|
||||
def __setitem__(self, key, value) -> None: ...
|
||||
def __delitem__(self, key) -> None: ...
|
||||
def __contains__(self, key): ...
|
||||
def has_key(self, key): ...
|
||||
def __iter__(self): ...
|
||||
def clear(self) -> None: ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def __lt__(self, other): ...
|
||||
def __le__(self, other): ...
|
||||
def __gt__(self, other): ...
|
||||
def __ge__(self, other): ...
|
||||
def __cmp__(self, other): ...
|
||||
def get(self, key, default: Any | None = ...): ...
|
||||
def setdefault(self, key, default: Any | None = ...): ...
|
||||
def keys(self): ...
|
||||
def items(self): ...
|
||||
def values(self): ...
|
||||
def pop(self, key, default=...): ...
|
||||
def popitem(self): ...
|
||||
def update(self, *a, **kw) -> None: ...
|
||||
def copy(self): ...
|
||||
def __hash__(self): ...
|
||||
|
||||
class _AssociationSet(_AssociationCollection):
|
||||
def __len__(self): ...
|
||||
def __bool__(self): ...
|
||||
__nonzero__: Any
|
||||
def __contains__(self, value): ...
|
||||
def __iter__(self): ...
|
||||
def add(self, value) -> None: ...
|
||||
def discard(self, value) -> None: ...
|
||||
def remove(self, value) -> None: ...
|
||||
def pop(self): ...
|
||||
def update(self, other) -> None: ...
|
||||
def __ior__(self, other): ... # type: ignore[misc]
|
||||
def union(self, other): ...
|
||||
__or__: Any
|
||||
def difference(self, other): ...
|
||||
__sub__: Any
|
||||
def difference_update(self, other) -> None: ...
|
||||
def __isub__(self, other): ... # type: ignore[misc]
|
||||
def intersection(self, other): ...
|
||||
__and__: Any
|
||||
def intersection_update(self, other) -> None: ...
|
||||
def __iand__(self, other): ... # type: ignore[misc]
|
||||
def symmetric_difference(self, other): ...
|
||||
__xor__: Any
|
||||
def symmetric_difference_update(self, other) -> None: ...
|
||||
def __ixor__(self, other): ... # type: ignore[misc]
|
||||
def issubset(self, other): ...
|
||||
def issuperset(self, other): ...
|
||||
def clear(self) -> None: ...
|
||||
def copy(self): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
def __lt__(self, other): ...
|
||||
def __le__(self, other): ...
|
||||
def __gt__(self, other): ...
|
||||
def __ge__(self, other): ...
|
||||
def __hash__(self): ...
|
||||
15
stubs/SQLAlchemy/sqlalchemy/ext/asyncio/__init__.pyi
Normal file
15
stubs/SQLAlchemy/sqlalchemy/ext/asyncio/__init__.pyi
Normal file
@@ -0,0 +1,15 @@
|
||||
from .engine import (
|
||||
AsyncConnection as AsyncConnection,
|
||||
AsyncEngine as AsyncEngine,
|
||||
AsyncTransaction as AsyncTransaction,
|
||||
create_async_engine as create_async_engine,
|
||||
)
|
||||
from .events import AsyncConnectionEvents as AsyncConnectionEvents, AsyncSessionEvents as AsyncSessionEvents
|
||||
from .result import AsyncMappingResult as AsyncMappingResult, AsyncResult as AsyncResult, AsyncScalarResult as AsyncScalarResult
|
||||
from .scoping import async_scoped_session as async_scoped_session
|
||||
from .session import (
|
||||
AsyncSession as AsyncSession,
|
||||
AsyncSessionTransaction as AsyncSessionTransaction,
|
||||
async_object_session as async_object_session,
|
||||
async_session as async_session,
|
||||
)
|
||||
16
stubs/SQLAlchemy/sqlalchemy/ext/asyncio/base.pyi
Normal file
16
stubs/SQLAlchemy/sqlalchemy/ext/asyncio/base.pyi
Normal file
@@ -0,0 +1,16 @@
|
||||
import abc
|
||||
|
||||
class ReversibleProxy: ...
|
||||
|
||||
class StartableContext(abc.ABC, metaclass=abc.ABCMeta):
|
||||
@abc.abstractmethod
|
||||
async def start(self, is_ctxmanager: bool = ...): ...
|
||||
def __await__(self): ...
|
||||
async def __aenter__(self): ...
|
||||
@abc.abstractmethod
|
||||
async def __aexit__(self, type_, value, traceback): ...
|
||||
|
||||
class ProxyComparable(ReversibleProxy):
|
||||
def __hash__(self): ...
|
||||
def __eq__(self, other): ...
|
||||
def __ne__(self, other): ...
|
||||
93
stubs/SQLAlchemy/sqlalchemy/ext/asyncio/engine.pyi
Normal file
93
stubs/SQLAlchemy/sqlalchemy/ext/asyncio/engine.pyi
Normal file
@@ -0,0 +1,93 @@
|
||||
from typing import Any
|
||||
|
||||
from .base import ProxyComparable, StartableContext
|
||||
|
||||
def create_async_engine(*arg, **kw): ...
|
||||
|
||||
class AsyncConnectable: ...
|
||||
|
||||
class AsyncConnection(ProxyComparable, StartableContext, AsyncConnectable):
|
||||
engine: Any
|
||||
sync_engine: Any
|
||||
sync_connection: Any
|
||||
def __init__(self, async_engine, sync_connection: Any | None = ...) -> None: ...
|
||||
async def start(self, is_ctxmanager: bool = ...): ...
|
||||
@property
|
||||
def connection(self) -> None: ...
|
||||
async def get_raw_connection(self): ...
|
||||
@property
|
||||
def info(self): ...
|
||||
def begin(self): ...
|
||||
def begin_nested(self): ...
|
||||
async def invalidate(self, exception: Any | None = ...): ...
|
||||
async def get_isolation_level(self): ...
|
||||
async def set_isolation_level(self): ...
|
||||
def in_transaction(self): ...
|
||||
def in_nested_transaction(self): ...
|
||||
def get_transaction(self): ...
|
||||
def get_nested_transaction(self): ...
|
||||
async def execution_options(self, **opt): ...
|
||||
async def commit(self) -> None: ...
|
||||
async def rollback(self) -> None: ...
|
||||
async def close(self) -> None: ...
|
||||
async def exec_driver_sql(self, statement, parameters: Any | None = ..., execution_options=...): ...
|
||||
async def stream(self, statement, parameters: Any | None = ..., execution_options=...): ...
|
||||
async def execute(self, statement, parameters: Any | None = ..., execution_options=...): ...
|
||||
async def scalar(self, statement, parameters: Any | None = ..., execution_options=...): ...
|
||||
async def scalars(self, statement, parameters: Any | None = ..., execution_options=...): ...
|
||||
async def stream_scalars(self, statement, parameters: Any | None = ..., execution_options=...): ...
|
||||
async def run_sync(self, fn, *arg, **kw): ...
|
||||
def __await__(self): ...
|
||||
async def __aexit__(self, type_, value, traceback) -> None: ...
|
||||
# proxied from Connection
|
||||
dialect: Any
|
||||
@property
|
||||
def closed(self): ...
|
||||
@property
|
||||
def invalidated(self): ...
|
||||
@property
|
||||
def default_isolation_level(self): ...
|
||||
|
||||
class AsyncEngine(ProxyComparable, AsyncConnectable):
|
||||
class _trans_ctx(StartableContext):
|
||||
conn: Any
|
||||
def __init__(self, conn) -> None: ...
|
||||
transaction: Any
|
||||
async def start(self, is_ctxmanager: bool = ...): ...
|
||||
async def __aexit__(self, type_, value, traceback) -> None: ...
|
||||
sync_engine: Any
|
||||
def __init__(self, sync_engine) -> None: ...
|
||||
def begin(self): ...
|
||||
def connect(self): ...
|
||||
async def raw_connection(self): ...
|
||||
def execution_options(self, **opt): ...
|
||||
async def dispose(self): ...
|
||||
# proxied from Engine
|
||||
url: Any
|
||||
pool: Any
|
||||
dialect: Any
|
||||
echo: Any
|
||||
@property
|
||||
def engine(self): ...
|
||||
@property
|
||||
def name(self): ...
|
||||
@property
|
||||
def driver(self): ...
|
||||
def clear_compiled_cache(self) -> None: ...
|
||||
def update_execution_options(self, **opt) -> None: ...
|
||||
def get_execution_options(self): ...
|
||||
|
||||
class AsyncTransaction(ProxyComparable, StartableContext):
|
||||
connection: Any
|
||||
sync_transaction: Any
|
||||
nested: Any
|
||||
def __init__(self, connection, nested: bool = ...) -> None: ...
|
||||
@property
|
||||
def is_valid(self): ...
|
||||
@property
|
||||
def is_active(self): ...
|
||||
async def close(self) -> None: ...
|
||||
async def rollback(self) -> None: ...
|
||||
async def commit(self) -> None: ...
|
||||
async def start(self, is_ctxmanager: bool = ...): ...
|
||||
async def __aexit__(self, type_, value, traceback) -> None: ...
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user