Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/sqlalchemy/ext/declarative/__init__.py: 88%
24 statements
« prev ^ index » next coverage.py v7.0.1, created at 2022-12-25 06:11 +0000
« prev ^ index » next coverage.py v7.0.1, created at 2022-12-25 06:11 +0000
1# ext/declarative/__init__.py
2# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors
3# <see AUTHORS file>
4#
5# This module is part of SQLAlchemy and is released under
6# the MIT License: https://www.opensource.org/licenses/mit-license.php
8from .extensions import AbstractConcreteBase
9from .extensions import ConcreteBase
10from .extensions import DeferredReflection
11from .extensions import instrument_declarative
12from ... import util
13from ...orm.decl_api import as_declarative as _as_declarative
14from ...orm.decl_api import declarative_base as _declarative_base
15from ...orm.decl_api import DeclarativeMeta
16from ...orm.decl_api import declared_attr
17from ...orm.decl_api import has_inherited_table as _has_inherited_table
18from ...orm.decl_api import synonym_for as _synonym_for
21@util.moved_20(
22 "The ``declarative_base()`` function is now available as "
23 ":func:`sqlalchemy.orm.declarative_base`."
24)
25def declarative_base(*arg, **kw):
26 return _declarative_base(*arg, **kw)
29@util.moved_20(
30 "The ``as_declarative()`` function is now available as "
31 ":func:`sqlalchemy.orm.as_declarative`"
32)
33def as_declarative(*arg, **kw):
34 return _as_declarative(*arg, **kw)
37@util.moved_20(
38 "The ``has_inherited_table()`` function is now available as "
39 ":func:`sqlalchemy.orm.has_inherited_table`."
40)
41def has_inherited_table(*arg, **kw):
42 return _has_inherited_table(*arg, **kw)
45@util.moved_20(
46 "The ``synonym_for()`` function is now available as "
47 ":func:`sqlalchemy.orm.synonym_for`"
48)
49def synonym_for(*arg, **kw):
50 return _synonym_for(*arg, **kw)
53__all__ = [
54 "declarative_base",
55 "synonym_for",
56 "has_inherited_table",
57 "instrument_declarative",
58 "declared_attr",
59 "as_declarative",
60 "ConcreteBase",
61 "AbstractConcreteBase",
62 "DeclarativeMeta",
63 "DeferredReflection",
64]