L i  dZddlmZddlZddlmZddlZddlZddlZddl Z ddl Z ddl m Z ddl m Z ddl m Z ddl mZdd l mZdd l mZdd l mZdd l mZdd l mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddl mZddlZddlm Z ddlm!Z!ddl"m#Z#ddl"m$Z$ddl%m&Z&ddl%m'Z'ddl%m(Z(dd l%m)Z)dd!l%m*Z*dd"l%m+Z+dd#l%m,Z,dd$l%m-Z-dd%l.m/Z/dd&l.m0Z0dd'l.m1Z1dd(l.m2Z2dd)l.m3Z3dd*l.m4Z4dd+l.m5Z5dd,l.m6Z6dd-l7m8Z8dd.l7m9Z9dd/l7m:Z:d0d1lm;Z<d0d2lm=Z=d0d3lm>Z>d0d4lm?Z?d0d5lm@Z@d0d6lm7Z7d0d7lAmZd0d8l@mBZBd0d9l@mCZCd0d:l@mDZDd0d;l@mEZEd0dlGmIZId0d?lJmKZKd0d@lLmMZMd0dAlLmNZNd0dBlOmPZPd0dClOmQZQd0dDlOmRZRd0dElOmSZSd0dFlOmTZTd0dGlOmUZUd0dHlOmVZVd0dIlOmWZWd0dJlXmYZYd0dKlXmZZZd0dLlXm[Z[e jrddMl"m]Z]ddNl"m^Z^ddOl"m_Z_ddPl"m`Z`ddQl"maZaddRl"mbZbddSl"mcZcddTl%mdZdddUlemfZfddVlemgZgddWlhmiZiddXljmkZkddYllmmZmddZlnmoZodd[lpmqZqdd\lrmsZsdd]ltmuZudd^l7mvZvdd_l7mwZwd0d`lGmxZxd0dalGmyZyd0dblGmzZzd0dclJm{Z{d0ddlJm|Z|d0delLm}Z}d0dflLm~Z~d0dglLmZd0dhlmZd0dilmZd0djlXmZd0dklXmZedle mZedne mZedoe mZedpe mZedqe mZeeeee geefdrdse gdrfe gdsffZeZdtZeeeHefZeduee gduffZeeZdveeHe e geHe fe geeHe feeeeHe ffZeeeeeee fffZeeMe eIe eEj&dwfZeeeee geefe gefefZedxeHe mZedydzmZeeeNe eNe fZeeeNe eNe fZeeeNe eNe fZdd{Zdd|Zej:Gd}d~eeefZeeZdveeNe dffZGddeZe>jBGdde0e6ee>jDZddZGddZGddZeddZeddZGddeee&eZGddeee-ee)eZy)a Heuristics related to join conditions as used in :func:`_orm.relationship`. Provides the :class:`.JoinCondition` object, which encapsulates SQL annotation and aliasing behavior focused on the `primaryjoin` and `secondaryjoin` aspects of :func:`_orm.relationship`. ) annotationsN)abc)Any)Callable)cast) Collection)Dict) FrozenSet)Generic)Iterable)Iterator)List) NamedTuple)NoReturn)Optional)Sequence)Set)Tuple)Type)TypeVar)Union) attributes)strategy_options)insp_is_aliased_class)is_has_collection_adapter)_DeclarativeMapped)_is_mapped_class) class_mapper) DynamicMapped)LoaderCallableStatus) PassiveFlag) state_str)WriteOnlyMapped)_AttributeOptions)_IntrospectsAnnotations) MANYTOMANY) MANYTOONE) ONETOMANY)PropComparator)RelationshipDirection)StrategizedProperty) _orm_annotate)_orm_deannotate)CascadeOptions)exc)Exists)log)schema)sql)util)inspect) coercions) expression) operators)roles)visitors)_ColumnExpressionArgument)_HasClauseElement)_safe_annotate) ColumnClause) ColumnElement_deep_annotate)_deep_deannotate)_shallow_annotate)adapt_criterion_to_null) ClauseAdapter)join_condition)selectables_overlapvisit_binary_product)de_optionalize_union_types)Literal)resolve_name_to_real_class_name) _EntityType)_ExternalEntityType)_IdentityKeyType) _InstanceDict)_InternalEntityType)_O) _RegistryType)Mapped)_class_resolver)_ModNS)_ClassScanMapperConfig)DependencyProcessor)Mapper)Query)Session) InstanceState) LazyLoader) AliasedClass) AliasedInsp)_CoreAdapterProto)_EquivalentColumnMap) _InfoType)_AnnotationDict)SupportsAnnotations)BinaryExpression) BindParameter) ClauseElement)Table) FromClause)_AnnotationScanType)RODescriptorReference_T)bound_T1_T2_PT_PT2 Mapper[_T]zAliasedClass[_T]) selectjoinedselectinsubqueryraise raise_on_sqlnoload immediate write_onlydynamicTFNrkFz Mapped[Any]_CEA_CEColumnElement[Any]cbttjtj|ddiS)aAnnotate a portion of a primaryjoin expression with a 'remote' annotation. See the section :ref:`relationship_custom_foreign` for a description of use. .. seealso:: :ref:`relationship_custom_foreign` :func:`.foreign` remoteT_annotate_columnsr8expectr;ColumnArgumentRoleexprs b/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sqlalchemy/orm/relationships.pyrrs. 11488T:J cbttjtj|ddiS)aAnnotate a portion of a primaryjoin expression with a 'foreign' annotation. See the section :ref:`relationship_custom_foreign` for a description of use. .. seealso:: :ref:`relationship_custom_foreign` :func:`.remote` foreignTrrs rrrs. 11489d:K rcLeZdZUdZdZded<ded<ded<d d Z d d Zy )_RelationshipArgztstores a user-defined parameter value that must be resolved and parsed later at mapper configuration time. )nameargumentresolvedstrrrprz Optional[_T2]rc|jduSN)rselfs r _is_populatedz_RelationshipArg._is_populateds}}D((rc|j}t|tr!|||jdk(|_yt |rt |s ||_y||_y)N secondary)r isinstancerrrcallabler)rclsregistry_resolver attr_values r_resolve_against_registryz*_RelationshipArg._resolve_against_registrys]]] j# &0DII4DMj !*::*F&LDM&DMrNreturnbool)r&Callable[[str, bool], _class_resolver]rNone)__name__ __module__ __qualname____doc__ __slots____annotations__rrrrrrs8 /I IM) '$J '  'rr.cNeZdZUdZded<ded<ded<ded<d ed <d ed <y ) _RelationshipArgszWstores user-passed parameters that are resolved at mapper configuration time. zP_RelationshipArg[Optional[_RelationshipSecondaryArgument], Optional[FromClause]]rz\_RelationshipArg[Optional[_RelationshipJoinConditionArgument], Optional[ColumnElement[Any]]] primaryjoin secondaryjoinz>_RelationshipArg[_ORMOrderByArgument, _RelationshipOrderByArg]order_byzN_RelationshipArg[Optional[_ORMColCollectionArgument], Set[ColumnElement[Any]]] foreign_keys remote_sideN)rrrrrrrrrrsB MLrrc$eZdZUdZej ZdZ dZdZ de d<de d<e dddddZ d Z d e d <d e d <de d<de d<de d<de d<de d<de d<de d<de d<de d<de d<de d<d e d!<d"e d#< dQd d d d d dd d dd$dd d%ddddd d d d ddd dd d d d d ddd dd&" dRfd'ZdSd(ZdTd)ZGd*d+ej$eeZ dU dVd,Z dW dXd-Z dYd.Z dZ d[d/Zd\d0Z d]d1Zej:f d^d2Z d_ d`d3Ze dad4Z!e" dbd5Z#dcd6Z$ejJddd7Z&ejJded8Z'dffd9 Z(dfd:Z)dfd;Z* dgd<Z+ejXd=d_dhd>Z-dfd?Z.e did@Z/e djdAZ0ejJejXdB dkdCZ1dfdDZ2e dldEZ3e3jhdmdFZ3dndGZ5dodHZ6dpdIZ7dqdJZ8dfdKZ9ejXdLdfdMZ:ejJdadNZ;ejJdadOZ< dr dsdPZ=xZ>S)tRelationshipPropertyzDescribes an object property that holds a single item or list of items that correspond to a related database table. Public constructor is the :func:`_orm.relationship` function. .. seealso:: :ref:`relationship_config_toplevel` Tz Sequence[str] _overlapsr__lazy_strategyFpassive_deletespassive_updatesenable_typechecksactive_historycascade_backrefsNzOptional[DependencyProcessor]_dependency_processorColumnElement[bool]rOptional[ColumnElement[bool]]rOptional[FromClause]r JoinCondition_join_condition_RelationshipOrderByArgrSet[ColumnElement[Any]]_user_defined_foreign_keys_calculated_foreign_keysr local_columns _ColumnPairssynchronize_pairsOptional[_ColumnPairs]secondary_synchronize_pairslocal_remote_pairsr+ directionr _init_argszsave-update, mergeru)"uselistcollection_classrrback_populatesrbackrefoverlaps post_updatecascadeviewonlyattribute_optionslazyrrrrrr join_depthcomparator_factory single_parent innerjoindistinct_target_keyload_on_pending query_classinfo omit_join sync_backrefdoc bake_queriesr_local_remote_pairs_legacy_inactive_history_stylec" pt%||||_||_t t d|dt d|dt d|dt d|dt d|dt d|d|_| |_| |_| r|j|||||"| r|rtjd ||_ ||_ ||_||_||_|"rtjd ||_||_||_||_||_| |_||_|$|_||_|rt5j6d ||_|#|_||_|xst>j@|_!t5jD|||jFjI|d |jff|_%tM|_'| r%tMtQjRd | |_*nd|_*| |_+||_,|jXr| rtjdd|_-y| |_-y)N)rrrrrrrrz-sync_backref and viewonly cannot both be TruezSThe 'cascade_backrefs' parameter passed to relationship() may only be set to False.zsetting omit_join to True is not supported; selectin loading of this relationship may not work correctly if this flag is set explicitly. omit_join optimization is automatically detected for conditions under which it is supported.rz\s*,\s*rzCbackref and back_populates keyword arguments are mutually exclusive).super__init__rrrrrrr _warn_for_persistence_only_flagssa_exc ArgumentErrorrrrrrrrrrrrrrrr6warnrrrr Comparatorrset_creation_orderrupdate strategy_keyset_reverse_propertyresplitrrrr)&rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr __class__s& rrzRelationshipProperty.__init__nsEX +<=   + [)T : ]K > _mT B Z4 8 ^\4 @ ]K >  '    1 1 / /"3-!1 2   &&? ) * 0. &&;  /!2&"#6 ,.L+$  II #"5.  A"6"A"A  %   II  T "$dii02AD  *h!?@DNDN ,   **- DL"DLrc |jD]1\}}||j|k7stjd|d3y)NzSetting z on relationship() while also setting viewonly=True does not make sense, as a viewonly=True relationship does not perform persistence operations. This configuration may raise an error in a future release.)items_persistence_onlyr6r)rkwkvs rrz5RelationshipProperty._warn_for_persistence_only_flagssFHHJ DAqD**1-- /0 2 rctj|j|j|j ||||j y)N) comparator parententityr)rregister_descriptorclass_keyrrrmappers rinstrument_classz%RelationshipProperty.instrument_class s8&& MM HH..tV<  rc6eZdZUdZdZded<ded< d ddZ dd Zd ed < d ed < d dZd!dZ d"dZ d#dZ d$dZ d%dZ d&dZdZd'dZ d( d)dZ d( d*dZ d( d*dZ d+dZ d'dZd'dZd,dZy)-RelationshipProperty.ComparatoraProduce boolean, comparison, and other operators for :class:`.RelationshipProperty` attributes. See the documentation for :class:`.PropComparator` for a brief overview of ORM level operator definition. .. seealso:: :class:`.PropComparator` :class:`.ColumnProperty.Comparator` :class:`.ColumnOperators` :ref:`types_operators` :attr:`.TypeEngine.comparator_factory` )entityrproperty_of_type_extra_criteriaz0RODescriptorReference[RelationshipProperty[_PT]]propOptional[_EntityType[_PT]]r Ncl||_||_||_|r||_||_yd|_||_y)zConstruction of :class:`.RelationshipProperty.Comparator` is internal to the ORM's attribute mechanics. N)r  _parententity_adapt_to_entityr r )rr  parentmapperadapt_to_entityof_typeextra_criterias rrz(RelationshipProperty.Comparator.__init__2s@DI!-D $3D ! ' $2D !% #1D rch|j|j|j||jS)N)rr)rr rr )rrs rrz/RelationshipProperty.Comparator.adapt_to_entityGs4>> "" / " r_InternalEntityType[_PT]r Mapper[_PT]rcp|jrt|jS|jjSr)r r7r rrs r_memoized_attr_entityz5RelationshipProperty.Comparator._memoized_attr_entityfs(}}t}}--yy'''rc.|jjSrrrrs r_memoized_attr_mapperz5RelationshipProperty.Comparator._memoized_attr_mapperls;;%% %rc|jr|jjS|jjjSr)r selectabler parent_with_polymorphic_selectablers r_source_selectablez2RelationshipProperty.Comparator._source_selectableos3$$,,777}}++HHHrc|j}|jrt|j}nd}|jj |d|d|j \}}}}}}|||zS|S)NT)source_selectablesource_polymorphicof_type_entityalias_secondaryr)r!r r7r  _create_joinsr ) r adapt_fromr%pjsjsourcedestrtarget_adapters r__clause_element__z2RelationshipProperty.Comparator.__clause_element__us002J}}!(!7!% ''",#'- $#33 ( ~Bw rctj|j|j|j||j S)zRedefine this object in terms of a polymorphic subclass. See :meth:`.PropComparator.of_type` for an example. rrr)rrr rrr )rrs rrz'RelationshipProperty.Comparator.of_typesA(22 "" $ 5 5#33 3 rctdtj|D}tj |j |j |j|j|j|zS)zAdd AND criteria. See :meth:`.PropComparator.and_` for an example. .. versionadded:: 1.4 c3dK|](}tjtj|*ywr)r8rr;WhereHavingRole).0clauses r z7RelationshipProperty.Comparator.and_..s+  !6!6?s.0r0) tupler6coerce_generator_argrrr rrr r )rcriteriaexprss rand_z$RelationshipProperty.Comparator.and_sn"77AE (22 "" $ 5 5 #33e; 3 rctd)zProduce an IN clause - this is not implemented for :func:`_orm.relationship`-based attributes at this time. zvin_() not yet supported for relationships. For a simple many-to-one, use in_() against the set of foreign key values.)NotImplementedErrorrothers rin_z#RelationshipProperty.Comparator.in_s &1 rc|t|tjrc|jjt t fvr|jSt|jjd|jS|jjrtjdt|jj||jS)aImplement the ``==`` operator. In a many-to-one context, such as: .. sourcecode:: text MyClass.some_prop == this will typically produce a clause such as: .. sourcecode:: text mytable.related_id == Where ```` is the primary key of the given object. The ``==`` operator provides partial functionality for non- many-to-one comparisons: * Comparisons against collections are not supported. Use :meth:`~.Relationship.Comparator.contains`. * Compared to a scalar one-to-many, will produce a clause that compares the target columns in the parent to the given target. * Compared to a scalar many-to-many, an alias of the association table will be rendered as well, forming a natural join that is part of the main body of the query. This will not work for queries that go beyond simple AND conjunctions of comparisons, such as those which use OR. Use explicit joins, outerjoins, or :meth:`~.Relationship.Comparator.has` for more comprehensive non-many-to-one scalar membership tests. * Comparisons against ``None`` given in a one-to-many or many-to-many context produce a NOT EXISTS clause. N adapt_source]Can't compare a collection to an object or collection; use contains() to test for membership.)rr9Nullr rr)r'_criterion_existsr-_optimized_compareadapterrrInvalidRequestErrorr>s r__eq__z&RelationshipProperty.Comparator.__eq__sR} 5*// B==**y*.EE 22444( 88 t||9 &&00= %MM44DLL5rc |$tjtj|nd}t |ddr~t |j }|J|j|j|j}}}|jjr|s|j}|j}||||z}n|}nd}d}|jr|j} nd} |jj!|| \} } } } }}|D]<}t |jjj"|||k(}||}8||z}>| t%| | z}n!t%| |jj&}||r|s|j)|}||j+ddi}|t,j.j1|z}|Ft-j2dj5|j7| |j9| |}|St-j2dj5|j7| j9| }|S)Nr F)dest_selectabler#)excludeno_replacement_traverseTr)r8rr;r3getattrr7r rris_aliased_classr _is_self_referential_anonymous_fromclause_single_table_criterionrHr!r'rr-rtraverse _annotater5True__ifnoneexistswhere select_fromcorrelate_except)r criterionkwargswhere_criteriar target_mapper to_selectablerP single_critr#r)r*r+r,rr-rcritjexs rrFz1RelationshipProperty.Comparator._criterion_existssb(  !6!6 B  tZ.;BMM<'''KKOO))/?} ==55>N$1$G$G$IM+CC *%1)4~)E)4#( $ ||$($;$;$=!$(! ++ -"3,   ;t}}33::A>&)K!)%)N%3d%:N  ;~!"%*!"dmm.G.GH*"("0!8!8!H)!/!9!9.5"syy((88D$JJqMU4[ [y1%%dI6 I JJqMU4[ [&%%d+  Irc ~|jjstjd|j|fi|S)anProduce an expression that tests a collection against particular criterion, using EXISTS. An expression like:: session.query(MyClass).filter( MyClass.somereference.any(SomeRelated.x == 2) ) Will produce a query like: .. sourcecode:: sql SELECT * FROM my_table WHERE EXISTS (SELECT 1 FROM related WHERE related.my_id=my_table.id AND related.x=2) Because :meth:`~.Relationship.Comparator.any` uses a correlated subquery, its performance is not nearly as good when compared against large target tables as that of using a join. :meth:`~.Relationship.Comparator.any` is particularly useful for testing for empty collections:: session.query(MyClass).filter(~MyClass.somereference.any()) will produce: .. sourcecode:: sql SELECT * FROM my_table WHERE NOT (EXISTS (SELECT 1 FROM related WHERE related.my_id=my_table.id)) :meth:`~.Relationship.Comparator.any` is only valid for collections, i.e. a :func:`_orm.relationship` that has ``uselist=True``. For scalar references, use :meth:`~.Relationship.Comparator.has`. z9'any()' not implemented for scalar attributes. Use has().r rrrIrFrr\r]s ranyz#RelationshipProperty.Comparator.anyhsD\==((00- *4)))>v> >rc ~|jjrtjd|j|fi|S)aProduce an expression that tests a scalar reference against particular criterion, using EXISTS. An expression like:: session.query(MyClass).filter( MyClass.somereference.has(SomeRelated.x == 2) ) Will produce a query like: .. sourcecode:: sql SELECT * FROM my_table WHERE EXISTS (SELECT 1 FROM related WHERE related.id==my_table.related_id AND related.x=2) Because :meth:`~.Relationship.Comparator.has` uses a correlated subquery, its performance is not nearly as good when compared against large target tables as that of using a join. :meth:`~.Relationship.Comparator.has` is only valid for scalar references, i.e. a :func:`_orm.relationship` that has ``uselist=False``. For collection references, use :meth:`~.Relationship.Comparator.any`. z3'has()' not implemented for collections. Use any().rfrgs rhasz#RelationshipProperty.Comparator.hassBB}}$$00I*4)))>v> >rc |jjstjd|jj ||j }|jj |j||_|S)a Return a simple expression that tests a collection for containment of a particular item. :meth:`~.Relationship.Comparator.contains` is only valid for a collection, i.e. a :func:`_orm.relationship` that implements one-to-many or many-to-many with ``uselist=True``. When used in a simple one-to-many context, an expression like:: MyClass.contains(other) Produces a clause like: .. sourcecode:: sql mytable.id == Where ```` is the value of the foreign key attribute on ``other`` which refers to the primary key of its parent object. From this it follows that :meth:`~.Relationship.Comparator.contains` is very useful when used with simple one-to-many operations. For many-to-many operations, the behavior of :meth:`~.Relationship.Comparator.contains` has more caveats. The association table will be rendered in the statement, producing an "implicit" join, that is, includes multiple tables in the FROM clause which are equated in the WHERE clause:: query(MyClass).filter(MyClass.contains(other)) Produces a query like: .. sourcecode:: sql SELECT * FROM my_table, my_association_table AS my_association_table_1 WHERE my_table.id = my_association_table_1.parent_id AND my_association_table_1.child_id = Where ```` would be the primary key of ``other``. From the above, it is clear that :meth:`~.Relationship.Comparator.contains` will **not** work with many-to-many collections when used in queries that move beyond simple AND conjunctions, such as multiple :meth:`~.Relationship.Comparator.contains` expressions joined by OR. In such cases subqueries or explicit "outer joins" will need to be used instead. See :meth:`~.Relationship.Comparator.any` for a less-performant alternative using EXISTS, or refer to :meth:`_query.Query.outerjoin` as well as :ref:`orm_queryguide_joins` for more details on constructing outer joins. kwargs may be ignored by this operator but are required for API conformance. z9'contains' not implemented for scalar attributes. Use ==rB) r rrrIrGrHr'_Comparator__negated_contains_or_equalsnegation_clause)rr?r]r5s rcontainsz(RelationshipProperty.Comparator.containss}B99$$00* YY11DLL2Fyy&&2)-)J)J*&Mrcjjtk(rtj|} dfd }dfd }j j rmtjj jDcgc];\}}tj|||||||k7||dk(=c}}Stjtj jjj jj|Dcgc] \}}||k( c}}}j|Scc}}wcc}}w)Nc |j}tj|j|jdj j j j|||S)NT)type_unique callable_)dictr5 bindparamrtyper _get_attr_w_warn_on_noner) local_colstate remote_coldict_rs rstate_bindparamzURelationshipProperty.Comparator.__negated_contains_or_equals..state_bindparamsU "JJE==! 'nn#"&))"D"D II,,eUJ# rcBjrj|S|Sr)rH)colrs radaptzKRelationshipProperty.Comparator.__negated_contains_or_equals..adapt,s||#||C00" r)rxrryInstanceState[Any]rzrrBindParameter[Any])r~rrr)r rr(rinstance_stater _use_getr5r;ror_zipr primary_keyprimary_key_from_instancerF)rr?ryr|rxyr\s` r__negated_contains_or_equalsz This will typically produce a clause such as: .. sourcecode:: sql mytable.related_id != Where ```` is the primary key of the given object. The ``!=`` operator provides partial functionality for non- many-to-one comparisons: * Comparisons against collections are not supported. Use :meth:`~.Relationship.Comparator.contains` in conjunction with :func:`_expression.not_`. * Compared to a scalar one-to-many, will produce a clause that compares the target columns in the parent to the given target. * Compared to a scalar many-to-many, an alias of the association table will be rendered as well, forming a natural join that is part of the main body of the query. This will not work for queries that go beyond simple AND conjunctions of comparisons, such as those which use OR. Use explicit joins, outerjoins, or :meth:`~.Relationship.Comparator.has` in conjunction with :func:`_expression.not_` for more comprehensive non-many-to-one scalar membership tests. * Comparisons against ``None`` given in a one-to-many or many-to-many context produce an EXISTS clause. NrBrD)rr9rEr rr(r-rGrHrFrrrIrlr>s r__ne__z&RelationshipProperty.Comparator.__ne__JsV} 5*// B==**i7(99 t||: 1133&&009 %T%F%Fu%MNNrcb|jjj|jSr)r r_check_configurers r_memoized_attr_propertyz7RelationshipProperty.Comparator._memoized_attr_propertys" II   - - /99 r)NNr) r RelationshipProperty[_PT]rz_InternalEntityType[Any]rzOptional[AliasedInsp[Any]]rr rTuple[ColumnElement[bool], ...])rzAliasedInsp[Any]rz$RelationshipProperty.Comparator[Any])rr)rr)rrkrr)rz_EntityType[Any]rzPropComparator[_PT])r9z_ColumnExpressionArgument[bool]rzPropComparator[Any])r?rrr)r?rrrr)r\)Optional[_ColumnExpressionArgument[bool]]r]rrr2)r\rr]rrr)r?z_ColumnExpressionArgument[Any]r]rrr)rr)rrrrrrrrrrr!r.rr;r@__hash__rJrFrhrjrnrlrrrrrrrs ( ?>,, ;?26>@  2+ 23 28  2 0  2 <  2* #3  1 )(   (  & I  4  <   . < @DHd @d d  d PDH4 ?@4 ?4 ?! 4 ?pDH% ?@% ?% ?! % ?NP 7P CFP  P d1 61 6 1 6f< O| rrc|Jd}|0t|}|Jt|r|jj}|j |d||S)NT)value_is_parentrCr&)r7r_adapter adapt_clauserG)rinstancer& from_entityrCinsps r _with_parentz!RelationshipProperty._with_parentsl ###48  "7>{7KD# ##$T*#}}99 &&  %+ '  rc 3 t tddstjdz| }j ||S|s.j jj jc}n-j jj jc}|r j n j tjj d fd }j 4|r2t#j j%j'|}t)j*|id|i}|r||}|S#tj$rdYawxYw)N is_instanceFzMapped instance expected for relationship comparison to object. Classes, queries and other SQL elements are not accepted in this context; for comparison with a subquery, use %s.has(**criteria).rBrucp|jvr'j|j|_yyr)_identifying_keyrwr)ru bind_to_colr{rrrys rvisit_bindparamz@RelationshipProperty._optimized_compare..visit_bindparams@))[8%)%B%B : :; & "9r)rurrr)r7rNoInspectionAvailablerOr_lazy_none_clauser _lazywhere _bind_to_col_rev_lazywhere_rev_bind_to_colrrr instance_dictobjrrGrRrTr<cloned_traverse) rryrrCr&reverse_directionr\rrr{rs `` @@@rrGz'RelationshipProperty._optimized_compares   }GE=%$H**.15 5!0/ =))! * !##..##00 #I{ ##22##44 #I{ [[F[[F((5   >> %/%446hy! ,, rK9  $Y/Iq//  s EE65E6cjjjjdfd }|S)aKCreate the callable that is used in a many-to-one expression. E.g.:: u1 = s.query(User).get(5) expr = Address.user == u1 Above, the SQL should be "address.user_id = 5". The callable returned by this method produces the value "5" based on the identity of ``u1``. cJjx}}|tju}j  jrt j n t jt jz }|tjur'|s`tjddt d|tjur'|s'tjddt d|}|tjdz|S)NpassivezCan't resolve value for column z on object z'; no value has been set for this columnz2; the object is detached and the value was expiredzGot None for value of column %s; this is unsupported for a relationship comparison and will not currently produce an IS comparison (but may in a future release))rr!NO_VALUE_get_state_attr_by_column persistentr" PASSIVE_OFFPASSIVE_NO_FETCHINIT_OK NEVER_SETrrIr#PASSIVE_NO_RESULTr6r) last_known to_returnexisting_is_available current_valuecolumnr{ lkv_fixedrr rys r_goz:RelationshipProperty._get_attr_w_warn_on_none.._gos ( ((%.txx%8 8J"6"?"?? "#<<'' ++$55 8K8KK= M 4 > >>, 44"9U#35 "6"H"HH, 44&,Yu-=? *   47==  r)rr)get_property_by_column_track_last_known_valuer_last_known_values)rrryr{rrrr s ```` @@rrwz-RelationshipProperty._get_attr_w_warn_on_nonesGb,,V4 %%dhh/,, - - ^ rc|s-|jj|jj}}n,|jj|jj}}t ||}|r||}|Sr)rrrrrrF)rrrCr\rs rrz&RelationshipProperty._lazy_none_clauseOst !##..##00#I ##22##44#I ,I{C $Y/Irctt|jjjdz|jzS)N.)rrrrrrs r__str__zRelationshipProperty.__str__es+4;;%%../#5@@rc |r|jD] } || f|vs yd|jvry|j|vry|jr|j |j} t | sJ| j ||} | jr| jrJ |r;|j |jj||tjg} | D]]} tj| }tj| }d|||f<|j|||||}|M| j!|_|s:tj"|||j}| D]}|j%|y|j |j}t |sJ|j'||| dtjy||j} | Htj| }tj| }d|||f<|j|||||}nd}|s|||j<y|j |jj'|||dy)NmergeTr)load _recursive_resolve_conflict_mapF)_adaptr)r_cascaderrget_implrget_collection collectionemptygetr" PASSIVE_MERGErrr_mergeappendinit_state_collectionappend_without_eventr)rsession source_state source_dict dest_state dest_dictrrrrimplinstances_iterable dest_listcurrent current_state current_dictrcollc dest_impls rrzRelationshipProperty.mergehs ++  !$ 2  $-- '  88; &  <<((2D,T2 22!%!4!4\;!O  48??)// LL ##DHH-11 ;3L3L2I- * * 9 9' B )77@ 48 M401nn! )*? %?$$S) *!77 488#1A--a01'//9 0;;;  '55 "$((+G" * 9 9' B )77@ 48 M401nn! )*? %&) $((###DHH-11 3rcH|j|j}|j|||}|tjus|gSt |r8|j ||||Dcgc]}tj||fc}Stj||fgScc}w)zReturn a list of tuples (state, obj) for the given key. returns an empty list if the value is None/empty/PASSIVE_NO_RESULT r) managerrrr!rrrrr)rryr{rrrros r_value_as_iterablez'RelationshipProperty._value_as_iterables}}S!&& HHUE7H 3 $66 6!)I &t ,,,UE1g,N**1-q1   ..q1156 6 s&Bc #,K|dk7s |jrtj}n!tjtjz}|dk(r4|j |j jj||}n|j|||j |}|dk(xrd|jv}|D]\} } | |vr | | Jtj| } |r || r2|r | j sA| j j} | j|jjjs=t!d|j d|j"j$d| j&d |j)| | | | | fyw) Ndeletez save-updaterzrefresh-expire delete-orphanz Attribute 'z ' on class 'z"' doesn't handle objects of type '')rr"PASSIVE_NO_INITIALIZErNO_RAISErrrget_all_pendingrrrrrisa class_managerAssertionErrorrrradd) rrqryr{visited_stateshalt_onrtuples skip_pendingrrrinstance_mappers rcascade_iteratorz%RelationshipProperty.cascade_iterators H  4 4!77G!-- 0D0DDG M !]]488,11AA%OF,,udhh-F % % N/*N "( D NA/y !- --&44Q7M7>2N$6$6,44;;O"&&t{{'@'@'G'GH$xx!3!3Q[[B   ~ ._nmC CA DsFFc8|jry|jduS)NF)rrrs r_effective_sync_backrefz,RelationshipProperty._effective_sync_backrefs ==$$E1 1rc|jr(|jrtjd|d|d|jr$|js|jdurd|_yyyy)N Relationship z( cannot specify sync_backref=True since z includes viewonly=True.F)rrrrI)rel_arel_bs r_check_sync_backrefz(RelationshipProperty._check_sync_backref&se >>e00,,-2E;  NNNN""%/!&E 0# rc |jj|d}t|tst j d|d|d|j |||j |||jj||jj||j|jj|js+t jd|d|d|d |j|jr[|jtt fvrB|j|jk(r(t j|d |d |jd yyy) NF)_configure_mappersz back_populates on relationship 'z' refers to attribute 'z{' that is not a relationship. The back_populates parameter should refer to the name of a relationship on the target class.zreverse_property z on relationship z references relationship z", which does not reference mapper z and back-reference z are both of the same direction z<. Did you mean to set remote_side on the many-to-one side ?)r get_propertyrrrrIrrr _setup_entity common_parentrr_configure_startedrr)r()rrr?s r_add_reverse_propertyz*RelationshipProperty._add_reverse_property6s: (((G%!56,,!%)    u-   - ""5) ##D) ||))$++6&&eT[[2   $ $9i"88%//1&&$0 29 %rcN|jj|jS)zReturn the target mapped entity, which is an inspect() of the class or aliased class that is referenced by this :class:`.RelationshipProperty`. )rrrrs rrzRelationshipProperty.entitybs $$&{{rc.|jjS)zcReturn the targeted :class:`_orm.Mapper` for this :class:`.RelationshipProperty`. rrs rrzRelationshipProperty.mapperls {{!!!rc|j|j|j|j|j |j |j |j|j|jjt|1td|jd|_y)Nr_))rru)_check_conflicts_process_dependent_argumentsr_setup_registry_dependencies_setup_join_conditions_check_cascade_settingsr _post_init_generate_backrefr"_warn_for_conflicting_sync_targetsrdo_initr _get_strategyr)rrs rrzRelationshipProperty.do_initts  ))+  ))+ ##% $$T]]3    ??A " $,,-BC rc|jjjj|jjjyr)rrregistry_set_depends_onrrs rrz1RelationshipProperty._setup_registry_dependenciess3 ##33 KK   ' ' rc|j}dD],}t||}|j|jd.dD]Q}t||}|j}|t t jtj|||_S|jj}|'t|rtjd|d|d|jjd urU|jj?td t!j"|jjD|_nd |_t!j$d t!j&|j(jD|_t!j$d t!j&|j,jD|_y) zConvert incoming configuration arguments to their proper form. Callables are resolved, ORM annotations removed. )rrrrrrr)rrNargnamezsecondary argument z passed to to relationship() z must be a Table object or other FROM clause; can't send a mapped class directly as rows in 'secondary' are persisted independently of a class that is mapped to that same table.Fc3hK|]*}tjtj|d,yw)rrNr8rr;rr4rs rr6zDRelationshipProperty._process_dependent_arguments..s7"  ,,a"02c3hK|]*}tjtj|d,yw)rrNrrs rr6zDRelationshipProperty._process_dependent_arguments..s7:    ((!^  : r c3hK|]*}tjtj|d,yw)rrNrrs rr6zDRelationshipProperty._process_dependent_arguments..s7+    ((!]  + r )rrOr_clsregistry_resolversrr.r8rr;rrrrrrr7r6to_list column_set to_column_setrrr)r init_argsattrrel_argvalrs rrz1RelationshipProperty._process_dependent_argumentssOO  NDi.G  - -d.I.I!.L M N3 Di.G""C#2$$00#t$  ''00  %5i%@&& *3D :     ' 'u 4""++7!"i&8&8&A&AB "DM"DM*.//: '' (>(>(G(GH : + ' ??+ '' (=(=(F(FG +  rc ,| |j|j||ny|} |J|\t|t} t|t} | rd|_d|j ff|_n"| r d|_d|j ff|_ndx} } t| } t| dr| j} t| tr\t| tjrB|jAtj | rt#j$d| d| |_n | s | sd|_| j(rqt| tr*t| t*j,r| j(d}n| j(d }t|d r|j.}t1||} n@|} n=t#j$d | d t| d r| j.} t1| |} |j | s | sd|_|jt3d | |_yy)Nr}rr~F __origin__zCollection annotation type z cannot be instantiated; please provide an explicit 'collection_class' parameter (e.g. list, set, etc.) to the relationship() function to accompany this annotationr__forward_arg__zGeneric alias z requires an argumentz_RelationshipArgumentType[_T])r_raise_for_required issubclassr$r rrrLhasattrr,rrvrrr _py_inspect isabstractrrr__args__typingMappingr.rNr)r decl_scanrclsoriginating_modulermapped_container annotationextracted_mapped_annotationis_dataclass_fieldr is_write_only is_dynamic arg_origintype_arg str_arguments rdeclarative_scanz%RelationshipProperty.declarative_scans# ' .}}$((c2.!---  '&'7IM#$4mDJ( &,dii%8$:!% &,dii%8$:!). .MJ-h7 8\ *!,,J*d+ CNN1((0"--j9$229*F))-7D)":$   j$/J5 (004H'003H8%67#+#;#;L>$&8 H (H**$XJ.CDX0 1//H6,H  ! ! )! DL ==  !@(KDM !rzsqlalchemy.orm.mappercd|jvrytjj}|r|}n |j}t |t r!td|j|}n1t|r$t |t|jfs|}n|}t |trt|d}nG t|}t!|ds/tj"d|j$dt|d||_|j&j(|_y#tj$rd}YuwxYw) Nrz_ExternalEntityType[Any]F configurerrelationship 'z2' expects a class or a mapper argument (received: ))__dict__r6 preloaded orm_mapperrrrr_clsregistry_resolve_namerrvr[rr7rrr1rrrpersist_selectabletarget)r_RelationshipProperty__argument mapperlibrresolved_argumentrs rrz"RelationshipProperty._setup_entity6s& t}} $ NN-- !H}}H h $!%*8..x8:! h  tY--.) !)  (  ' .!"3uEF  !2368,**xx&7!8:  kk44 //  s< D%%D=<D=ctdid|jjd|jjd|jjd|jjd|j j jd|j jjd|j jjd|jjd |jjd |jd |jd |jd |jd|d|j d|j"x|_}|j |_|j|_ |j|_|j&|_|j|_ |j(|_|j*|_|j,|_|j.|_|j2|_y)Nparent_persist_selectablechild_persist_selectableparent_local_selectablechild_local_selectablerrrparent_equivalentschild_equivalentsconsider_as_foreign_keysrrself_referentialr  support_synccan_be_synced_fnr)rrrMr local_tablerrrrr_equivalent_columnsrrrrrQr_columns_are_mappedrrremote_columnsrrforeign_key_columnsrr)rjcs rrz+RelationshipProperty._setup_join_conditionsfs$1% &*kk&D&D% %)[[%C%C% %)KK$;$;% $(;;#:#: % 33<< % oo//88 % //77@@%  ${{>>% #kk==% &*%D%D%  $66% ((% "66% % "]]*% "55!%  r$>>--"$"7"7,,--!#!5!5(*(>(>%+-+I+I(rc |jdS)Nrr#rs r_clsregistry_resolve_argz-RelationshipProperty._clsregistry_resolve_arg**1--rc |jdS)Nrrdrs rrLz.RelationshipProperty._clsregistry_resolve_namerfrzsqlalchemy.orm.clsregistryctjjj}||jj |Sr)r6rJorm_clsregistry _resolverrr)rrjs rr#z+RelationshipProperty._clsregistry_resolverss0NN22<< ++T22rc p|jjrt|jjdj |j set jd|j d|jjjd|jjjdyy)zOTest that this relationship is legal, warn about inheritance conflicts.FrEz)Attempting to assign a new relationship 'z$' to a non-primary mapper on class 'zm'. New relationships can only be added to the primary mapper, i.e. the very first mapper created for class 'z' N) r non_primaryrr has_propertyrrrrrs rr z%RelationshipProperty._check_conflictss ;; " "< KK  %, ,txx ,!&&HHKK&&//KK&&//   ,! "rc|jS)z\Return the current cascade setting for this :class:`.RelationshipProperty`. )rrs rrzRelationshipProperty.cascades }}rc&|j|yr) _set_cascaderrs rrzRelationshipProperty.cascades '"rc t|}|jr(t|jtj}d|jvr|j |||_|jr||j_yy)Nr) r/r intersection_viewonly_cascadesrIrrrr)r cascade_argrs rrpz!RelationshipProperty._set_cascadesp - ==$$$^%F%FGG t}} $  ( ( 1  % %18D & & . &rcx|jr|js|jtus|jturot j d||jturdnd|jjj|jjjdzd|jdk(r d|vsd |vrt j d |z|jrT|jjjj|j|jjfyy) NaFor %(direction)s relationship %(rel)s, delete-orphan cascade is normally configured only on the "one" side of a one-to-many relationship, and not on the "many" side of a many-to-one or many-to-many relationship. To force this relationship to allow a particular "%(relatedcls)s" object to be referenced by only a single "%(clsname)s" object at a time via the %(rel)s relationship, which would allow delete-orphan cascade to take place in this direction, set the single_parent=True flag.z many-to-onez many-to-many)relrclsname relatedclsbbf0codeallrrz^On %s, can't set passive_deletes='all' in conjunction with 'delete' or 'delete-orphan' cascade) delete_orphanrrr'r(rrrrrrrprimary_mapper_delete_orphansrrrqs rrz,RelationshipProperty._check_cascade_settingss  ! !&&:-91L&& /  >>Y6&+#{{11::"&++"4"4"="= .1 6   5 (  ?g#=&&;=AB   KK & & ( 8 8 ? ?4;;--.  !rcl|j|jvxr|j|j|uS)zaReturn True if this property will persist values on behalf of the given mapper. )r relationshipsrs r _persists_forz"RelationshipProperty._persists_fors7 HH,, , 7$$TXX.$6 rc<|jjj}|D]w}||jj |r!|j j jj |rQ|jjj |rwyy)zReturn True if all columns in the given collection are mapped by the tables referenced by this :class:`.RelationshipProperty`. FT)rrrrcontains_columnrrMrN)rcolsrrs rr_z(RelationshipProperty._columns_are_mappeds OO--66  A$)D)DQ)G;;1133CCkkmm33A6  rc ||jjry|jp|jsct |jt r|ji}}n|j\}}|j j}|jsvt|jj|j}|D]?}|j|s|jr"tjd|d|d|d|j M|j#d|j$j&}|j#d|j$j(}nO|j#d|j$j*}|j#dd}|rtj,d|j#d |j.}|jj} |j1d |j2|j1d |j4|j1d |j6|j1d |j8||_t;| |j f||||j<d|} |j?|| d|jr|jA|jyy)zlInterpret the 'backref' instruction to create a :func:`_orm.relationship` complementary to this one.NzError creating backref 'z' on relationship 'z+': property of that name exists on mapper 'rrrzOCan't assign 'secondaryjoin' on a backref against a non-secondary relationship.rrrrr)rrrrT)warn_for_existing)!rrlrrrrrrconcreteriterate_to_rootunionself_and_descendantsrmrrrpoprsecondaryjoin_minus_localprimaryjoin_minus_localprimaryjoin_reverse_remoterIr setdefaultrrrrrr_configure_propertyr ) r backref_keyr]rcheckmr)r*rr relationships rrz&RelationshipProperty._generate_backrefsv ;; " "  << #D,?,?$,,,&*llBV &*ll# V[[//1F??F2245;;//A~~k21::$22 +D!5~~)ZZ!((BBZZ#((@@ ZZ!((CCZZ6 44@ ":: ? ?L[[//1F   j$-- 8   mT-=-= >   /1E1E F   nd.?.? @"-D / )#xx L  & &\T '      & &t':': ; rzsqlalchemy.orm.dependencyctjj}|j|jt u|_|j s!|jj||_ yyr) r6rJorm_dependencyrrr(rrZfrom_relationshipr)r dependencys rrzRelationshipProperty._post_initbsV^^22 << >>:DL}}..@@0  &rc2|j}|jS)zPmemoize the 'use_get' attribute of this RelationshipLoader's lazyloader.)ruse_get)rstrategys rrzRelationshipProperty._use_getms &&rcL|jj|jSr)rrrrs rrQz)RelationshipProperty._is_self_referentialus{{((55rcd}|r|jd}|.|r,|jjr|jj}|r|j}||j }d}n |j}|O|j j }|jjrd}|jrE|C|j}d}n0||jjus|jjrd}|j} |xs,|duxr&||jjuxs |j}|jj|||| |\} } } } }||jj}||j j}| | ||| | fS)NFT)rrwith_polymorphicr rrrrQrRrS _is_subqueryr join_targetsr])rr$r#rLr%r&raliased dest_mapperrarrrr-s rr'z"RelationshipProperty._create_joinsys  t~~9G  $!dkk&B&B$(KK$L$L! (//K&"0";";++K  ""kk44O{{++((->-F"1"G"G"I 4;;#K#K K{{++G!99  T ) !{{??@2$11   - -              $ $ 7 7   ""kk55O         r)NN)Hrz'Optional[_RelationshipArgumentType[_T]]rz(Optional[_RelationshipSecondaryArgument]rOptional[bool]rzEOptional[Union[Type[Collection[Any]], Callable[[], Collection[Any]]]]r,Optional[_RelationshipJoinConditionArgument]rrr Optional[str]r_ORMOrderByArgumentrzOptional[ORMBackrefArgument]rrrrrrrrrzOptional[_AttributeOptions]r_LazyLoadArgumentTyperzUnion[Literal['all'], bool]rrrrrrr#Optional[_ORMColCollectionArgument]rrrz Optional[int]rz4Optional[Type[RelationshipProperty.Comparator[Any]]]rrrrrrrrrzOptional[Type[Query[Any]]]rzOptional[_InfoType]rzLiteral[None, False]rrrrrz Literal[True]rzLiteral[False]rrrr)rrrr)r Mapper[Any]rr)TN)robjectr&rrzOptional[_EntityType[Any]]rr)FNT) ryrrrrCOptional[_CoreAdapterProto]r&rrr) rrryrr{rRrrrzCallable[[], Any])FN)rrrCrrrrr)rr]rrrrRrrrrRrrrzDict[Any, object]rz#Dict[_IdentityKeyType[Any], object]rr) ryzInstanceState[_O]r{rRrrrr"rz&Sequence[Tuple[InstanceState[_O], _O]]r) rqrryrr{rRrzSet[InstanceState[Any]]rz.Optional[Callable[[InstanceState[Any]], bool]]rzDIterator[Tuple[Any, Mapper[Any], InstanceState[Any], _InstanceDict]]r)rRelationshipProperty[Any]rrrr)rrrr)rz_InternalEntityType[_T])rrtrr)r7rYrrUr8z Type[Any]r9rrrr:zOptional[Type[Mapped[Any]]]r;Optional[_AnnotationScanType]r<rr=rrr)rOrrr)rr)rz>Callable[[str], Callable[[], Union[Type[Any], Table, _ModNS]]])rzmTuple[Callable[[str], Callable[[], Union[Type[Any], Table, _ModNS]]], Callable[[str, bool], _class_resolver]])rr/)rUnion[str, CascadeOptions]rr)rurrr)rr/rr)rrrr)rrrr)FNNNFr)r$rr#rrLrr%z"Optional[_InternalEntityType[Any]]r&rrrrzTuple[ColumnElement[bool], Optional[ColumnElement[bool]], FromClause, FromClause, Optional[FromClause], Optional[ClauseAdapter]])?rrrrr_RELATIONSHIP_TOKENstrategy_wildcard_key inherit_cache_links_to_entity_is_relationshiprrtrrrrrr6 MemoizedSlotsr*rrrrrGrwrrrr"rrrr r staticmethodrr memoized_propertyrrrrrrCpreload_modulerrrerLr#r rsetterrprrr_rrrrQr' __classcell__)rs@rrr5s -@@M <@8?$$00##""%% 7755((**##!77..$$!!=A>BG# #' DHFJ(,(-04"&!+9=&.7< $$"&<@;?$( #.2 %26$(*.'+!&*+06:/4UG#9G#<G#  G#  G#BG#DG#&G#&G#.G# G#G# !G#"#G#$7%G#&$'G#(5)G#*+G#,-G#. /G#0:1G#293G#4"5G#6 7G#<=G#>?G#@,AG#BCG#D0EG#F"GG#H(IG#J%KG#LMG#N$OG#P)QG#R4SG#T)-UG#R$ x T'')<x z!%26    0    .!&48 $ BBB2 B  B  BHii"i i # i  iZ#(482  ,A__)_# _ ' _ ! __&_ C_ _L +66 7 77 7  7 0 7>CG ;D;D";D ;D 0 ;D @ ;D N;Dz22  '( '1J '  ' '*X  ""   J X`L)`L `L `L * `L  `L6`L2`L&C`L!`L `LDT01-52-5^J<. /.. . G..  T563 373&  ^^## 9,\   N<`T456    66 $)2604=A %:<Q  Q 0Q . Q ; Q  Q 8Q  Q rrc0dfd ||}d|S)Nct|tjr |jj}|j |S)N)clone)rr9r@rUcopy_copy_internals)elemrrs rrz _annotate_columns..clonesC dJ33 4>>"2+"2"2"45D 5) r)rrrrr)elementrrs `@rrrs# . E Nrc ~eZdZUded<ded<ded<ded<ded <d ed <d ed <d ed<ded<ded<ded<ded<ded<dddddddddddd dCdZdDdZdDdZdDdZedEdZ edEd Z e jdEd!Z dFd"Ze jdGd#Ze jdGd$ZdDd%ZdDd&ZdDd'ZdGd(ZdGd)ZdDd*ZdDd+Z dHd,ZdDd-ZdDd.ZdDd/ZdDd0ZdDd1ZdDd2ZdDd3Z dId4Z dDd5Z! dJd6Z"dDd7Z#e$jJZ&d8ed9<dDd:Z'e jdKd;Z(e jdKd<Z)e jdKd=Z* dLd>Z+ dMd?Z,e jdNd@Z- dO dPdAZ.dQdRdBZ/y)Srrprimaryjoin_initialrrrrrrr rrrr+rrkrSrTrUrVrrNFTcyNTr)rs rzJoinCondition.sr) rrrrWrXrYrrrZr[r\c ||_||_||_||_||_| |_||_||_||_| |_ | |_ | |_ ||_ | |_ ||_||_|j!|j"J|j%|j'|j)|j+|j-|j/|j1|j"d|j|j1|jd|j3|j5|j7yNTF)rSrUrTrVrWrXrrrrYr _remote_sider rZr[r\_determine_joinsr_sanitize_joins _annotate_fks_annotate_remote_annotate_local_annotate_parentmapper _setup_pairs_check_foreign_cols_determine_direction_check_remote_side _log_joins)rrSrTrUrVrrrrWrXrYrrrZr r[r\s rrzJoinCondition.__init__sC(*C&'>$(@%&<#"4!2#. *"(@%#5 ' 0( 0 +++     ##%    !1!148    )  $ $T%7%7 ? !!# ! rc |jj}|jd|j|j|jd|j|j|jd|jdj d|j D|jd|jdj d|jxsgD|jd|jdj d |jD|jd |jdj d |jD|jd |jdj d |jD|jd|j|jy)Nz%s setup primary join %sz%s setup secondary join %sz%s synchronize pairs [%s],c34K|]\}}d|d|dyw(z => rHNrr4lrs rr6z+JoinCondition._log_joins..( s*01a1%z#%s secondary synchronize pairs [%s]c34K|]\}}d|d|dywrrrs rr6z+JoinCondition._log_joins../ s!Q!"1%rz%s local/remote pairs [%s]c34K|]\}}d|d|dyw)rz / rHNrrs rr6z+JoinCondition._log_joins..7 s)/!Qq!$rz%s remote columns [%s]c3&K|] }d|z ywz%sNrr4r~s rr6z+JoinCondition._log_joins..> s?CTCZ?z%s local columns [%s]c3&K|] }d|z ywrrrs rr6z+JoinCondition._log_joins..C s>CTCZ>rz%s relationship direction %s) r loggerrrrjoinrrrr`rr)rr3s rrzJoinCondition._log_joins! szii+TYY8H8HI-tyy$:L:LM ' II HH484J4J    1 II HH">>D"    ( II HH373J3J    $ II HH?4+>+>? ?  # II HH>4+=+=> > /DNNKrct|jd|_|jt|jd|_yy)a_remove the parententity annotation from our join conditions which can leak in here based on some declarative patterns and maybe others. "parentmapper" is relied upon both by the ORM evaluator as well as the use case in _join_fixture_inh_selfref_w_entity that relies upon it being present, see :ticket:`3364`. )r proxy_keyvaluesN)rDrrrs rrzJoinCondition._sanitize_joinsG sI,   %B     )!1""+H"D  *rcR|j.|j"tjd|jz |j xsd}|j|j2t |j|j|j||_|j3t |j|j|j||_ y|j|_ y|j3t |j|j|j||_ y|j|_ y#tj$re}|j1tjd|jd|jd|tjd|jz|d}~wtj$re}|j1tjd|jd|jd |tjd |jz|d}~wwxYw) zDetermine the 'primaryjoin' and 'secondaryjoin' attributes, if not passed to the constructor already. This is based on analysis of the foreign key relationships between the parent and target mapped selectables. NzMProperty %s specified with secondary join condition but no secondary argument)a_subsetrYzOCould not determine join condition between parent/child tables on relationship zG - there are no foreign keys linking these tables via secondary table 'z'. Ensure that referencing columns are associated with a ForeignKey or ForeignKeyConstraint, or specify 'primaryjoin' and 'secondaryjoin' expressions.aCould not determine join condition between parent/child tables on relationship %s - there are no foreign keys linking these tables. Ensure that referencing columns are associated with a ForeignKey or ForeignKeyConstraint, or specify a 'primaryjoin' expression.zP - there are multiple foreign key paths linking the tables via secondary table 'z'. Specify the 'foreign_keys' argument, providing a list of those columns which should be counted as containing a foreign key reference from the secondary table to each of the parent and child tables.a'Could not determine join condition between parent/child tables on relationship %s - there are multiple foreign key paths linking the tables. Specify the 'foreign_keys' argument, providing a list of those columns which should be counted as containing a foreign key reference to the parent table.)rrrrr rYrHrTrVrrSrUrNoForeignKeysErrorAmbiguousForeignKeysError)rrYnfeafes rrzJoinCondition._determine_joinsY s    )dnn.D&&(*.))4 I '+'D'D'L $~~)%%-)755!%!D8&D88H& A F++H&A H!!H&c0t|jdSNlocalrr)rDrrs rrz%JoinCondition.primaryjoin_minus_local s 0 09LMMrcL|jJt|jdSr)rrDrs rrz'JoinCondition.secondaryjoin_minus_local s(!!--- 2 2;NOOrc|jr%dd}tj|ji|S|jrt |jdSt |jS)a(Return the primaryjoin condition suitable for the "reverse" direction. If the primaryjoin was delivered here with pre-existing "remote" annotations, the local/remote annotations are reversed. Otherwise, the local/remote annotations are removed. cd|jvr.t|j}|d=d|d<|j|Sd|jvr.t|j}|d=d|d<|j|Sy)NrTr) _annotationsrt_with_annotations)rrrs rreplacez9JoinCondition.primaryjoin_reverse_remote..replace sw333W112A( !%AgJ"44Q77 4 44W112A' "&AhK"44Q77rrrrrrrrz Optional[_CE])_has_remote_annotationsr<replacement_traverser_has_foreign_annotationsrD)rrs rrz(JoinCondition.primaryjoin_reverse_remote sd  ' ' 001A1A2wO O,,'$$-@((8(899rcZtj|iD]}||jvsyyr)r<iterater)rr5r;r~s r_has_annotationzJoinCondition._has_annotation s4##FB/ CS--- rc:|j|jdSNrrrrs rrz&JoinCondition._has_foreign_annotations s##D$4$4i@@rc:|j|jdSNrrrs rrz%JoinCondition._has_remote_annotations s##D$4$4h??rcx|jry|jr|jy|jy)zAnnotate the primaryjoin and secondaryjoin structures with 'foreign' annotations marking columns considered as foreign. N)rrY_annotate_from_fk_list_annotate_present_fksrs rrzJoinCondition._annotate_fks s1  ( (   ( (  ' ' )  & & (rcdfd }tjji|_j'tjji|_yy)NcH|jvr|jddiSyNrT)rYrUrrrs rcheck_fkz6JoinCondition._annotate_from_fk_list..check_fk s*$777(()T):;;rr)r<rrr)rrs` rr z$JoinCondition._annotate_from_fk_list s]  $88   b(     )!)!>!>""B"D  *rcf|j*tj|jjn t  dfd dfd }t j |jid|i|_|j)t j |jid|i|_yy)Nct|tjr@t|tjr&|j|r|S|j|r|Sr|vr|vr|S|vr|vr|Syr)rr4Column references)ab secondarycolss r is_foreignz7JoinCondition._annotate_present_fks..is_foreign sn!V]]+ 1fmm0L<<?H\\!_H %!=*@H-'A],BHrbinaryc4t|jtjr$t|jtjsyd|jj vrd|jj vr|j|j}|}|j |jr#|jjddi|_y|j |jr#|jjddi|_yyyyyr)rleftr5rArightrcomparerU)rr~rs r visit_binaryz9JoinCondition._annotate_present_fks..visit_binary( s S.. c.?.?@!9!99V\\%>%>> fll;?{{6;;/&,kk&;&;Y> % OODNN,<,<=MEM ! &8  ) " &$33   b8\":     )!)!9!9""B<(@"D  *rc|j|jddfd }tj|jid|iS)zvReturn True if the join condition contains column comparisons where both columns are in both tables. Frc|j|j}}t|tjrt|tjrsj |j rWj |j r;j |j rj |j rdyyyyyyyr)rrrr9r@is_derived_fromtable)rrfmtptresults rrz;JoinCondition._refers_to_parent_table..visit_binaryL s;; qA1j556q*"9"9:&&qww/&&qww/&&qww/&&qww/0000;7rr)rSrTr<rTr)rrr&r'r(s @@@r_refers_to_parent_tablez%JoinCondition._refers_to_parent_tableC sI  + +  * *  $**B<0HI rcBt|j|jS)z5Return True if parent/child tables have some overlap.)rIrSrTrs r_tables_overlapzJoinCondition._tables_overlap\ s"#  * *D,I,I  rcT|jry|j|jy|js |jr|j y|j r|jddy|jr|jy|jy)zAnnotate the primaryjoin and secondaryjoin structures with 'remote' annotations marking columns considered as part of the 'remote' side. Ncd|jvSr)r)r~s rrz0JoinCondition._annotate_remote..r sI)9)99rF) rr_annotate_remote_secondaryrr_annotate_remote_from_argsr)_annotate_selfrefr+_annotate_remote_with_overlap%_annotate_remote_distinct_selectablesrs rrzJoinCondition._annotate_remotec s  ' '  >> %  + + -  % %):):  + + -  ) ) +  " "95  ! ! #  . . 0  6 6 8rc|jJ|jdfd }tj|ji||_|jJtj|ji||_y)z^annotate 'remote' in primaryjoin, secondaryjoin when 'secondary' is present. Ncbjj|r|jddiSyNrT)rrrU)rrfixed_secondarys rreplz6JoinCondition._annotate_remote_secondary..repl s0  009(((D)9::rr)rr<rrr)rr7r6s @rr.z(JoinCondition._annotate_remote_secondaryy sy ~~)))..  $88   b$ !!---%::   D rcjdfd }tjjid|i_y)zxannotate 'remote' in primaryjoin, secondaryjoin when the relationship is detected as self-referential. rc|jj|j}t|jtj rt|jtj rm|jr"|jj ddi|_|jr&|s#|jj ddi|_yyysjyyr5)rrrrr9r@rU_warn_non_column_elements)requatedfnremote_side_givenrs rrz5JoinCondition._annotate_selfref..visit_binary skk))&,,7G&++z'>'>?J j55Efkk?"(++"7"748H"IFKfll#G#)<<#9#98T:J#KFL-4#&..0'rNr)r<rr)rr<r=rs``` rr0zJoinCondition._annotate_selfref s/ 1$33   b8\": rch|jrA|jrtjd|jDcgc]\}}| c}}n |j|j r|j fddydfd }t j|ji||_ycc}}w)zannotate 'remote' in primaryjoin, secondaryjoin when the 'remote_side' or '_local_remote_pairs' arguments are used. zTremote_side argument is redundant against more detailed _local_remote_side argument.c |vSrr)r~rs rrz:JoinCondition._annotate_remote_from_args.. s sk/ArTcF|tvr|jddiSyr5)rrU)rrrs rr7z6JoinCondition._annotate_remote_from_args..repl s+c+..",,h-=>>rNr) rrrrr)r0r<rr)rrrr7rs @rr/z(JoinCondition._annotate_remote_from_args s  # #  **  ,0+C+CD!Q1DK++K  ' ' )  " "#A4 H  (<<  "d D Es B.cdfd }jduxr,jjjju dfd tjj id|i_y)zannotate 'remote' in primaryjoin, secondaryjoin when the parent/child tables have some set of tables in common, though is not a fully self-referential relationship. rc|j|j\|_|_|j|j\|_|_yr)rr)rproc_left_rights rrzAJoinCondition._annotate_remote_with_overlap..visit_binary sE(7 V\\) %FK)8 fkk) %FL&+rNc~t|tjr{t|tjrajjj |r8j jj |r|jddi}||fSrH|jjdjjur|jddi}||fSrH|jjdjjur|jddi}||fSj||fS)NrTr) rr9r@rTrrrSrUrrr rr:)rrcheck_entitiesrs rrCzDJoinCondition._annotate_remote_with_overlap..proc_left_right s%$ 7 78Zz..>0022BB4466FFtL!OOXt,<=E; &&**>:dii>N>NN4(89; %%)).9TYY=M=MM~~x&67; ..0; rr)rrrrrz-Tuple[ColumnElement[Any], ColumnElement[Any]])r rrr<rr)rrrErCs` @@rr1z+JoinCondition._annotate_remote_with_overlap s}  IIT ! Ndii&6&6dii>N>N&N  $ -?  : 2$33   b8\": rc^dfd }tjji|_y)z}annotate 'remote' in primaryjoin, secondaryjoin when the parent/child tables are entirely separate. c jjj|r]jjj|r%jjj|r|j ddiSyr5)rTrrrUrVrUrs rr7zAJoinCondition._annotate_remote_distinct_selectables..repl sj,,..>>wG0022BB7K..00@@I(((D)9::rNrr<rr)rr7s` rr2z3JoinCondition._annotate_remote_distinct_selectables s* $88   b$ rcHtjd|jzy)NzNon-simple column elements in primary join condition for property %s - consider using remote() annotations to mark the remote side.)r6rr rs rr:z'JoinCondition._warn_non_column_elements s   <>Bii H rct|j|jdry|jr3tj|jDcgc]\}}| c}}n)tj|j j dfd }tj|ji||_ycc}}w)aCAnnotate the primaryjoin and secondaryjoin structures with 'local' annotations. This annotates all column elements found simultaneously in the parent table and the join condition that don't have a 'remote' annotation set up from _annotate_remote() or user-defined. rNcPd|jvr|vr|jddiSy)NrrT)rrU)rr local_sides rlocals_z.JoinCondition._annotate_local..locals_* s0w333:8M(('499rr) rrrr6r%rSrr<r)rrrrMrLs @rrzJoinCondition._annotate_local s    0 0' :   # #!%!9!9:v1:J)G)G)I)IJJ  $88   b' ;s B4 c^dfd }tjji|_y)Ncd|jvr'|jdjjiSd|jvr'|jdjjiSy)Nrrr)rrUr rrrs rparentmappers_z.parentmappers_4 sb7///((.$)):J:J)KLLG000((.$)):J:J)KLLrrrH)rrPs` rrz$JoinCondition._annotate_parentmapper3 s* $88   b. rc^|js#tjd|jdt j |j jj|jj}|jD]#\}}||vs t jd|d%y)Nra could not determine any unambiguous local/remote column pairs based on join condition and remote_side arguments. Consider using the remote() annotation to accurately mark those elements of the join condition that are on the remote side of the relationship.z Expression z is marked as 'remote', but these column(s) are local to the local side. The remote() annotation is needed only for a self-referential relationship where both sides of the relationship refer to the same tables.) rrrr r6r%rSr differencerTr)r not_target_rmts rrz JoinCondition._check_remote_side? s&&&&(,yy3  ..00j66889 11 3*$II  ! rc|j|d}t|}|rt|j}nt|j}|jr|s|js|ry|jr<|r:|s8d|xrdxsdd|d|j d}|d z }t j|d |xrdxsdd|d|j d}|d z }t j|) zHCheck the foreign key columns collected and emit error messages.rNzbCould not locate any simple equality expressions involving locally mapped foreign key columns for primaryrz join condition 'z' on relationship ra Ensure that referencing columns are associated with a ForeignKey or ForeignKeyConstraint, or are annotated in the join condition with the foreign() annotation. To allow comparison operators other than '==', the relationship can be marked as viewonly=True.z6Could not locate any relevant foreign key columns for z Ensure that referencing columns are associated with a ForeignKey or ForeignKeyConstraint, or are annotated in the join condition with the foreign() annotation.)_gather_columns_with_annotationrrrr[r rr)rrHrW foreign_cols has_foreigncan_syncerrs rrz!JoinCondition._check_foreign_cols[ s  ;; I <( D223HD<<=H   %%+    X) 8[8"II  I C&&s+ + ) 8[8"II    C &&s+ +rc|j t|_ytj|j j }tj|jj }|j|j}|j|j}|r|r|j|jdd}|j|jdDchc]}d|jvr|}}|rI|rG|jj|j}|j|}|j|}|r|s t |_y|r|s t"|_yt%j&d|j(z|r t |_y|r t"|_yt%j&d|j(zcc}w)z[Determine if this relationship is one to many, many to one, many to many. NrraDCan't determine relationship direction for relationship '%s' - foreign key columns within the join condition are present in both the parent and the child's mapped tables. Ensure that only those columns referring to a parent column are marked as foreign, either via the foreign() annotation or via the foreign_keys argument.zCan't determine relationship direction for relationship '%s' - foreign key columns are present in neither the parent nor the child's mapped tables)rr'rr6r%rSrrTrsrarXrrr`rrRr)r(rrr ) r parentcols targetcols onetomany_fk manytoone_fkonetomany_localrmanytoone_local self_equateds rrz"JoinCondition._determine_direction s    )'DN)G)G)I)IJJ)F)F)H)HIJ&2243K3KLL&2243K3KLL #'"F"F$$h #"AA(()# q~~5 ####'#6#6#C#C**$L'6&@&@&NO&5&@&@&NO #?%.DN$_%.DN ..9<@99E  !*!***47;ii@U#s Gct|Dcgc]%\}}|j|jf'c}}Scc}}w)zprovide deannotation for the various lists of pairs, so that using them in hashes doesn't incur high-overhead __eq__() comparisons against original columns mapped. ) _deannotate)rrrrs r_deannotate_pairszJoinCondition._deannotate_pairs s/@JJtq!!--/2JJJs*4c8g}tjgg} dfd }j|fj|ffD]\}}| |||j _j |_j |_y)Nc@ dfd }t||y)Ncd|jvr3d|jvr%j|rj||fn@d|jvr2d|jvr$j|rj||f|jtj urXj||rEd|jvrj ||fyd|jvrj ||fyyyy)Nrr)rr\roperatorr:eqr)rrrrlrprs rrz.go..visit_binary s  2 22 (9(99--d3GGT5M* 1 11 (:(::--e4GGUDM*??ill2t7L7L%8!E$6$66"))4-8"d&7&77"))5$-88 82r)rr rrrrrrrJ)joincondrrrmrs ` rgoz&JoinCondition._setup_pairs..go s8 9- 9( 9* 9  92 !x 8r)rnrr_MutableColumnPairsrr)r6 OrderedSetrrrgrrr)r sync_pairssecondary_sync_pairsrornrrms` @rrzJoinCondition._setup_pairs s*, OOB  57 9) 9+ 9 9@  z *   !5 6%  % Hj x $  %#'"8"8"=!%!7!7 !C+/+A+A , (rzwweakref.WeakKeyDictionary[ColumnElement[Any], weakref.WeakKeyDictionary[RelationshipProperty[Any], ColumnElement[Any]]]_track_overlapping_sync_targetscj|jsy|jDcgc] \}}||f c}}|jDcgc] \}}||f c}}zD]\}|jvr/t j |j |i|j<Dg}|j}|jD]\}}|jjr||j jvs7|j|j jvsZ|j j|jvs}d|j jvsd|jvs|j jj|jr|j jj|jr|j jj|jr7|j jj|jrh|j j|jk7s1|j jj|jr|j!||f|r~t#j$d|j d|dddj't)fd|Ddd j't)d |Dd |j d d ||j|j <ycc}}wcc}}w)Nz__*rGz' will copy column z to column z(, which conflicts with relationship(s): z, c3<K|]\}}d|d|ddyw)rz ' (copies z to rHNr)r4prfr_to_s rr6zCJoinCondition._warn_for_conflicting_sync_targets..~ s&'"(1SACC$M'"sa. If this is not the intention, consider if these relationships should be linked with back_populates, or if viewonly=True should be applied to one or more if they are read-only. For the less common case that foreign key constraints are partially overlapping, the orm.foreign() annotation can be used to isolate the columns that should be written towards. To silence this warning, add the parameter 'overlaps="rc3:K|]\}}|jywr)r)r4rwfrs rr6zCJoinCondition._warn_for_conflicting_sync_targets.. s+Mvr2BFF+Msz "' to the 'z' relationship.qzyxr{)r[rrrtweakrefWeakKeyDictionaryr rr_dispose_calledrrrr is_siblingrrr6rrsorted)rfrom_ry other_props prop_to_fromrwrxs ` rrz0JoinCondition._warn_for_conflicting_sync_targets4 s  .2-C-C )eSUCL .2-M-M )eSUCL  K MJE3$>>>--tyy%.@A44S9! #CCCH +1136GBII55dii&A&AAFF$))*=*== IIMM=")<)<<!5 $ 0 0 ; ;BII F $ 0 0 ; ;BII F $ 0 0 ; ;BII F $ 0 0 ; ;BII F IIMMRVV3#'99#3#3#A#A"))#L$**B95/62II!II! II &'"5@'"!"  HHV+M+M%MN II14$7:HM44S9$))DWK M  s L)L/c$|jdSr_gather_join_annotationsrs rr`zJoinCondition.remote_columns s,,X66rc$|jdS)Nrrrs rrzJoinCondition.local_columns s,,W55rc$|jdSrrrs rraz!JoinCondition.foreign_key_columns s,,Y77rct|j|j|}|j+|j |j|j||Dchc]}|j c}Scc}wr)rrXrrrrf)rr;srs rrz&JoinCondition._gather_join_annotations ss   0 01A1A: N     ) HH44&&   *++A +++s!A;ct|}tj|iDchc]4}|j|jrt t t|6c}Scc}wr)rr<rissubsetrrrAr)rr5r;annotation_setr~s rrXz-JoinCondition._gather_columns_with_annotation s\Z ''3 &&s'7'78 s#S )   s9A c|jGttj|jjDcgc]}|j c}St jScc}wr)r frozenset itertoolschainr proxy_setr6 EMPTY_SETrrs r_secondary_lineage_setz$JoinCondition._secondary_lineage_set sP >> %t~~7G7G!H!!++!HI >> !"IsA$ c8 t|ddi}jjj}}}| |||z}n||z}|rM d fd t fd|D}||t j |z}n|t j |z}|r||jd}t|t} t|jj| } |5t|tjt|j} | j|}nKt|tj } |+| jt|tj d} | j|}| xs| } d| _nd} |||| |fS) a7Given a source and destination selectable, create a join between them. This takes into account aliasing the join clause to reference the appropriate corresponding columns in the target objects, as well as the extra child criterion, equivalent column sets, etc. rNTNc|jjdd}|jjur2|jjur|j vr t ||S|S)anote unrelated columns in the "extra criteria" as either should be adapted or not adapted, even though they are not part of our "local" or "remote" side. see #9779 for this case, as well as #11010 for a follow up rN)rrr rrrr?)rrparentmapper_for_elementrs rmark_exclude_colsz5JoinCondition.join_targets..mark_exclude_cols sg,0+<+<+@+@"D,( -DII4D4DD0 8H8HHD$?$??)$ <<Krc3>K|]}t|ddiyw)should_not_adaptT)annotate_callableNrB)r4rrs rr6z-JoinCondition.join_targets.. s3#  '.&7#s)flat) exclude_fn) equivalents)rr)rrfrrerrf)rErrrr7r5r;rRrG_local_col_excluderXrrWrT_remote_col_excluder) rr#rLrrarrrrprimary_aliasizersecondary_aliasizerr-rs ` @rrzJoinCondition.join_targets s6, 7>        NN%.]   "( - ; )K7  ) 8G $ 0## + #N( -.0I I )CHHn,EE $%;;;F $11%!'4#1G1G'%)*$%0(5!#5)e%-(,(?(?&!4 < <] K $1#1 $ 6 6%! %0%++%-':(,(?(?'+#+44[AK0E4EN(,N %!N        rc i i}|jdu rItjt |jD] \}} |j ||f|||<"n5s|jD] \}}|||< n|jD] \}}|||<  d fd }|j }|jstj|i|}|j;|j}rtj|i|}tj||} Dcic]} |j|} }|| |fScc}w)Ncsd|jvsrEr|vss=d|jvr/|vr&tjdd|jd|<|Sy)NrrT)rqrr)rr5rurv)rrbinds has_secondarylookuprs r col_to_bindz5JoinCondition.create_lazy_clause..col_to_bindX sj'7g6J6J+J$"w&'8)h':N:N.N%'%(]]d',,t&E'NW~%r)rrrrrzOptional[BindParameter[Any]]) r collections defaultdictlistrrrr<rr5r;r) rrequated_columnsrrr lazywhererr~rrrrs ` @@@rcreate_lazy_clausez JoinCondition.create_lazy_clauseB s ?AHJ**$6  ,,T2F// '1q   !Q(%&" '#// '1%&" '// '1%&" ' ' /2  )  $$$    %-> 552{I    ) ..M ( = =!2{! M:I6;Relationship subclass used implicitly for declarative mapping.Tcy)Nrr)r8s r_mapper_property_namez+_RelationshipDeclared._mapper_property_name srNr)rrrrr classmethodrrrrrr s" IMrr)rrrr)rrrrerr)r __future__rrr dataclassesr7r2rrr5rrrrr r r r r rrrrrrrrrrr}rr_typingrrbaserrrr r!r"r#r$ interfacesr%r&r'r(r)r*r+r,r6r-r.r/r1rr2r3r4r5 inspectionr8r9r:r;r< sql._typingr=r>sql.annotationr? sql.elementsr@rAsql.utilrCrDrErFrGrHrIrK util.typingrLrMrN TYPE_CHECKINGrOrPrQrRrSrTrUrV clsregistryrWrX decl_baserYrrZrr[queryr\rr]ryr^ strategiesr_r`rarbrcrdrerfrgrhri sql.schemarjsql.selectablerkrlrmrnrprqrrrsr_RelationshipArgumentTyperr"_RelationshipJoinConditionArgument_RelationshipSecondaryArgumentrORMBackrefArgument DMLColumnRole_ORMColCollectionElement_ORMColCollectionArgumentrrrrrprr dataclassrrr class_logger Identifiedrrrrrrrrrrrrs# *.$"&!)/"!!&-+!  3++'(%'(.$%*+4!9 $,)&,&,#1/ $&"!/2'04/,,"+13 T e3 e3 e3vS!"H Rb\ R  R# #$ &   "&+ "4 ((&""'#xL 011" ENc" R*3/ /0 R3C89 9: U31#66 78 :3c4S>&9 ::; c  " %& R23 34 R) )* v6s;< e/0u]3%7s9K%KLMmC0-2DDEF 5s!3]35G!GHI&( 'wsCx('': mC6H#6M0N NO 6T 04cnnT T n< `7`7F%=="'w0BC'2DEr, B" r