g3LUdZddlmZddlZddlmZddlmZddlmZddlmZddlmZdd lm Z dd lm Z dd lm Z dd lm Z dd lm Z ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#ddlm$Z$ddlm%Z%dd lm&Z&dd!lm'Z'd"d#lm(Z)d"d$lm*Z*d"dlmZd"d%l+m,Z,d"d&l+m-Z-d"d'l+m.Z.d"d(l+m/Z/d"d)l+m0Z0d"d*l+m1Z1d"d+l2m3Z3d"d,l4m5Z5d"d-l4m6Z6d"d.l4m7Z7d/Z8d0e9d1<d2Z:d3e9d4<ed5d67Z;ejxrTdd8lm=Z=dd9lm>Z>dd:l?m@Z@dd;l?mAZAddlmDZDdd?lmEZEdd@lFmGZGddAlmHZHd"dBlImJZJd"dClImKZKd"dDlLmMZMd"dElLmNZNee6dFdGfZOe6dHZPeeQefZReeQefZSe eOdIfZTGdJdKe0jeZVGdLdMeVZWGdNdOeVZXGdPdQe-je0je1jZ\GdRdSe\Z]GdTdUe\Z^GdVdWe\Z_ dndXZ` dodYZadpdZZbebdqd[Zcebd\d]drd^Zdebdqd_Zeebdsd`Zfebdda dtdbZgebdsdcZhebdda dtddZiebdsdeZjebdqdfZkebdsdgZlebd\d] dudhZmebdvdiZnebdwdjZoeb dxdkZpeb dydlZqdmZry)zz ) annotationsN)Any)Callable)cast)Dict)Iterable)Optional)overload)Sequence)Tuple)Type)TypeVar)Union)util)insp_is_aliased_class)insp_is_attribute)insp_is_mapper)insp_is_mapper_property)QueryableAttribute)InspectionAttr) LoaderOption)_DEFAULT_TOKEN) _StrPathToken)_WILDCARD_TOKEN)AbstractEntityRegistry)path_is_property) PathRegistry) TokenRegistry)_orm_full_deannotate) AliasedInsp)excinspect)and_) cache_key) coercions)roles) traversals)visitors) _generative)Final)Literal)Self relationshipzFinal[Literal['relationship']]_RELATIONSHIP_TOKENcolumnzFinal[Literal['column']] _COLUMN_TOKEN_FNzCallable[..., Any])bound) _EntityType)_InternalEntityType) _MapperEntity)ORMCompileState) QueryContext) _StrategyKey)MapperProperty) ORMOption)Mapper)_PathRepresentation)_ColumnExpressionArgument)_FromClauseArgument)_CacheKeyTraversalType)CacheKey*zQueryableAttribute[Any])r0r2.c`eZdZUdZdZded< d% d&dZddd'd Z d( d)d Zd*d Z d( d+d Z d*d Z d( d+dZ d*dZ d,d-dZd*dZd,d.dZd/dZd0dZ d1dZd2dZed3dZed4dZ d5dZe d6 d7dZe d8 d9dZe d( d:dZe d;dZd d?d Z d@d!ZdAd"Z dBd#Z!e" d, dCd$Z#y)D _AbstractLoad)propagate_to_loadersTboolrGNFcr|Ot|ts%tjtj |}nat jdd|}nGt|ddr8t|tsJt|j}|J|j}nd}|j|ddi|d|i|rd nd }|S) aIndicate that the given attribute should be eagerly loaded from columns stated manually in the query. This function is part of the :class:`_orm.Load` interface and supports both method-chained and standalone operation. The option is used in conjunction with an explicit join that loads the desired rows, i.e.:: sess.query(Order).join(Order.user).options(contains_eager(Order.user)) The above query would join from the ``Order`` entity to its related ``User`` entity, and the returned ``Order`` objects would have the ``Order.user`` attribute pre-populated. It may also be used for customizing the entries in an eagerly loaded collection; queries will normally want to use the :ref:`orm_queryguide_populate_existing` execution option assuming the primary collection of parent objects may already have been loaded:: sess.query(User).join(User.addresses).filter( Address.email_address.like("%@aol.com") ).options(contains_eager(User.addresses)).populate_existing() See the section :ref:`contains_eager` for complete usage details. .. seealso:: :ref:`loading_toplevel` :ref:`contains_eager` NzPassing a string name for the 'alias' argument to 'contains_eager()` is deprecated, and will not work in a future release. Please use a sqlalchemy.alias() or sqlalchemy.orm.aliased() construct.1.4version_of_typelazyjoinedeager_from_aliasT)rGopts_reconcile_to_other) isinstancestrr(expectr)FromClauseRolerwarn_deprecatedgetattrrr%rM selectable_set_relationship_strategy)selfattralias _is_chain_propagate_to_loaders coerced_aliasotcloneds P/opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/orm/strategy_options.pycontains_eagerz_AbstractLoad.contains_eager`sP  eS) ) 0 01E1Eu M $$:" !& T:t ,d$67 775 !>MMM M00  X !6$m4(1t 1   raiseloadcl|j|ddd}ddd}|rd|d<|jd|}|S)aIndicate that for a particular entity, only the given list of column-based attribute names should be loaded; all others will be deferred. This function is part of the :class:`_orm.Load` interface and supports both method-chained and standalone operation. Example - given a class ``User``, load only the ``name`` and ``fullname`` attributes:: session.query(User).options(load_only(User.name, User.fullname)) Example - given a relationship ``User.addresses -> Address``, specify subquery loading for the ``User.addresses`` collection, but on each ``Address`` object load only the ``email_address`` attribute:: session.query(User).options( subqueryload(User.addresses).load_only(Address.email_address) ) For a statement that has multiple entities, the lead entity can be specifically referred to using the :class:`_orm.Load` constructor:: stmt = ( select(User, Address) .join(User.addresses) .options( Load(User).load_only(User.name, User.fullname), Load(Address).load_only(Address.email_address), ) ) When used together with the :ref:`populate_existing ` execution option only the attributes listed will be refreshed. :param \*attrs: Attributes to be loaded, all others will be deferred. :param raiseload: raise :class:`.InvalidRequestError` rather than lazy loading a value when a deferred attribute is accessed. Used to prevent unwanted SQL from being emitted. .. versionadded:: 2.0 .. seealso:: :ref:`orm_queryguide_column_deferral` - in the :ref:`queryguide_toplevel` :param \*attrs: Attributes to be loaded, all others will be deferred. :param raiseload: raise :class:`.InvalidRequestError` rather than lazy loading a value when a deferred attribute is accessed. Used to prevent unwanted SQL from being emitted. .. versionadded:: 2.0 FTdeferred instrumentrg)rD_set_column_strategy)r[rgattrsrbwildcard_strategys rc load_onlyz_AbstractLoad.load_onlysXx** d 3  *.TB -1 k *,,    recZ|j|ddi|d|intj}|S)a Indicate that the given attribute should be loaded using joined eager loading. This function is part of the :class:`_orm.Load` interface and supports both method-chained and standalone operation. examples:: # joined-load the "orders" collection on "User" select(User).options(joinedload(User.orders)) # joined-load Order.items and then Item.keywords select(Order).options(joinedload(Order.items).joinedload(Item.keywords)) # lazily load Order.items, but when Items are loaded, # joined-load the keywords collection select(Order).options(lazyload(Order.items).joinedload(Item.keywords)) :param innerjoin: if ``True``, indicates that the joined eager load should use an inner join instead of the default of left outer join:: select(Order).options(joinedload(Order.user, innerjoin=True)) In order to chain multiple eager joins together where some may be OUTER and others INNER, right-nested joins are used to link them:: select(A).options( joinedload(A.bs, innerjoin=False).joinedload(B.cs, innerjoin=True) ) The above query, linking A.bs via "outer" join and B.cs via "inner" join would render the joins as "a LEFT OUTER JOIN (b JOIN c)". When using older versions of SQLite (< 3.7.16), this form of JOIN is translated to use full subqueries as this syntax is otherwise not directly supported. The ``innerjoin`` flag can also be stated with the term ``"unnested"``. This indicates that an INNER JOIN should be used, *unless* the join is linked to a LEFT OUTER JOIN to the left, in which case it will render as LEFT OUTER JOIN. For example, supposing ``A.bs`` is an outerjoin:: select(A).options(joinedload(A.bs).joinedload(B.cs, innerjoin="unnested")) The above join will render as "a LEFT OUTER JOIN b LEFT OUTER JOIN c", rather than as "a LEFT OUTER JOIN (b JOIN c)". .. note:: The "unnested" flag does **not** affect the JOIN rendered from a many-to-many association table, e.g. a table configured as :paramref:`_orm.relationship.secondary`, to the target table; for correctness of results, these joins are always INNER and are therefore right-nested if linked to an OUTER join. .. note:: The joins produced by :func:`_orm.joinedload` are **anonymously aliased**. The criteria by which the join proceeds cannot be modified, nor can the ORM-enabled :class:`_sql.Select` or legacy :class:`_query.Query` refer to these joins in any way, including ordering. See :ref:`zen_of_eager_loading` for further detail. To produce a specific SQL JOIN which is explicitly available, use :meth:`_sql.Select.join` and :meth:`_query.Query.join`. To combine explicit JOINs with eager loading of collections, use :func:`_orm.contains_eager`; see :ref:`contains_eager`. .. seealso:: :ref:`loading_toplevel` :ref:`joined_eager_loading` rNrO innerjoinrQ)rZr EMPTY_DICT)r[r\rrloaders rc joinedloadz_AbstractLoad.joinedloadsE\00  X (i(__ 1  rec*|j|ddiS)a`Indicate that the given attribute should be loaded using subquery eager loading. This function is part of the :class:`_orm.Load` interface and supports both method-chained and standalone operation. examples:: # subquery-load the "orders" collection on "User" select(User).options(subqueryload(User.orders)) # subquery-load Order.items and then Item.keywords select(Order).options( subqueryload(Order.items).subqueryload(Item.keywords) ) # lazily load Order.items, but when Items are loaded, # subquery-load the keywords collection select(Order).options(lazyload(Order.items).subqueryload(Item.keywords)) .. seealso:: :ref:`loading_toplevel` :ref:`subquery_eager_loading` rNsubqueryrZr[r\s rc subqueryloadz_AbstractLoad.subqueryloadJs8..tfj5IJJrec2|j|ddid|iS)aIndicate that the given attribute should be loaded using SELECT IN eager loading. This function is part of the :class:`_orm.Load` interface and supports both method-chained and standalone operation. examples:: # selectin-load the "orders" collection on "User" select(User).options(selectinload(User.orders)) # selectin-load Order.items and then Item.keywords select(Order).options( selectinload(Order.items).selectinload(Item.keywords) ) # lazily load Order.items, but when Items are loaded, # selectin-load the keywords collection select(Order).options(lazyload(Order.items).selectinload(Item.keywords)) :param recursion_depth: optional int; when set to a positive integer in conjunction with a self-referential relationship, indicates "selectin" loading will continue that many levels deep automatically until no items are found. .. note:: The :paramref:`_orm.selectinload.recursion_depth` option currently supports only self-referential relationships. There is not yet an option to automatically traverse recursive structures with more than one relationship involved. Additionally, the :paramref:`_orm.selectinload.recursion_depth` parameter is new and experimental and should be treated as "alpha" status for the 2.0 series. .. versionadded:: 2.0 added :paramref:`_orm.selectinload.recursion_depth` .. seealso:: :ref:`loading_toplevel` :ref:`selectin_eager_loading` rNselectinrecursion_depthrsry)r[r\r~s rc selectinloadz_AbstractLoad.selectinloadhs0d..  Z #_5/  rec*|j|ddiS)a<Indicate that the given attribute should be loaded using "lazy" loading. This function is part of the :class:`_orm.Load` interface and supports both method-chained and standalone operation. .. seealso:: :ref:`loading_toplevel` :ref:`lazy_loading` rNselectryrzs rclazyloadz_AbstractLoad.lazyloads..tfh5GHHrec6|j|ddid|i}|S)aIndicate that the given attribute should be loaded using an immediate load with a per-attribute SELECT statement. The load is achieved using the "lazyloader" strategy and does not fire off any additional eager loaders. The :func:`.immediateload` option is superseded in general by the :func:`.selectinload` option, which performs the same task more efficiently by emitting a SELECT for all loaded objects. This function is part of the :class:`_orm.Load` interface and supports both method-chained and standalone operation. :param recursion_depth: optional int; when set to a positive integer in conjunction with a self-referential relationship, indicates "selectin" loading will continue that many levels deep automatically until no items are found. .. note:: The :paramref:`_orm.immediateload.recursion_depth` option currently supports only self-referential relationships. There is not yet an option to automatically traverse recursive structures with more than one relationship involved. .. warning:: This parameter is new and experimental and should be treated as "alpha" status .. versionadded:: 2.0 added :paramref:`_orm.immediateload.recursion_depth` .. seealso:: :ref:`loading_toplevel` :ref:`selectin_eager_loading` rN immediater~rsry)r[r\r~rus rc immediateloadz_AbstractLoad.immediateloads4T00  [ !#_51   rec*|j|ddiS)aIndicate that the given relationship attribute should remain unloaded. The relationship attribute will return ``None`` when accessed without producing any loading effect. This function is part of the :class:`_orm.Load` interface and supports both method-chained and standalone operation. :func:`_orm.noload` applies to :func:`_orm.relationship` attributes only. .. legacy:: The :func:`_orm.noload` option is **legacy**. As it forces collections to be empty, which invariably leads to non-intuitive and difficult to predict results. There are no legitimate uses for this option in modern SQLAlchemy. .. seealso:: :ref:`loading_toplevel` rNnoloadryrzs rcrz_AbstractLoad.noloads0..tfh5GHHrec<|j|d|rdiSdiS)aIndicate that the given attribute should raise an error if accessed. A relationship attribute configured with :func:`_orm.raiseload` will raise an :exc:`~sqlalchemy.exc.InvalidRequestError` upon access. The typical way this is useful is when an application is attempting to ensure that all relationship attributes that are accessed in a particular context would have been already loaded via eager loading. Instead of having to read through SQL logs to ensure lazy loads aren't occurring, this strategy will cause them to raise immediately. :func:`_orm.raiseload` applies to :func:`_orm.relationship` attributes only. In order to apply raise-on-SQL behavior to a column-based attribute, use the :paramref:`.orm.defer.raiseload` parameter on the :func:`.defer` loader option. :param sql_only: if True, raise only if the lazy load would emit SQL, but not if it is only checking the identity map, or determining that the related value should just be None due to missing keys. When False, the strategy will raise for all varieties of relationship loading. This function is part of the :class:`_orm.Load` interface and supports both method-chained and standalone operation. .. seealso:: :ref:`loading_toplevel` :ref:`prevent_lazy_with_raiseload` :ref:`orm_queryguide_deferred_raiseload` rN raise_on_sqlraisery)r[r\sql_onlys rcrgz_AbstractLoad.raiseloads4D.. 6X>C  ;BC  rec&|j|dS)aIndicate an attribute should load using its predefined loader style. The behavior of this loading option is to not change the current loading style of the attribute, meaning that the previously configured one is used or, if no previous style was selected, the default loading will be used. This method is used to link to other loader options further into a chain of attributes without altering the loader style of the links along the chain. For example, to set joined eager loading for an element of an element:: session.query(MyClass).options( defaultload(MyClass.someattribute).joinedload( MyOtherClass.someotherattribute ) ) :func:`.defaultload` is also useful for setting column-level options on a related class, namely that of :func:`.defer` and :func:`.undefer`:: session.scalars( select(MyClass).options( defaultload(MyClass.someattribute) .defer("some_column") .undefer("some_other_column") ) ) .. seealso:: :ref:`orm_queryguide_relationship_sub_options` :meth:`_orm.Load.options` Nryrzs rc defaultloadz_AbstractLoad.defaultload!sJ..tT::rec@ddd}|rd|d<|j|f|S)aIndicate that the given column-oriented attribute should be deferred, e.g. not loaded until accessed. This function is part of the :class:`_orm.Load` interface and supports both method-chained and standalone operation. e.g.:: from sqlalchemy.orm import defer session.query(MyClass).options( defer(MyClass.attribute_one), defer(MyClass.attribute_two) ) To specify a deferred load of an attribute on a related class, the path can be specified one token at a time, specifying the loading style for each link along the chain. To leave the loading style for a link unchanged, use :func:`_orm.defaultload`:: session.query(MyClass).options( defaultload(MyClass.someattr).defer(RelatedClass.some_column) ) Multiple deferral options related to a relationship can be bundled at once using :meth:`_orm.Load.options`:: select(MyClass).options( defaultload(MyClass.someattr).options( defer(RelatedClass.some_column), defer(RelatedClass.some_other_column), defer(RelatedClass.another_column), ) ) :param key: Attribute to be deferred. :param raiseload: raise :class:`.InvalidRequestError` rather than lazy loading a value when the deferred attribute is accessed. Used to prevent unwanted SQL from being emitted. .. versionadded:: 1.4 .. seealso:: :ref:`orm_queryguide_column_deferral` - in the :ref:`queryguide_toplevel` :func:`_orm.load_only` :func:`_orm.undefer` Trirgrl)r[keyrgstrategys rcdeferz_AbstractLoad.deferHs1l!%D9 $(H[ !((#::rec.|j|fdddS)ajIndicate that the given column-oriented attribute should be undeferred, e.g. specified within the SELECT statement of the entity as a whole. The column being undeferred is typically set up on the mapping as a :func:`.deferred` attribute. This function is part of the :class:`_orm.Load` interface and supports both method-chained and standalone operation. Examples:: # undefer two columns session.query(MyClass).options( undefer(MyClass.col1), undefer(MyClass.col2) ) # undefer all columns specific to a single class using Load + * session.query(MyClass, MyOtherClass).options(Load(MyClass).undefer("*")) # undefer a column on a related object select(MyClass).options(defaultload(MyClass.items).undefer(MyClass.text)) :param key: Attribute to be undeferred. .. seealso:: :ref:`orm_queryguide_column_deferral` - in the :ref:`queryguide_toplevel` :func:`_orm.defer` :func:`_orm.undefer_group` FTrirl)r[rs rcundeferz_AbstractLoad.undefers$H(( Fd;  rec<|jtfdd|diS)a$Indicate that columns within the given deferred group name should be undeferred. The columns being undeferred are set up on the mapping as :func:`.deferred` attributes and include a "group" name. E.g:: session.query(MyClass).options(undefer_group("large_attrs")) To undefer a group of attributes on a related entity, the path can be spelled out using relationship loader options, such as :func:`_orm.defaultload`:: select(MyClass).options( defaultload("someattr").undefer_group("large_attrs") ) .. seealso:: :ref:`orm_queryguide_column_deferral` - in the :ref:`queryguide_toplevel` :func:`_orm.defer` :func:`_orm.undefer` Nundefer_group_T)rmr)r[names rc undefer_groupz_AbstractLoad.undefer_groups-:((  v'>&E  recttjtj|}|j |fddi|fS)aApply an ad-hoc SQL expression to a "deferred expression" attribute. This option is used in conjunction with the :func:`_orm.query_expression` mapper-level construct that indicates an attribute which should be the target of an ad-hoc SQL expression. E.g.:: stmt = select(SomeClass).options( with_expression(SomeClass.x_y_expr, SomeClass.x + SomeClass.y) ) .. versionadded:: 1.2 :param key: Attribute to be populated :param expr: SQL expression to be applied to the attribute. .. seealso:: :ref:`orm_queryguide_with_expression` - background and usage examples query_expressionT)extra_criteria)r r(rUr)LabeledColumnExprRolerm)r[r expressions rcwith_expressionz_AbstractLoad.with_expressionsO>*   U88* E (( F'. })  rec r|jddidttd|Dti}|S)aIndicate an eager load should take place for all attributes specific to a subclass. This uses an additional SELECT with IN against all matched primary key values, and is the per-query analogue to the ``"selectin"`` setting on the :paramref:`.mapper.polymorphic_load` parameter. .. versionadded:: 1.2 .. seealso:: :ref:`polymorphic_selectin` selectinload_polymorphicTentitiesc32K|]}t|ywNr$).0clss rc z5_AbstractLoad.selectin_polymorphic..sArecV|$tt|j}|Sd}|Sr)rritems)r[r strategy_keys rcrz_AbstractLoad._coerce_strats5   (8!9:L Lrec`|j|}|j|f|t||||S)N)rQrGreconcile_to_other)r_clone_for_bind_strategyr1)r[r\rrGrQrRrs rcrZz(_AbstractLoad._set_relationship_strategysB))(3  %% G  !52 &  rec^|j|}|j||t||||S)N)rQ attr_groupr)rrr3)r[rnrrQrrs rcrmz"_AbstractLoad._set_column_strategy0s@))(3  %%   ) &  recT|j|}|j||dd||S)NT)rGrrr)r[rnrrRrs rc_set_generic_strategyz#_AbstractLoad._set_generic_strategyDs=))(3  %%   !%2 &  recR|j|}|jd|d||S)Nrsr)r[rrQrs rcrz!_AbstractLoad._set_class_strategyUs0))(3  %%dL$T%J rect)zapply this :class:`_orm._AbstractLoad` object as a sub-option o a :class:`_orm.Load` object. Implementation is provided by subclasses. NotImplementedErrorr[parents rc_apply_to_parentz_AbstractLoad._apply_to_parent^ "##rect)zApply a series of options as sub-options to this :class:`_orm._AbstractLoad` object. Implementation is provided by subclasses. rr[rQs rcoptionsz_AbstractLoad.optionsgrrec trr) r[rnr wildcard_keyrQrrGrrs rcrz&_AbstractLoad._clone_for_bind_strategyps "##rec|jjsy|j||t|j yr)compile_options_enable_eagerloads_processrH current_path)r[ compile_statemapper_entitiess rc'process_compile_state_replaced_entitiesz5_AbstractLoad.process_compile_state_replaced_entities}s; ,,??   ]//0 0 rec|jjsy|j||jt |j  xr|jj yr)rrr_lead_mapper_entitiesrHr_for_refresh_state)r[rs rcprocess_compile_statez#_AbstractLoad.process_compile_statesU,,??    / /]//0 0 E!11DDD  rect)zimplemented by subclassesr)r[rrraiseerrs rcrz_AbstractLoad._processrrecd}tt||jD]\}\}}t|tr\|dk(r4|j dt s|j dtr|cS|tdtk7r||jk7ry||urzt|tr(t|rt|r|j|ry||dzdS)Nr:r) enumeratezip natural_pathrSrTendswithrrr1rrrisa)rto_choppathdebugic_tokenp_tokens rc _chop_pathz_AbstractLoad._chop_paths %. ** +& !A!'3'6$$q(8%9:''!O+<(=>"N"5!6a7HII7;;.'!7N3"7+"7+KK(5& 6q1uwre)NFF) r\ _AttrTyper]zOptional[_FromClauseArgument]r^rHr_rHreturnr/)rnrrgrHrr/r)r\rrrOptional[bool]rr/)r\rrr/)r\rr~ Optional[int]rr/)F)r\rrrHrr/)rrrgrHrr/)rrrr/)rrTrr/)rrr_ColumnExpressionArgument[Any]rr/)rIterable[Type[Any]]rr/)r _StrategySpecrr;)rz Literal[None]rNone)rOptional[_StrategySpec]rOptional[_StrategyKey])TNN) r\rrrrGrHrQOptional[_OptsType]rRrrr/)NN) rnTuple[_AttrType, ...]rrrQrrOptional[Tuple[Any, ...]]rr/)rnrrrrRrrr/)rrrQ _OptsTyperr/rLoadrrrQrFrr/NNTNNrnzOptional[Tuple[_AttrType, ...]]rrrOptional[_WildcardKeyType]rQrrOptional[_AttrGroupType]rGrHrrrrrr/)rr9rSequence[_MapperEntity]rr)rr9rrrr9rrrrHrr)rr?rrrrHrzOptional[_PathRepresentation])$__name__ __module__ __qualname__ __slots___is_strategy_option__annotations__rdrprvr{rrrrrgrrrrrrr rr,rZrmrrrrrrrr classmethodrrrercrFrFZs)I 04&+ DD-D D $ D  DL>CI\%)WW"W  WrKB*.6 6 '6   6 pI&*.//'/  /bI4$ L%;N9;v& P B% % 3%   % N2II AA/  &*$(.2 *#  "  ,  ( %)48 $*"  2   & /3 $ ,    %-6 $$%)/3%)-148 $. $) $1 $ " $ - $# $+ $2 $  $ & 1    "  $&$1$ $  $  # $# #  # ' # # rerFceZdZUdZdZdej jfdejjfdejjfdejjfgZ dZ de d<d e d<d e d<dd Zdd Ze dd Z ddZddZddZdZ ddZddZed dZ d! d"dZdZdZy)#raRepresents loader options which modify the state of a ORM-enabled :class:`_sql.Select` or a legacy :class:`_query.Query` in order to affect how various mapped attributes are loaded. The :class:`_orm.Load` object is in most cases used implicitly behind the scenes when one makes use of a query option like :func:`_orm.joinedload`, :func:`_orm.defer`, or similar. It typically is not instantiated directly except for in some very specific cases. .. seealso:: :ref:`orm_queryguide_relationship_per_entity_wildcard` - illustrates an example where direct use of :class:`_orm.Load` may be useful )rcontextadditional_source_entitiesrrrGrNrzTuple[_LoadElement, ...]z$Tuple[_InternalEntityType[Any], ...]ctdt|}|j|j|_d|_d|_d|_y)Nz$Union[Mapper[Any], AliasedInsp[Any]]rF)rr% _post_inspect_path_registryrrrGr)r[entityinsps rc__init__z Load.__init__s@:GFOL ''  $)!*,'rec(d|jddS)NLoad(r))rr[s rc__str__z Load.__str__styy|nA&&rec`|j|}||_d|_d|_d|_|S)NrF)__new__rrrGr)rrloads rc_construct_for_existing_pathz!Load._construct_for_existing_paths5{{3  $)!*,' rec0||ur|S|j|Sr)_adjust_for_extra_criteria)r[r uncached_opts rc'_adapt_cached_option_to_uncached_optionz,Load._adapt_cached_option_to_uncached_option s" 4 K..w77recn|j}tfd|jD|_|S)Nc3@K|]}|jywr) _prepend_path)relementrs rcrz%Load._prepend_path..s  7CGG ! !$ '|)_clonerrr[rrbs ` rcrzLoad._prepend_paths2 7;||   rec`|jD]}|jsn|S|jj|S|jj }|jJ dd|j }tfd|jD|_|S)zApply the current bound parameters in a QueryContext to all occurrences "extra_criteria" stored within this ``Load`` object, returning a new instance of this ``Load`` object. cr|j}tfd|jD|_|S)Nc3BK|]}j|ywr)_apply_params_to_element)rcritorig_cache_keyreplacement_cache_keys rcrzCLoad._adjust_for_extra_criteria..process..7s-/7D&>>"D7s)r r_extra_criteria)optr(r' cloned_opts `` rcprocessz0Load._adjust_for_extra_criteria..process0s: J)./'66 /*J & rec3NK|]}|jr |n|ywr)r))rvaluer'r,r(s rcrz2Load._adjust_for_extra_criteria..As: &((4nE&s"%)r* _LoadElementr(rCr'rCrr/)rr)user_passed_query_generate_cache_keyrselect_statementr r)r[rr. orig_queryrbr'r,r(s @@@rcrzLoad._adjust_for_extra_criterias\\E$$"K ' 9 9 M M O (K**;; #779)))  #+ %         rec |j}d}|D]8}|j}|stj|t d|ds6|cSy)zocalled at process time to allow adjustment of the root entity inside of _LoadElement objects. Nz_InternalEntityType[Any]r)r entity_zeroorm_util_entity_corresponds_tor)r[rrrezeroents rc!_reconcile_query_entities_with_usz&Load._reconcile_query_entities_with_usKsU yy"COOE88/a9   #rec|j||}t|jj}|jD]&}|r |j s|j |||||(yr)r:rHr _current_pathrrGr)r[rrrreconciled_lead_entityhas_current_pathrus rcrz Load._process_sn "&!G!G X"   = = K KLllF (C(C  ( (&  #rec|jj|jk(sJtfdjj dfj zDslt jdkDrjd}jd}njd}jd}tj||tjjddjddz_|jr#tfd|jD_ jr?xjjz c_ xj j z c_yy)zapply this :class:`_orm.Load` object as a sub-option of another :class:`_orm.Load` object. This method is used by the :meth:`_orm.Load.options` method. c3|K|]3}tj|jjd5ywrNr6$_entity_corresponds_to_use_path_implr odd_element)relemrbs rcrz(Load._apply_to_parent..s< 0  9 9fkk--a0 09<rrrNc3@K|]}|jywr)_prepend_path_from)rr.rs rcrz(Load._apply_to_parent..s #>JU((0lr) _generaterGanyrrDrlen_raise_for_does_not_linkrcoercerr)r[rattrname parent_entityrbs ` @rcrzLoad._apply_to_parentsA!**d.G.GGGG  0046//0   6;;!#!;;q> & A !;;q> & A $V[[(M J"))&++a*;fkk!n*LM <<"#>Bll#FN >> NNfnn ,N  - -11  - rec|D]} |j||S#t$r0}t|tst j d|d|d}~wwxYw)aApply a series of options as sub-options to this :class:`_orm.Load` object. E.g.:: query = session.query(Author) query = query.options( joinedload(Author.book).options( load_only(Book.summary, Book.excerpt), joinedload(Book.citations).options(joinedload(Citation.author)), ) ) :param \*opts: A series of loader option objects (ultimately :class:`_orm.Load` objects) which should be applied to the path specified by this :class:`_orm.Load` object. .. versionadded:: 1.3.6 .. seealso:: :func:`.defaultload` :ref:`orm_queryguide_relationship_sub_options` zLoader option z2 is not compatible with the Load.options() method.N)rAttributeErrorrSrFsa_exc ArgumentError)r[rQr*aes rcrz Load.optionssr:C $$T* " !#}5 ..(.11  s A+AAc |rd|_|jjrtjdt |jrm|r>|jj j|jj |dn-tjd|jj d|htj|jd||||||| } | r<|xj| fz c_ |J|xjtd|dz c_ |S|D]} t| tr)tj|j| ||||||| } n(t j|j| ||||||| } | sg|t"ur| j|_|xj| fz c_ | j$j'd d s| j)} |xj| fz c_ |S) NT3Wildcard token cannot be followed by another entityrzMapped attribute 'z#' does not refer to a mapped entity)rrrzTuple[_InternalEntityType[Any]]rr~F)rGris_tokenrRrSrprop_strategy_lookup_ClassStrategyLoadcreaterrrrSrT_TokenStrategyLoad_AttributeStrategyLoadr1 local_optsget_recurse) r[rnrrrQrrGrr load_elementr\r1s rcrzLoad._clone_for_bind_strategys  (,D % 99  &&E dii ( //  L**((89// =-44 $%#5-5 L / '''//45tJ7G4/\ SdC(#5#<#<  $,#-+='5$= $L$:#@#@  $,#-+='5$A $L $'::$0$5$5 LL\O3L $..223DeL)224 - OR rec`|j}|jj|d<|SNr_shallow_to_dictr serializer[ds rc __getstate__zLoad.__getstate__0+  ! ! #II'')& rec\tj|d|d<|j|yrdr deserialize_shallow_from_dictr[states rc __setstate__zLoad.__setstate__5($00v?f  &re)r _EntityType[Any])rrT)rrrr)rr:rr=rr=)rrrr)rr:rrrrrrr)rrr__doc__rr+ExtendedInternalTraversaldp_has_cache_keyInternalTraversaldp_has_cache_key_list dp_boolean_traverse_internals_cache_key_traversalrr rrrrrrr:rrr,rrrjrrrrercrrs I 33DDE   & & < <  !;!;!F!FG (  & & < <     %% DD-') 8#83<8 82h(&1   @%N''\%)/3%)-148^.^)^1 ^ " ^ - ^#^+^2^ ^@ 'rerc,eZdZUdZdZdej jfdej jfdej jfgZ dZ de d<d e d<d e d<d e d<d Z dd Z ddZddZddZdZ ddZddZddZy) _WildcardLoadz)represent a standalone '*' load operation)rrr^rrr^NrBcache_key_traversalrrzUnion[Tuple[()], Tuple[str]]FcJd|_d|_tj|_y)Nr)rrrrtr^rs rcr z_WildcardLoad.__init__Ns  //rec |J|d} |rt| tr| ttfvsJ|d| } ||_| f|_|rt j||_|Jy)Nrr) rSrTrrrrr immutabledictr^) r[rnrrrQrrGrrr\s rcrz&_WildcardLoad._clone_for_bind_strategySs   Qx 4%.99  : q'  G "006DO%%%rectd)Nz(Star option does not support sub-optionsrrs rcrz_WildcardLoad.optionsos!"LMMrec|jsJ|jd}|jtr|jdddt}t t |jj|}|jsJtj|d|jd|j|j}|xj|fz c_y)aPapply this :class:`_orm._WildcardLoad` object as a sub-option of a :class:`_orm.Load` object. This method is used by the :meth:`_orm.Load.options` method. Note that :class:`_orm.WildcardLoad` itself can't have sub-options, but it may be used as the sub-option of a :class:`_orm.Load` object. rrN)rrrsplitrrrtokenrWr\r[rr^rGr)r[rr\effective_pathrus rcrz_WildcardLoad._apply_to_parentrsyyyyy| == (jjoa()?*;?COO?$11 *.)) z<@Hz) ))c*o2221 %%%%--hxH  %%%%#**  ' '  MM  OO  % %+  {{#### $$ -$  k@sD>c n|jdtratt|dk7ra|r_t j ddj d|Dddj d|Dd|jtrd }|D]}|cS|rt j d |d y) NrrzMCan't apply wildcard ('*') or load_only() loader option to multiple entities , c32K|]}t|ywr)rTrr9s rcrz8_WildcardLoad._find_entity_basestring..s$B#SXrz?. Specify loader options for each entity individually, such as c3(K|] }d|d yw)rz).some_option('*')Nrrs rcrz8_WildcardLoad._find_entity_basestring..s"&+3C#(u,> ?+3s.FzFQuery has only expression-based entities - can't find property named "".)rrrKlistrRrSjoinr)r[rrrr9s rcrz%_WildcardLoad._find_entity_basestrings >>Ao./ 04>"a' ..>99$B$BBCDP!II&+3&    ^^N +HCJ  **338'= rec&|j}|Sr)rfrhs rcrjz_WildcardLoad.__getstate__s  ! ! #rec&|j|yr)rorps rcrrz_WildcardLoad.__setstate__s &rerrrrr)rz"Iterable[_InternalEntityType[Any]]rrTrrHrz"Optional[_InternalEntityType[Any]]rDict[str, Any]rqrrr)rrrrurr+rv dp_plain_objdp_string_multi_dictr{rrrGr rrrrrrjrrrrercr~r~:s32I X77DDE 33@@A   . . C C 37/6'' && *!&8N$:;z$4$$ $ , $L'rer~cveZdZUdZdZdZdejjfdejjfdejjfdejjfdejjfd ejjfgZ d Zd ed<d ed <d ed<ded<ded<ded<ded<ded<d%dZdZed&dZd'dZd'dZd(dZd)dZdZ d*dZdZdZdZe d+ d,dZd-d Zd.d!Z d/d"Z!d0d#Z"e# d1d$Z$y )2r/aArepresents strategy information to select for a LoaderStrategy and pass options to it. :class:`._LoadElement` objects provide the inner datastructure stored by a :class:`_orm.Load` object and are also the object passed to methods like :meth:`.LoaderStrategy.setup_query`. .. versionadded:: 2.0 )rrrGr^r)rRrarrr^r)rGrRNzTuple[Any, ...]rrrrHzutil.immutabledict[str, Any]is_token_strategyis_class_strategyct|Sr)rrs rc__hash__z_LoadElement.__hash__+s $xrec.tj||Sr)r*compare)r[others rc__eq__z_LoadElement.__eq__.s!!$..recLt|jxr|jduSr)rHr^rrs rc is_opts_onlyz_LoadElement.is_opts_only1sDOO= (=>>rec b|j}|j|}|j||Sr) __class__r_shallow_copy_to)r[kwrss rcr z_LoadElement._clone5s,nn KK  a rec f|j}|jj||_|Sr)r r^union)r[rnews rc _update_optsz_LoadElement._update_opts<s(kkm--b1 rec`|j}|jj|d<|Srdrerhs rcrjz_LoadElement.__getstate__Arkrec\tj|d|d<|j|yrdrmrps rcrrz_LoadElement.__setstate__Frsrec |j}d}|D]}|j}|sd}n|stjd|ddtjd|dddj d |Dd ) NFTzGQuery has only expression-based entities; attribute loader options for rz can't be applied here.z Mapped class z@ does not apply to any of the root entities in this query, e.g. rc3^K|]%}|jrt|j'ywr)r5rT)rxs rcrz3_LoadElement._raise_for_no_match.._s'!0AAMMAMM*!0s+-zV. Please specify the full path from one of the root entities to the target attribute. )rr5rRrSr)r[ parent_loaderrrfound_entitiesr9r8s rc_raise_for_no_matchz _LoadElement._raise_for_no_matchJs!!"COOE!% # &&004Qy9##  &&Qy)5II!0   rectj|j|}|syt|t|z }|j|}t j |f|ddz}|S)a4receives the 'current_path' entry from an :class:`.ORMCompileState` instance, which is set during lazy loads and secondary loader strategy loads, and adjusts the given path to be relative to the current_path. E.g. given a loader path and current path: .. sourcecode:: text lp: User -> orders -> Order -> items -> Item -> keywords -> Keyword cp: User -> orders -> Order -> items The adjusted path would be: .. sourcecode:: text Item -> keywords -> Keyword Nr)rrrrKrrrM)r[rrchopped_start_pathtokens_removed_from_start_pathloader_lead_path_elements rc'_adjust_effective_path_for_current_pathz4_LoadElement._adjust_effective_path_for_current_pathhs~0"__  ' ' "),^).s= 0  9 9 %%a( 0rFrz Attribute "rz" does not link from element "r)rJrrDrrRrSrrs` rcrHz_LoadElement._prepend_path_froms  0046//0   &&diil^,!!'R 15  !!&++..rec"|j}|j|jk(sJ|j|jk(sJ|j|jk(sJt j |dd|j ddz|_|S)Nrr)r rr^rrrMrr!s rcrz_LoadElement._prepend_paths$--///  DOO333''4+A+AAAA"))$q*v{{1~*EF  rec|jr|S|jdur|S|jr|S|jdur|S||ur|S|j|jk(r|j|jk(r|S|jr[|j }|jj |j|_|xj |j z c_|S|jr[|j }|jj |j|_|xj |j z c_|S|jjr|Stjd|jd)adefine behavior for when two Load objects are to be put into the context.attributes under the same key. :param replacement: ``_LoadElement`` that seeks to replace the existing one :param existing: ``_LoadElement`` that is already present. FzLoader strategies for z conflict) rRrr^rr rr)rrWrRInvalidRequestError) replacementexistings rcrz_LoadElement._reconcilesn"  * *O  , , 5   ) )   ) )U 2O { "    !5!5 5##{'='==   % %(H"*"5"5";";&&#H   $ $ (C(C C $O  " "%,,.K%0%;%;%A%A##&K "  ' '8+C+C C '     & & (($[%5%5$6i @  re)rint)rrH)rrrr/rr)rrrrrOptional[PathRegistry])TNNN)rrr\z%Union[_AttrType, _StrPathToken, None]rrrrr^rrGrHrrHrrrrrrrr/r)rr/)rrrr/)rrrr/)rr/rr/rr/)%rrrrur__visit_name__r+rvrwrrrxdp_clauseelement_listr{r|rrrpropertyrr rrjrrrrrrrrr[r r`rHr staticmethodrrrercr/r/s I$N 33DDE X77DDE   . . C C  H66LLM !;!;!H!HI  : : G GH  $$''$$ ,,/??  '<(*(:F( (T $ $56/3-148))4)) ) 1 ) ( )#))-)+)2) ))V$ /2 6 !6 -96 6 6 rer/ceZdZUdZdZdZejdejjfdejjfgzZde d<de d<dZ dZd Zd Zd Zd Zfd ZfdZxZS)r]zLoader strategies against specific relationship or column paths. e.g.:: joinedload(User.addresses) defer(Order.name) selectinload(User.orders).lazyload(Order.items) )rM_path_with_polymorphic_pathattribute_strategy_load_elementrMrz*Union[Mapper[Any], AliasedInsp[Any], None]rFc|Jd|_d|_t|\}}} |jr!|} || }|jr |j }|S|j sJtj|d|jsB|r?|r||durtjdt|t||jny|r|jrJ||_n|j|_t|ddr;|j} t!| } | |_|j | |_|| | }n|| }|jr |j }|S)NrrzCan't apply wildcard ('*') or load_only() loader option to multiple entities in the same option. Use separate options per entity.rM)rMr_parse_attr_argument is_property has_entity entity_path is_attributer6rCrrRrSrLrTr)rXr%) r[rr\rrrrr _rXacext_infos rcrz!_AttributeStrategyLoad._init_pathtsa +/(,T2 a    D:D''K"" 5<< Hdkk $jm"; ..H -T3t9dkkJ ++ ++#1D #'#7#7D 4T *Br{H$DM/3/?/?/ED ,:h'D:D ??##D rec|jsJd|jj}|j}|j }|j }|j |t |jS)aApply the current bound parameters in a QueryContext to the immediate "extra_criteria" stored with this Load object. Load objects are typically pulled from the cached version of the statement from a QueryContext. The statement currently being executed will have new values (and keys) for bound parameters in the extra criteria which need to be applied by loader strategies when they handle this criteria for a result set. z8this should only be called if _extra_criteria is present)r)rr2queryr1r%r&)r[rr3 current_queryk1k2s rc_generate_extra_criteriaz/_AttributeStrategyLoad._generate_extra_criteriasw   F E F **;;   + + -  . . 0**2tT5I5I/JKKrec|jsJ|j}|sJ|jsKttj j |jj|jfdd}|j}|r|j||}|y|}d|jf}||vr||}|}|j|} | ||<y|||<y)NT)aliased_use_mapper_pathpath_with_polymorphic) rrMis_aliased_classr%r6r!_with_polymorphic_factorymapper base_mapperrr _merge_with) r[rrpwpirrrexisting_aliased_inspthis_aliased_inspnew_aliased_insps rc_set_of_type_infoz(_AttributeStrategyLoad._set_of_type_infos////}} t$$$$>>KK++[[N %) ?D55 CCLH!J& (?(?@ '>$+CL ! $ 4@@!  ,GCLGCLrec*|j}|jj}|jjrJ|r|j sgS|j r|j|j||js|jsgS|r|s|j|||jjr|jj}n |j}|r|J|j||}|gSdtt |j"fgSNru)rrrrrWrGrMrrrr^rrrrrrr) r[rrrr=rrrrs rcrz1_AttributeStrategyLoad._prepare_for_compile_states%11 "22EE 99%%%% d77I ==  " "=#;#;\ J}}T__I 2  $ $]O D 99  !YY--N!YYN !- --!II N% 4 n=JJKLLrecBt|}d|d<|jr|jj|d<|jrU|jj rd|d<|S|jj r|jj|d<|SJd|S)Nrr)rrMzunexpected object for _of_type)superrjrrgrMr is_mapperclass_)r[rirs rcrjz#_AttributeStrategyLoad.__getstate__.s G " "   + +00::< + , ==}}-- $*  (( $ 4 4* ?>>urect|||jddrtj|d|_nd|_|jddrt |d|_yd|_y)NrrM)rrrr_rrnrr%rM)r[rqrs rcrrz#_AttributeStrategyLoad.__setstate__Fsk U# 992D 9/;/G/G340D ,04D , 99Z &#E*$56DM DMre)rrrrurrr/r{r+rvdp_multirwrrrrrrrrjrr __classcell__)rs@rcr]r]Ws98!77EN#LJ  D*MX0 ! !rer]c,eZdZdZdZdZdZdZdZdZ y)r\aLoader strategies against wildcard attributes e.g.:: raiseload("*") Load(User).lazyload("*") defer("*") load_only(User.name, User.email) # will create a defer('*') joinedload(User.addresses).raiseload("*") token_strategy_load_elementTFc|]|jt}|jts|r|r|d|}|j|}|St j d|S)NrkStrings are not accepted for attribute names in loader options; please use class-bound attributes directly.)rrrrrRrS)r[rr\rrrr default_tokens rcrz_TokenStrategyLoad._init_pathisl   MM.9M}}_-*^1TF3Dzz$' **K rec|j}|jj}|jjsJ|r|j sgS|j s|jsgS|j}|r&tj|f|jddz}|r|j||} | gS| }tt|jD cgc]} d| fc} Scc} w)Nrru)rrrrrWrGrr^rrMrrr"_generate_natural_for_superclasses) r[rrrr=rrrrnew_effective_pathrs rcrz-_TokenStrategyLoad._prepare_for_compile_state|s%11 "22EE yy!!!! d77I}}T__I !)00')N,?,?,CCN !%!M!M " ") /N!>4467 7| $7   s C!N) rrrrur inherit_cacherrrrrrercr\r\Vs) 3NM&0 rer\c,eZdZdZdZdZdZdZdZdZ y)rZzLoader strategies that deals with a class as a target, not an attribute path e.g.:: q = s.query(Person).options( selectin_polymorphic(Person, [Engineer, Manager]) ) TFclass_strategy_load_elementc|Srrrs rcrz_ClassStrategyLoad._init_paths  rec|j}|jj}|r|jsgS|js|j sgS|j }|r|j||} | gS| }d|jfgSr) rrrrGrr^rrr) r[rrrr=rrrrr s rcrz-_ClassStrategyLoad._prepare_for_compile_states%11 "22EE d77I}}T__I !%!M!M " ") /N>66788reN) rrrrur rrrrrrrercrZrZs) M2N 9rerZcd}d|ddfd|ddffD]\}}|D]}t|tr|jdtzrt j dd|d d}|tk(r2|rt jd | t}||tfi|}t jd |t|\}} }t| }|r!|s|j|}|||fd di|}|||fi|}|sJ|S) NTrrFrzThe undocumented `.{WILDCARD}` format is deprecated and will be removed in a future version as it is believed to be unused. If you have been using this functionality, please comment on Issue #4390 on the SQLAlchemy project tracker.rJrKrrVrr^) rSrT startswithrrrWrRrSr~rrrr) methrchainedr lead_element is_default_keysr\r lead_entitys rc_generate_from_keysrsZ -1L#D2J/%bc1CC ED$$??3#89((#!&  8D?*!$22- $+'4 #' n#K#KL!../  '((BD( $( d#Ab#ALaDf < rec, t|}t |r|j }|}n9t |r|j }|j}ntjd|||fS#tj$r}tjd|d}~wwxYw)aparse an attribute or wildcard argument to produce an :class:`._AbstractLoad` instance. This is used by the standalone loader strategy functions like ``joinedload()``, ``defer()``, etc. to produce :class:`_orm.Load` or :class:`._WildcardLoad` objects. z:expected ORM mapped attribute for loader strategy argumentN)r%rRNoInspectionAvailablerSrrrrX)r\r errrrXs rcrr' s 't}t$kk  4 kk yy"" H   d ""%  ' '"" H  s A%%B8BBctt|j}|j}d|jd|jd|_||_|S)zdecorator that applies docstrings between standalone loader functions and the loader methods on :class:`._AbstractLoad`. z=Produce a new :class:`_orm.Load` object with the :func:`_orm.z#` option applied. See :func:`_orm.z` for usage examples. )rXrFrru)fnbound_fnfn_docs rcloader_unbound_fnr L sX }bkk2H   F [[M HBJ Irec:ttj|d|S)NT)rrrdrrs rcrdrdb s t22D$ CCreFrfc\t|d\}}}t|j|d|iS)Nrrg)rrrp)rgrnrrs rcrprpg s6.eAh7A|Q '4  ' ' D) DDrec:ttj|d|SNF)rrrvr"s rcrvrvo s teR @@rec:ttj|diSr%)rrr{rs rcr{r{t s t00$r BBre)r~c>ttj|dd|iSNFr~)rrrr~rs rcrry s&  4):O(L rec:ttj|diSr%)rrrr's rcrr s t}}dE2 >>rec>ttj|dd|iSr))rrrr*s rcrr s&  D%*;_)M rec:ttj|diSr%)rrrr's rcrr s t{{D% <r JJrect|rtjddttj|f|zdiS)NzThe *addl_attrs on orm.undefer is deprecated. Please use method chaining in conjunction with defaultload() to indicate a path.r1rKF)rrWrrr)rr2s rcrr s;    t||cVj-@% LLrec8t}|j|Sr)r~r)rrs rcrr soG   &&rec@ttj|fdd|iS)NFr)rrr)rrs rcrr s'  sfelJ-G rec:t|}|j|Sr)rr)base_clsruls rcrr s hB " "7 ++rec bt|dkDr|dj|djju}t |r t |}n|jj }tjd|d|dd|r d|ddnd |s||djsmtj|jt|jr:d |dd|d |djjj d |d fzd fztjd|d|dd)Nrrrz ORM mapped entity or attribute "z#" does not link from relationship "z%s".%sz .of_type(rz Did you mean to use "z,)" or "loadopt.options(selectin_polymorphic(z, [z ]), ...)" ?zORM mapped attribute "z" does not link mapped class "") rKr rrrrTrrRrSrr6r7r%)rrNrOpath_is_of_typeparent_entity_strs rcrLrL sh 4y1}r(//b1G1GG  / #M 2  - 4 4 = = "".xj9''+Bxj 8,;)DH:Q'+ H55 77 W]%;%B%BRz 123,,0HOO,B,B,K,K+LM)*+ 7      *""$XJ/""&r(1 .  re) rzCallable[..., _AbstractLoad]rrrrHrrrrF)r\rrzDTuple[InspectionAttr, _InternalEntityType[Any], MapperProperty[Any]])rr4rr4)rrrrrrF)rnrrgrHrrF)rrrrF)rrr~rrrF)rrr2rrgrHrrF)rrr2rrrF)rrTrrF)rrrrrrF)r7rtrrrrF)sru __future__rtypingrrrrrr r r r r rrr:rr6_typingrrrrrrbaser interfacesr path_registryrrrrrrrr r!r#rRr%sqlr&r'r(r)r*r+sql.baser, util.typingr-r.r/r1rr3r4 TYPE_CHECKINGr6r7rr8r9r:r;r<r=rr>r? sql._typingr@rA sql.cache_keyrBrCr_WildcardKeyTyperTrr_AttrGroupTypeGenerativeOnTraversalrFrr~ HasCacheKeyHasShallowCopy Traversibler/r]r\rZrrr rdrprvr{rrrrrgrrrrrrrLrrercrPs# *&#,* $)(*1+'(&"!6D3D*2 '2 e/0 $,&(%(*%2716( '#, 99 : 34S#X cN y#~&l  J44ll  ^n'=n'b }'M}'@Z  :44h6J6JZ z |!\|!~V V r5959p= &= == =  =@"# "#I"#J,DD38EEAACC7; '4??7; '4==@@BB>CK K!*K7;KKK&MM''   >,,)<,,,  re