|
| 1 | +from typing import Any |
| 2 | + |
| 3 | +from . import utils as utils |
| 4 | +from .model import DefaultMeta as DefaultMeta, Model as Model |
| 5 | + |
| 6 | +# SQLAlchemy is not part of typeshed |
| 7 | +_Query = Any |
| 8 | +_SessionBase = Any |
| 9 | + |
| 10 | +models_committed: Any |
| 11 | +before_models_committed: Any |
| 12 | + |
| 13 | +class SignallingSession(_SessionBase): |
| 14 | + app: Any |
| 15 | + def __init__(self, db, autocommit: bool = ..., autoflush: bool = ..., **options) -> None: ... |
| 16 | + def get_bind(self, mapper: Any | None = ..., clause: Any | None = ...): ... |
| 17 | + |
| 18 | +def get_debug_queries(): ... |
| 19 | + |
| 20 | +class Pagination: |
| 21 | + query: Any |
| 22 | + page: Any |
| 23 | + per_page: Any |
| 24 | + total: Any |
| 25 | + items: Any |
| 26 | + def __init__(self, query, page, per_page, total, items) -> None: ... |
| 27 | + @property |
| 28 | + def pages(self): ... |
| 29 | + def prev(self, error_out: bool = ...): ... |
| 30 | + @property |
| 31 | + def prev_num(self): ... |
| 32 | + @property |
| 33 | + def has_prev(self): ... |
| 34 | + def next(self, error_out: bool = ...): ... |
| 35 | + @property |
| 36 | + def has_next(self): ... |
| 37 | + @property |
| 38 | + def next_num(self): ... |
| 39 | + def iter_pages( |
| 40 | + self, left_edge: int = ..., left_current: int = ..., right_current: int = ..., right_edge: int = ... |
| 41 | + ) -> None: ... |
| 42 | + |
| 43 | +class BaseQuery(_Query): |
| 44 | + def get_or_404(self, ident, description: Any | None = ...): ... |
| 45 | + def first_or_404(self, description: Any | None = ...): ... |
| 46 | + def paginate( |
| 47 | + self, page: Any | None = ..., per_page: Any | None = ..., error_out: bool = ..., max_per_page: Any | None = ... |
| 48 | + ): ... |
| 49 | + |
| 50 | +def get_state(app): ... |
| 51 | + |
| 52 | +class SQLAlchemy: |
| 53 | + Query: Any |
| 54 | + use_native_unicode: Any |
| 55 | + session: Any |
| 56 | + Model: Any |
| 57 | + app: Any |
| 58 | + def __init__( |
| 59 | + self, |
| 60 | + app: Any | None = ..., |
| 61 | + use_native_unicode: bool = ..., |
| 62 | + session_options: Any | None = ..., |
| 63 | + metadata: Any | None = ..., |
| 64 | + query_class=..., |
| 65 | + model_class=..., |
| 66 | + engine_options: Any | None = ..., |
| 67 | + ) -> None: ... |
| 68 | + @property |
| 69 | + def metadata(self): ... |
| 70 | + def create_scoped_session(self, options: Any | None = ...): ... |
| 71 | + def create_session(self, options): ... |
| 72 | + def make_declarative_base(self, model, metadata: Any | None = ...): ... |
| 73 | + def init_app(self, app): ... |
| 74 | + def apply_pool_defaults(self, app, options): ... |
| 75 | + def apply_driver_hacks(self, app, sa_url, options): ... |
| 76 | + @property |
| 77 | + def engine(self): ... |
| 78 | + def make_connector(self, app: Any | None = ..., bind: Any | None = ...): ... |
| 79 | + def get_engine(self, app: Any | None = ..., bind: Any | None = ...): ... |
| 80 | + def create_engine(self, sa_url, engine_opts): ... |
| 81 | + def get_app(self, reference_app: Any | None = ...): ... |
| 82 | + def get_tables_for_bind(self, bind: Any | None = ...): ... |
| 83 | + def get_binds(self, app: Any | None = ...): ... |
| 84 | + def create_all(self, bind: str = ..., app: Any | None = ...) -> None: ... |
| 85 | + def drop_all(self, bind: str = ..., app: Any | None = ...) -> None: ... |
| 86 | + def reflect(self, bind: str = ..., app: Any | None = ...) -> None: ... |
| 87 | + |
| 88 | +class FSADeprecationWarning(DeprecationWarning): ... |
0 commit comments