+
    Xj&                       R t ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIH	t	 ^ RIH
t
 ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIHt ^RIH t  ^RIHt ^RI!H"t" ]'       d1   ^RIH#t# ^RI$H%t% ^RIH&t& ^RIH't' ^RI(H)t) ^RIH*t* ^RI+H,t, ^R I-H.t. ]! R!]R"7      t/ ! R# R$]]/,          4      t0 ! R% R&]4      t1]Pd                  Pg                  R'R(7       ! R) R*] 4      4       t4 ! R+ R,]]/,          4      t5 ! R- R.]5]/,          ]]/,          4      t6R/ R0 lt7R1# )2zDynamic collection API.

Dynamic collections act like Query() objects for read operations and support
basic add/delete mutation.

.. legacy:: the "dynamic" loader is a legacy feature, superseded by the
 "write_only" loader.


)annotations)Any)Iterable)Iterator)List)Optional)overload)Tuple)Type)TYPE_CHECKING)TypeVar)Union)
attributes)exc)relationships)util)PassiveFlag)Query)object_session)AbstractCollectionWriter)WriteOnlyAttributeImpl)WriteOnlyHistory)WriteOnlyLoader)result)QueryableAttribute)Mapper)_RelationshipOrderByArg)Session)InstanceState)AliasedClass)	_Dispatch)ColumnElement_T)boundc                  &    ] tR t^=tRR R lltRtR# )DynamicCollectionHistoryNc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )   attrDynamicAttributeImplstateInstanceState[_T]passiver   apply_toz&Optional[DynamicCollectionHistory[_T]]returnNone )formats   "r   /Users/wind/Downloads/Coruna-main学习资料A/backend/venv/lib/python3.14/site-packages/sqlalchemy/orm/dynamic.py__annotate__%DynamicCollectionHistory.__annotate__>   s<     / /"/ !/ 	/
 9/ 
/    c                	   V'       da   \        W4      P                  R 4      p\        P                  ! V4      V n        VP
                  V n        VP                  V n        RV n        R# \        P                  ! 4       V n        \        P                  ! 4       V n        \        P                  ! 4       V n        R V n        R# )FTN)AppenderQuery	autoflushr   OrderedIdentitySetunchanged_itemsadded_itemsdeleted_items_reconcile_collection)selfr(   r*   r,   r-   colls   &&&&& r2   __init__!DynamicCollectionHistory.__init__>   s      -77>D#'#:#:4#@D '33D!)!7!7D)-D&!%!8!8!:D#668D#'#:#:#<D ).D&r5   )r=   r;   r<   r:   N)__name__
__module____qualname____firstlineno__r@   __static_attributes__r0   r5   r2   r%   r%   =   s    / /r5   r%   c                  H    ] tR t^Rt$ Rt]],          tR]R&   RR R llt	Rt
R# )	r)   TzType[AppenderMixin[Any]]query_classNc               8    V ^8  d   QhRRRRRRRRR	R
RRRRRR/# )r'   class_z#Union[Type[Any], AliasedClass[Any]]keystrdispatchz"_Dispatch[QueryableAttribute[Any]]target_mapperz
Mapper[_T]order_byr   rI   z!Optional[Type[AppenderMixin[_T]]]kwr   r.   r/   r0   )r1   s   "r2   r3   !DynamicAttributeImpl.__annotate__W   sZ     = =3= = 5	=
 "= *= 7= = 
