diff options
Diffstat (limited to 'lib/sqlalchemy')
| -rw-r--r-- | lib/sqlalchemy/engine/reflection.py | 4 | ||||
| -rw-r--r-- | lib/sqlalchemy/inspection.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py index 142637693..c5d66081a 100644 --- a/lib/sqlalchemy/engine/reflection.py +++ b/lib/sqlalchemy/engine/reflection.py @@ -712,12 +712,12 @@ class Inspector(object): table reflection. Direct usage is like:: from sqlalchemy import create_engine, MetaData, Table - from sqlalchemy.engine.reflection import Inspector + from sqlalchemy import inspect engine = create_engine('...') meta = MetaData() user_table = Table('user', meta) - insp = Inspector.from_engine(engine) + insp = inspect(engine) insp.reflect_table(user_table, None) .. versionchanged:: 1.4 Renamed from ``reflecttable`` to diff --git a/lib/sqlalchemy/inspection.py b/lib/sqlalchemy/inspection.py index 4d9ee30c4..69b160ce7 100644 --- a/lib/sqlalchemy/inspection.py +++ b/lib/sqlalchemy/inspection.py @@ -20,7 +20,7 @@ cases it will return the object itself. The rationale for :func:`_sa.inspect` is twofold. One is that it replaces the need to be aware of a large variety of "information getting" functions in SQLAlchemy, such as -:meth:`_reflection.Inspector.from_engine`, +:meth:`_reflection.Inspector.from_engine` (deprecated in 1.4), :func:`.orm.attributes.instance_state`, :func:`_orm.class_mapper`, and others. The other is that the return value of :func:`_sa.inspect` is guaranteed to obey a documented API, thus allowing third party |
