Files
order/.venv/Lib/site-packages/sqlalchemy/__pycache__/inspection.cpython-312.pyc

44 lines
3.2 KiB
Plaintext
Raw Normal View History

2025-08-27 21:11:48 +08:00
<EFBFBD>
#{<7B>g<EFBFBD> <00><00>X<00>dZddlmZddlmZeje<05>Zdd<04>Zd<05>Zd<06>Z y) a The inspection module provides the :func:`.inspect` function,
which delivers runtime information about a wide variety
of SQLAlchemy objects, both within the Core as well as the
ORM.
The :func:`.inspect` function is the entry point to SQLAlchemy's
public API for viewing the configuration and construction
of in-memory objects. Depending on the type of object
passed to :func:`.inspect`, the return value will either be
a related object which provides a known interface, or in many
cases it will return the object itself.
The rationale for :func:`.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:`.Inspector.from_engine`,
:func:`.orm.attributes.instance_state`, :func:`.orm.class_mapper`,
and others. The other is that the return value of :func:`.inspect`
is guaranteed to obey a documented API, thus allowing third party
tools which build on top of SQLAlchemy configurations to be constructed
in a forwards-compatible way.
<EFBFBD>)<01>exc)<01>utilc<00><><00>t|<00>}|jD](}|tvs<01> t|}|dur|cS||<00>}|<05><01>(ndx}}|r|<04>|<05>tjd|z<00><00>|S)a<>Produce an inspection object for the given target.
The returned value in some cases may be the
same object as the one given, such as if a
:class:`.Mapper` object is passed. In other
cases, it will be an instance of the registered
inspection type for the given object, such as
if an :class:`.engine.Engine` is passed, an
:class:`.Inspector` object is returned.
:param subject: the subject to be inspected.
:param raiseerr: When ``True``, if the given subject
does not
correspond to a known SQLAlchemy inspected type,
:class:`sqlalchemy.exc.NoInspectionAvailable`
is raised. If ``False``, ``None`` is returned.
TNz7No inspection system is available for object of type %s)<05>type<70>__mro__<5F> _registrarsr<00>NoInspectionAvailable)<06>subject<63>raiseerr<72>type_<65>cls<6C>reg<65>rets <20>>D:\mooc\order\.venv\Lib\site-packages\sqlalchemy/inspection.py<70>inspectr&s<><00><00>& <11><17>M<EFBFBD>E<EFBFBD><14>}<7D>}<7D><03> <0E>+<2B> <1D><1D>c<EFBFBD>"<22>C<EFBFBD><12>d<EFBFBD>{<7B><1E><0E><15>g<EFBFBD>,<2C>C<EFBFBD><12><EFBFBD><15><1D><19><18><03>c<EFBFBD><0F>S<EFBFBD>[<5B>C<EFBFBD>K<EFBFBD><11>'<27>'<27> .<2E>05<30> 6<>
<EFBFBD>
<EFBFBD> <0F>J<EFBFBD>c<00><00><00><00>fd<01>}|S)Nc<00>T<00><01><00>D]!}|tvrtd|z<00><00>|t|<<00>#|S)NzType %s is already registered)r<00>AssertionError)<03> fn_or_clsr <00>typess <20>r<00>decoratez_inspects.<locals>.decorateNs><00><><00><1A>E<EFBFBD><14> <0B>#<23>$<24>6<><15>><3E><12><12>"+<2B>K<EFBFBD><05> <1E> <1B> <19>r<00>)rrs` r<00> _inspectsrMs<00><><00><19> <14>Orc<00>(<00>t|<00>d<01>|S)NT)r)r s r<00>_self_inspectsrZs<00><00><12>I<EFBFBD>c<EFBFBD>N<EFBFBD>4<EFBFBD><18> <0E>JrN)T)
<EFBFBD>__doc__<5F>rr<00> defaultdict<63>listrrrrrrr<00><module>r!s6<00><01><04>.<12><12><1F>d<EFBFBD><1E><1E>t<EFBFBD>$<24> <0B>$<0F>N
<14>r