=r5   c                	   \         P                  P                  ! WVR V3/ VB  W@n        V'       d   \	        V4      V n        V'       g   \        V n        R # \        VP                  4       9   d	   W`n        R # \        V4      V n        R # rB   )r   AttributeImplr@   rO   tuplerP   r7   rI   AppenderMixinmromixin_user_query)r>   rK   rL   rN   rO   rP   rI   rQ   s   &&&&&&&,r2   r@   DynamicAttributeImpl.__init__W   sl     	  ))#tX	
13	
 +!(ODM,Dkoo//*/<Dr5   )rP   rI   rO   rB   )rC   rD   rE   rF   _supports_dynamic_iterationr%   r   collection_history_cls__annotations__r@   rG   r0   r5   r2   r)   r)   R   s#    "&5c:))= =r5   r)   dynamic)lazyc                      ] tR t^ot]tRtR# )
DynaLoaderr0   N)rC   rD   rE   rF   r)   
impl_classrG   r0   r5   r2   r`   r`   o   s    %Jr5   r`   c                  D  a  ] tR t^tt$ RtRtR]R&   R]R&   R V 3R llt]R	 R
 l4       t	]	P                  R R l4       t	R R lt]'       d   R R lt]R R l4       t]R R l4       tR R ltR R ltR&R R lltR R ltR R ltR R  ltR! R" ltR# R$ ltR%tV ;t# )'rV   zLA mixin that expects to be mixing in a Query class with
AbstractAppender.


NzOptional[Type[Query[_T]]]rI   zTuple[ColumnElement[Any], ...]_order_by_clausesc               $    V ^8  d   QhRRRRRR/# )r'   r(   r)   r*   r+   r.   r/   r0   )r1   s   "r2   r3   AppenderMixin.__annotate__~   s$     & &(&1B&	&r5   c                	j   < \         P                  ! V VP                  R 4       \        SV `  W4       R # rB   )r   r@   rO   super)r>   r(   r*   	__class__s   &&&r2   r@   AppenderMixin.__init__~   s/     		

 	%r5   c                   V ^8  d   QhRR/# )r'   r.   Optional[Session]r0   )r1   s   "r2   r3   re      s      * r5   c                	    \        V P                  4      pVe4   VP                  '       d"   V P                  V9   d   VP                  4        \        P
                  ! V P                  4      '       g   R # V# rB   )r   instancer8   flushorm_utilhas_identityr>   sesss   & r2   sessionAppenderMixin.session   sO    dmm,4==D3HJJL$$T]]33Kr5   c                    V ^8  d   QhRRRR/# )r'   rs   r   r.   r/   r0   )r1   s   "r2   r3   re      s      w 4 r5   c                	    Wn         R # rB   rr   )r>   rs   s   &&r2   rs   rt      s    	r5   c                   V ^8  d   QhRR/# )r'   r.   z1Union[result.ScalarResult[_T], result.Result[_T]]r0   )r1   s   "r2   r3   re      s     0 0H 0r5   c           
     	   V P                   pVEf   \        P                  ! V P                  4      pVP                  '       d2   \
        P                  ! R\        P                  ! V4      ,          4       \        P                  ! \        P                  ! V P                  P                  P                  .4      \        V P                  P!                  \        P                  ! V P                  4      \"        P$                  4      P&                  4      RR7      P)                  4       # V P+                  V4      P-                  4       # )NzInstance %s is detached, dynamic relationship cannot return a correct result.   This warning will become a DetachedInstanceError in a future release.T)_source_supports_scalars)rs   r   instance_staterm   detachedr   warnro   	state_strr   IteratorResultSimpleResultMetaDatar(   rK   rC   iter_get_collection_historyr   PASSIVE_NO_INITIALIZEr;   scalars	_generate_iter)r>   rr   r*   s   &  r2   r   AppenderMixin._iter   s    ||<--dmm<E~~~		C  ))%02 ((++TYY-=-=-F-F,GHII55"11$--@#99 "k	 *.	 gi	 >>$'--//r5   c                   V ^8  d   QhRR/# )r'   r.   zIterator[_T]r0   )r1   s   "r2   r3   re      s    //l/r5   c                	    R # rB   r0   )r>   s   &r2   __iter__AppenderMixin.__iter__   s    Cr5   c                    V ^8  d   QhRRRR/# )r'   indexintr.   r"   r0   )r1   s   "r2   r3   re      s    0000r5   c                	    R # rB   r0   r>   r   s   &&r2   __getitem__AppenderMixin.__getitem__   s    -0r5   c                    V ^8  d   QhRRRR/# )r'   r   slicer.   zList[_T]r0   )r1   s   "r2   r3   re      s    88888r5   c                	    R # rB   r0   r   s   &&r2   r   r      s    58r5   c                    V ^8  d   QhRRRR/# )r'   r   zUnion[int, slice]r.   zUnion[_T, List[_T]]r0   )r1   s   "r2   r3   re      s     ; ;!2 ;7J ;r5   c                	   V P                   pVfX   V P                  P                  \        P                  ! V P
                  4      \        P                  4      P                  V4      # V P                  V4      P                  V4      # rB   )rs   r(   r   r   r{   rm   r   r   indexedr   r   )r>   r   rr   s   && r2   r   r      si    ||<9944))$--811 gen
 >>$'33E::r5   c                   V ^8  d   QhRR/# )r'   r.   r   r0   )r1   s   "r2   r3   re      s     
0 
0s 
0r5   c                	   V P                   pVf\   \        V P                  P                  \        P
                  ! V P                  4      \        P                  4      P                  4      # V P                  V4      P                  4       # rB   )rs   lenr(   r   r   r{   rm   r   r   r;   r   countrq   s   & r2   r   AppenderMixin.count   sk    ||<		11--dmm<55 +	  >>$'--//r5   c                    V ^8  d   QhRRRR/# )r'   rr   rk   r.   z	Query[_T]r0   )r1   s   "r2   r3   re      s       
r5   c                	   V P                   pVfW   \        V4      pVfH   \        P                  ! R\        P
                  ! V4      : RV P                  P                  : R24      hV P                  '       d)   V P                  V P                  P                  VR7      pM%VP                  V P                  P                  4      pV P                  Vn        V P                  Vn        V P                  Vn        V# )NzParent instance zh is not bound to a Session, and no contextual session is established; lazy load operation of attribute 'z' cannot proceed)rs   )rm   r   orm_excDetachedInstanceErrorro   instance_strr(   rL   rI   rO   query_where_criteria	_from_objrc   )r>   rr   rm   r   s   &&  r2   r   AppenderMixin._generate   s     ==<!(+D|33  ,,X6		G  $$TYY%<%<d$KEJJtyy667E $ 4 4.."&"8"8r5   c                    V ^8  d   QhRRRR/# r'   iteratorzIterable[_T]r.   r/   r0   )r1   s   "r2   r3   re      s     % % % %r5   c                (    V P                  V4       R# )aN  Add an iterable of items to this :class:`_orm.AppenderQuery`.

The given items will be persisted to the database in terms of
the parent instance's collection on the next flush.

This method is provided to assist in delivering forwards-compatibility
with the :class:`_orm.WriteOnlyCollection` collection class.

.. versionadded:: 2.0

N_add_all_implr>   r   s   &&r2   add_allAppenderMixin.add_all   s     	8$r5   c                    V ^8  d   QhRRRR/# r'   itemr"   r.   r/   r0   )r1   s   "r2   r3   re      s     # # #t #r5   c                *    V P                  V.4       R# )a@  Add an item to this :class:`_orm.AppenderQuery`.

The given item will be persisted to the database in terms of
the parent instance's collection on the next flush.

This method is provided to assist in delivering forwards-compatibility
with the :class:`_orm.WriteOnlyCollection` collection class.

.. versionadded:: 2.0

Nr   r>   r   s   &&r2   addAppenderMixin.add   s     	D6"r5   c                    V ^8  d   QhRRRR/# r   r0   )r1   s   "r2   r3   re     s     % %| % %r5   c                (    V P                  V4       R# )zAdd an iterable of items to this :class:`_orm.AppenderQuery`.

The given items will be persisted to the database in terms of
the parent instance's collection on the next flush.

Nr   r   s   &&r2   extendAppenderMixin.extend  s     	8$r5   c                    V ^8  d   QhRRRR/# r   r0   )r1   s   "r2   r3   re     s     # #2 #$ #r5   c                *    V P                  V.4       R# )zAppend an item to this :class:`_orm.AppenderQuery`.

The given item will be persisted to the database in terms of
the parent instance's collection on the next flush.

Nr   r   s   &&r2   appendAppenderMixin.append  s     	D6"r5   c                    V ^8  d   QhRRRR/# r   r0   )r1   s   "r2   r3   re     s        2  $  r5   c                (    V P                  V4       R# )zRemove an item from this :class:`_orm.AppenderQuery`.

The given item will be removed from the parent instance's collection on
the next flush.

N)_remove_implr   s   &&r2   removeAppenderMixin.remove  s     	$r5   rw   rB   )rC   rD   rE   rF   __doc__rI   r\   r@   propertyrs   setterr   r   r   r   r   r   r   r   r   r   r   r   rG   __classcell__)rh   s   @r2   rV   rV   t   s     .2K*155& &   ^^ 02 /0 08 8;
0:%#%#   r5   rV   c                      ] tR tRtRtRtR# )r7   i$  zA dynamic query that supports basic collection storage operations.

Methods on :class:`.AppenderQuery` include all methods of
:class:`_orm.Query`, plus additional methods used for collection
persistence.


r0   N)rC   rD   rE   rF   r   rG   r0   r5   r2   r7   r7   $  s    r5   r7   c                    V ^8  d   QhRRRR/# )r'   clsr   r.   ztype[AppenderMixin[Any]]r0   )r1   s   "r2   r3   r3   /  s     B B# B": Br5   c                R    RV P                   ,           p\        V\        V 3RV /4      # )zAReturn a new class with AppenderQuery functionality layered over.AppenderrI   )rC   typerV   )r   names   & r2   rX   rX   /  s)    $D}c*]C,@AAr5   N)8r   
__future__r   typingr   r   r   r   r   r   r	   r
   r   r   r    r   r   r   r   r   ro   baser   r   r   rs   r   	writeonlyr   r   r   r   enginer   r   mapperr   r   r   r*   r   r   eventr    sql.elementsr!   r"   r%   r)   RelationshipPropertystrategy_forr`   rV   r7   rX   r0   r5   r2   <module>r      s   	 #                   # / - ' &  $6 $"!,T//3 /*=1 =: ##00i0@& & A&m ,R0 m `M"%uRy Br5   