+
    i                       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! ^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H0t0 ]'       dC   ^R$I1H2t2 ^R%IH3t3 ^R&I4H5t5 ^R'I6H7t7 ^R(I8H9t9 ^R)I:H;t; ^R*I<H=t= ^R+I>H?t? ^R,I@HAtA ^R-I%HBtB ^R.I)HCtC ]! R/]R07      tD]! R1]ER07      tF]P                  ! 4       tH]]I]]]I]3,          ,          3,          tJR2 R3 ltK]P                  ! R44      RYR5 l4       tM]P                  ! R6R7R87      ]P                  ! R44      RYR9 R: ll4       4       tOR; R< ltPR=R>R?R>R@R>RAR>RBRCRD]P`                  RE]P`                  RFRCRGRC/	RH RI lltQR=R>R?R>R@R>RAR>RJR>RBRCRD]P`                  RE]P`                  RFRCRGRC/
RK RL lltRRZRM ltSR[RN ltTRO tUR\RP ltVRQ tWRR tXRS tYRT tZRU t[ ! RV RW4      t\RX t]R># )]zprivate module containing functions used to convert database
rows into object instances and associated state.

the functions here are called primarily by Query, Mapper,
as well as some of the attribute loading strategies.

)annotations)Any)Dict)Iterable)List)Mapping)Optional)Sequence)Tuple)TYPE_CHECKING)TypeVar)Union)
attributes)exc)path_registry)_DEFER_FOR_STATE)_RAISE_FOR_STATE)_SET_DEFERRED_EXPIRED)PassiveFlag)FromStatement)ORMCompileState)QueryContext)SelectInLoader)	_none_set)	state_str)util)result_tuple)ChunkedIteratorResult)FrozenResult)SimpleResultMetaData)select)ForUpdateArg)LABEL_STYLE_TABLENAME_PLUS_COL)SelectState)
EMPTY_DICT)_IdentityKeyType)LoaderCallableStatus)	ORMOption)Mapper)Query)Session)InstanceState)CursorResult)_ExecuteOptions)Result)Select_T)bound_Oc               $    V ^8  d   QhRRRRRR/# )   cursorzCursorResult[Any]contextr   returnzResult[Any] )formats   "C:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO CLAUDE\MAESTRO\maestro-backend\venv\Lib\site-packages\sqlalchemy\orm\loading.py__annotate__r;   O   s'     Z Z' Z, Z; Z    c                  a aaaaa \        4       Sn        SP                  '       d   RoSP                  P                  Sn        M	Ro/ Sn        SP                  pVP
                  pSP                  P                  '       * ;'       d>    \        VP                  4      ^8H  ;'       d    VP                  ^ ,          P                  o \        \        SP                  P                   Uu. uF  pVP                  SS 4      NK  	  up!  4      w  orVSP                  '       d;   SP                  '       g   SP                   '       d   \"        P$                  ! R4      hR pRRRR/R lpSP                  P                   U	u. uF  p	SP                  '       d   TMT	P.                  '       gb   T	P0                  '       g   T	P2                  '       d>   T! T	P4                  P6                  SP                  P8                  T	P2                  R	7      MT	P.                  '       d   \:        MRNK  	  p
p	\=        XXT
R
7      pTT TTT3R lpSP>                  PA                  RR4      '       d   \        T! R4      4      oT3R lp\C        TTSS S PD                  PF                  R7      pTPH                  PK                  \M        TSR7      4      Tn$        SP                  PN                  '       d   R pRT3Tn(        SP                  '       d   TP                  SP                  4       T# u upi   \&         dQ    \(        P*                  ! 4       ;_uu_ 4        S P-                  4        RRR4        EK    + '       g   i      EL#; ii ; iu up	i )a  Return a :class:`.Result` given an ORM query context.

:param cursor: a :class:`.CursorResult`, generated by a statement
 which came from :class:`.ORMCompileState`

:param context: a :class:`.QueryContext` object

:return: a :class:`.Result` object representing ORM results

.. versionchanged:: 1.4 The instances() function now uses
   :class:`.Result` objects and has an all new interface.

FTzCan't use yield_per with eager loaders that require uniquing or row buffering, e.g. joinedload() against collections or subqueryload().  Consider the selectinload() strategy for better flexibility in loading objects.Nc                .    \         P                  ! R 4      h)z@Can't use the ORM yield_per feature in conjunction with unique()sa_excInvalidRequestError)entrys   &r:   
_no_uniqueinstances.<locals>._no_unique   s    ((N
 	
r<   legacy	uncertainc               Z   a aa V'       g
   V V3R  lpV# S'       g   \         # RoV3R lpV# )c                   < S'       d    \        V 4      # \        P                  ! R S: RS'       d   RMR R24      h    L,; i)z=Can't apply uniqueness to row tuple containing value of type z; z the values returned appear to bezthis datatype producesz non-hashable values)hashr@   rA   )objdatatyperF   s   &r:   go,instances.<locals>._not_hashable.<locals>.go   sZ    #Cy( 00&\$ ;5, *- s	   
> AFc                V   < S'       g    \        V 4      # \        V 4      #     M; iR oLT)rI   id)rJ   _use_ids   &r:   rL   rM      s3     #Cy( #w
 #Gs   
! %)rP   )rK   rE   rF   rL   rQ   s   f$d @r:   _not_hashable instances.<locals>._not_hashable   s+      IIG  Ir<   )rE   rF   )_unique_filtersc              3  8  <"    T p/ S
n         V'       d   SP                  V4      pV'       g   R# MSP                  4       pS'       d!   S^ ,          pV Uu. uF
  qC! V4      NK  	  ppM1V UUu. uF#  p\        S Uu. uF
  q3! V4      NK  	  up4      NK%  	  pppS'       d   V'       d$   \	        S
P
                  P                  4       4      pS
P
                  '       d]   \	        S
P
                  P                  4       4      pS
P
                  P                  4        V F  w  rV	P                  S
V4       K  	  Kn  V'       d6   S
P
                  P                  4        S
P
                  P                  X4       Vx  V'       d   EK  R# u upi u upi u uppi 5i)TN)
partials	fetchmany_raw_all_rowstuplelistpost_load_pathsitemsclearinvokeupdate)size	yield_perfetchprocrowrowstop_level_post_loads
post_loadspath	post_loadr6   r5   is_top_levelprocesssingle_entitys   &         r:   chunksinstances.<locals>.chunks   sg    I!G((3  ,,.qz-23UcS	U3 GLFKsE9499:e    ,0//557,( ---!%g&=&=&C&C&E!FJ++113+5!(($7 ,6 ++113++223GHJ9A 4 :sd   FFF
FF
'F/F=FF
F#F+4F A#F>FFFFprebuffer_rowsc                   < \        S4      # N)iter)r`   _prebuffereds   &r:   rm   rn     s    %%r<   )source_supports_scalarsrawdynamic_yield_per)filteredis_single_entityc                .    \         P                  ! R 4      h)z~The unique() method must be invoked on this Result, as it contains results that include joined eager loads against collectionsr?   )rJ   s   &r:   require_unique!instances.<locals>.require_unique  s    ,,& r<   ))
_new_runidrunidtop_level_contextr[   compile_state_has_mapper_entitiesload_options_only_return_tupleslen	_entitiessupports_single_entityrZ   ziprow_processorra   loaders_require_bufferingloaders_require_uniquingr@   rA   	Exceptionr   safe_reraisecloseuse_id_for_hash_non_hashable_value_null_column_typecolumntype_legacy_uniquingrP   r   execution_optionsgetr   r6   _is_server_side_attributesuniondictmulti_row_eager_loaders_unique_filter_state)r5   r6   r   rw   query_entitylabelsextrarC   rR   entunique_filtersrow_metadatarm   resultrz   rs   rj   rk   rl   s   ff             @@@@r:   	instancesr   O   s#    LGM   ")";";"K"K"$))M11H  444 	> 	>''(A-	> 	>##A&== #' )0(=(=(G(G(G !..w?(G$
 & ---///,,= 

)% )5 )x ((22#" 3C      +++000C4I4I4I JJOO"//@@!33 ...RD 3#  ( (~L0 0d   $$%5u== F4L)	& # - ..88F  ++11h?F
 444	 (,^&<#**+Mo$    LLN !   hsm   "L) *L$/L) 5L) L) NN,N>NANN$L) )(NM."N.N 9N Nzsqlalchemy.orm.contextc           
     |   \         P                  P                  pV'       d   V P                  4        VP                  P                  VRR7      pV P                  p RV n        \        VP                  4       UUu. uF$  w  rx\        WP                  4      '       g   K"  VNK&  	  p	ppVP                   U
u. uF  qP                  NK  	  pp
\        YP                   U
u. uF  qP                  NK  	  up
4      p. pVP                  4        F{  pV	 F[  pW,          f   K  V P                  \         P"                  ! W,          4      \         P$                  ! W,          4      V/ / R7      W&   K]  	  VP'                  V! V4      4       K}  	  VP)                  V4      W`n        # u uppi u up
i u up
i   Y`n        i ; i)aZ  Merge a :class:`_engine.FrozenResult` back into a :class:`_orm.Session`,
returning a new :class:`_engine.Result` object with :term:`persistent`
objects.

See the section :ref:`do_orm_execute_re_executing` for an example.

.. seealso::

    :ref:`do_orm_execute_re_executing`

    :meth:`_engine.Result.freeze`

    :class:`_engine.FrozenResult`

FrE   load
_recursive_resolve_conflict_map)r   	preloadedorm_context
_autoflushORMSelectCompileState_create_entities_collection	autoflush	enumerater   
isinstance_MapperEntity_label_namer   _extra_entitiesrewrite_rows_merger   instance_stateinstance_dictappendwith_new_rows)session	statementfrozen_resultr   querycontextctxr   iemapped_entitiesr   keyskeyed_tupler   newrows   &&&&           r:   merge_frozen_resultr   ,  s   " >>--L

,
,
H
H% I C !!I&! "#--0
0!778 A0 	 

 ,/==9=C=9"--@-3&&-@
 #002F$9( '"11&)<"00;!#%.0 !/ !FI % MM+f-. 3 **62%7

 : A& &sC   F3 <F# F#&F3 7F)F3  F.
4(F3 !A;F3 #F3 3F;z:func:`_orm.merge_result`zyThe function as well as the method on :class:`_orm.Query` is superseded by the :func:`_orm.merge_frozen_result` function.)alternativec               (    V ^8  d   QhRRRRRRRR/# )	r4   queryz
Query[Any]iteratorz>Union[FrozenResult, Iterable[Sequence[Any]], Iterable[object]]r   boolr7   z"Union[FrozenResult, Iterable[Any]]r8   )r9   s   "r:   r;   r;   n  s6     Q& Q&Q&LQ& Q& (	Q&r<   c                   \         P                  P                  pV P                  pV'       d   VP	                  4        \        V\        4      '       d   Tp\        VP                  4      pMRpVP                  P                  V RR7      pVP                  p RVn        V'       * ;'       d    \        VP                  4      ^8H  pV'       d   \        VP                  ^ ,          VP                  4      '       dP   V U	u. uFA  p	VP                  \         P"                  ! V	4      \         P$                  ! V	4      V/ / R7      NKC  	  p
p	EM6\'        V4      p
EM)\)        VP                  4       UUu. uF$  w  r\        WP                  4      '       g   K"  VNK&  	  ppp. p
VP                   Uu. uF  qP*                  NK  	  pp\-        YP                   Uu. uF  qP.                  NK  	  up4      pV F  p\'        V4      pV F_  pVV,          f   K  VP                  \         P"                  ! VV,          4      \         P$                  ! VV,          4      V/ / R7      VV&   Ka  	  V
P1                  V! V4      4       K  	  V'       d   VP3                  V
4      Wtn        # \        V
4      Wtn        # u up	i u uppi u upi u upi   Ytn        i ; i)zMerge a result into the given :class:`.Query` object's Session.

See :meth:`_orm.Query.merge_result` for top-level documentation on this
function.

NTr   Fr   )r   r   r   r   r   r   r   rr   datar   r   r   r   r   r   r   r   r   r   rZ   r   r   r   r   r   r   )r   r   r   r   r   r   r   r   rl   instancer   r   r   r   r   r   r   rd   r   s   &&&                r:   merge_resultr   h  s~   $ >>--LmmG (L)) **+

,
,
H
Hd I C !!I1&!))EEc#--.@A.E#--*L,F,FGG %-	 %- NN"11(;"00:!#%.0 #  %-  	 h &cmm44DAa!;!;< 4  
 F/2}}=}OO}D=&mmDms**mDK  c(Aay,$+NN&55fQi@&44VAY?!%')24 %3 %q	 ) k&12    ..v6 & <%W	 > E* &sh   K . K 1K  AJ1)K 0J6J6K -J<K K
*$K A5K 	K  
K 1K Kc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r4   r   r*   mapperz
Mapper[_O]keyz_IdentityKeyType[_O]passiver   r7   z)Union[LoaderCallableStatus, Optional[_O]]r8   )r9   s   "r:   r;   r;     s:     # ### 
# 	#
 /#r<   c                :   V P                   P                  V4      pVe   \        P                  ! V4      pVP                  '       d2   VP
                  P                  V4      '       g   \        P                  # VP                  '       da   V\        P                  ,          '       g   \        P                  # V\        P                  ,          '       g   V#  VP                  WS4       V# V# R#   \        P                   d    T P                  T.4        R# i ; i)ziLook up the given key in the given session's identity map,
check the object for expired state if found.

N)identity_mapr   r   r   inheritsr   isaPASSIVE_CLASS_MISMATCHexpiredSQL_OKPASSIVE_NO_RESULTRELATED_OBJECT_OK_load_expiredorm_excObjectDeletedError_remove_newly_deleted)r   r   r   r   r   states   &&&&  r:   get_from_identityr     s     ##'',H))(3???5<<#3#3F#;#;444 ===Z....!333z;;;;
  ##E3 x -- --ug6s   C/ /'DDr   Nrefresh_statewith_for_updateonly_load_propsno_autoflushFbind_argumentsr   require_pk_colsis_user_refreshc               H    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRR/# )r4   r   r*   r   Union[Select, FromStatement]r   zOptional[_IdentityKeyType]r   Optional[Sequence[ORMOption]]r   Optional[InstanceState[Any]]r   Optional[ForUpdateArg]r   Optional[Iterable[str]]r   r   r   Mapping[str, Any]r   r-   r   r   r8   )r9   s   "r:   r;   r;     s     $ $$+$ 
$$
 0$ 0$ ,$ -$ $ &$ '$ $ $r<   c       	        f    Ve   V^,          pV^,          pMR;r\        V VVVVVVVVVV	V
VR7      # )z.Load the given identity key from the database.N)
r   r   r   r   identity_tokenr   r   r   r   r   )load_on_pk_identity)r   r   r   r   r   r   r   r   r   r   r   r   identr   s   &&&$$$$$$$$$  r:   load_on_identr     sW      AQ!%%!#''%!%+'' r<   r   c               L    V ^8  d   QhRRRRRRRRR	R
RRRRRRRRRRRRRRRR/# )r4   r   r*   r   r   primary_key_identityzOptional[Tuple[Any, ...]]r   r   r   r   r   r   r   r   r   zOptional[Any]r   r   r   r   r   r-   r   r   r8   )r9   s   "r:   r;   r;     s     u uu+u 4u
 0u 0u ,u -u "u u &u 'u u ur<   c       
   
        TpVP                  4       pVP                  '       d   Q hVf   \        P                  pVP                  \
        P                  J d   \        P                  pMVP                  pVEe   VP                  R,          pVP                  w  ppRV9   d   \        VP                  V4       UUu0 uF  w  ppVe   K  VV,          P                  kK!  	  ppp\        P                  ! VV4      p\!        V4      \!        V4      8X  d   \"        P$                  ! R4       \        P&                  ! VRR/4      3Vn        \        VVP                  4       UUu/ uF  w  ppVV,          P                  VbK  	  pppMRpVe
   RpW^n        M$VP*                  e   RpVP*                  Vn        MRpV'       Ed   V'       Ed   V'       g   \,        P.                  ! R4      hVP0                  P2                  pVP5                  V4       Uu0 uF8  pVP6                  V,          P8                  P;                  4       '       g   K6  VkK:  	  ppV'       d(   \,        P<                  ! RV R	VP0                   R
24      hVP0                  P>                  pV F/  pVV,          P@                  '       g   K  VPC                  V4      p M	  V'       dL   VPD                  '       d:   VRVPF                  PH                  /,          pVPJ                  ! VPD                  !  p\M        VVVVVVVR7      w  ppVVn        RVn'        V'       d   VRR/,          p\"        PP                  PS                  V
RV/4      p
V PU                  VVV
V	R7      PW                  4       PY                  4       p  V P[                  4       # u uppi u uppi u upi   \\        P^                   d     R# i ; i)z6Load the given primary key identity from the database.Nplugin_subjectzofully NULL primary key identity cannot load any object.  This condition may raise an error in a future release.
_orm_adaptTFz9refresh_state is required when require_pk_cols is presentz7Please flush pending primary key changes on attributes z for mapper z! before proceeding with a refresh_current_path)version_checkr   r   r   r   r   _sa_orm_load_options)paramsr   r   )0_clone_is_lambda_elementr   default_load_options_compile_optionsr#   default_select_compile_optionsr   default_compile_options_propagate_attrs_get_clauser   primary_keyr   sql_utiladapt_criterion_to_nullr   r   warn_deep_annotate_where_criteria_for_update_argr@   ArgumentErrorr   _primary_key_propkeys
differenceattrshistoryhas_changesrA   _props_is_relationshipr   r   	load_pathparentoptions_set_get_options	_order_byr$   
merge_withexecuteuniquescalarsoner   NoResultFound)!r   r   r   r   r   r   r   r   r   r   r   r   r   r   qcompile_optionsr   r  _get_paramscolvaluenonesid_valr  r   r   refresh_state_prokeysr   r  mppnew_compile_optionsr   s!   &&&$$$$$$$$$$                    r:   r   r     s   $ EA######88 	""55	6 *AA#44'''(89%+%7%7"k '' #&f&8&8:N"O"OJC %C $$"O   #::;NK5zS!566		 ##K,1EF
 (+$f&8&8(
(# $((&0( 	 
 "+				*!11??&&K  !. 4 4 J J -77H
H""3'//;;= CH 	 

  ,,-|M,@,@+A B,, D !!(( A!u%%%"7"="=o"N !
 333O]-D-D-K-KLLII}112(8#'#%')% -AAKu--222LA 	/)	 	 	
 
	 zz|S&
2
|    s0   =	N:N:# O 3OO*O O$#O$c                    / p/ p	V'       d   W9R &   V'       d   W)R&   V'       d
   WYR&   RVR&   V'       d   \        V4      VR&   V'       d   WiR&   V'       d   WyR&   V	'       d	   W,          pV'       d	   W,          p W3# )_version_check_populate_existing_refresh_stateT_for_refresh_state_only_load_props_identity_token_is_user_refresh)	frozenset)
compile_optload_optpopulate_existingr   r   r   r   r   r!  r   s
   &&&&&&&&  r:   r  r    s     OL)6%&->)*)6%&04,-.7.H*+*8&'+:'( &  r<   c	                   V'       d   VP                  V4      p
MVP                  p
/ pVP                  V P                  R V4       T;'       d*    \	        V4      ^8H  ;'       d    VR,          P
                  pV
 F<  pV'       d   VP                  V9  d   K  VP                  ! V VVV3RVRVRVRV/V	B  K>  	  VeC   WP                  Jd2   V'       d   VP                  V,          pMTpVP                  V4       R# R# R# )memoized_setupsr   column_collectionmemoized_populatorscheck_for_adaptN)_iterate_polymorphic_properties_polymorphic_propertiessetr   r   is_aliased_classr   setuppolymorphic_oncolumnsr   )r   r   r   rh   adapterr9  with_polymorphicr   polymorphic_discriminatorkwpoly_propertiesquick_populatorsr;  r$  pds   &&&&&&&&&,     r:   _setup_entity_queryrK    s     @@
 !88HH]%%'8:JK NN#d)q.NNT"X5N5NO uyy?	
	

 ,
	
 0
	
 !1
	
 ,
	
 
	
 !  	"-%-B-BB!:;B*B  $ C 	.r<   c                N    \         P                  ! R \        V 4      : R24       R# )zLoading context for aW   has changed within a load/refresh handler, suggesting a row refresh operation took place. If this event handler is expected to be emitting row refresh operations within an existing load or refresh operation, set restore_load_context=True when establishing the listener to ensure the context remains unchanged when the event handler completes.N)r   r	  r   )r   s   &r:   _warn_for_runid_changedrM     s    II !*% 0	3r<   c
                  aaaaa"a#a$a%a&a'a(a)a*a+a,a-a.a/a0a1a2a3a4a5a6 SP                   o"SP                  p
RS3pVP                  V
P                  VR4      pVEf6   SP                  pSe   VP                  V3R lS 4       4      pVP                  SP                  R\        4      p. pR. R. R. R. R	. R
. /pSfI   SP                  pV'       d#   V Uu. uF  pVP                  V,          NK  	  ppVP                  V4      o.MRo.RVRVRS./pV EF`  pVV9   EdD   VV,          pV\        J d1   VR,          P                  VP                  VP                  34       KO  V\        J d'   VR,          P                  VP                  R34       K  V\        J d1   VR,          P                  VP                  VP                   34       K  RpV'       d*   VP                  V,          pVe   VP#                  VR4      pV'       g   VP#                  VR4      pV'       d(   VR,          P                  VP                  V34       EK5  VP%                  SV VSVVV4       EKO  VP                  V4       EKc  	  VP'                  V
P                  W4       VR,          pVP)                  4        UUu/ uF  w  ppV\+        V4      bK  	  uppo,VR,           F  pVP%                  SWSW5S,4       K  	  SP,                  o/SP                  P.                  P0                  '       d   SP                  P.                  V,           MTo(SP2                  P4                  o4SP6                  ;'       g    SP8                  o+\;        SP<                  P>                  P@                  4      o'\;        SP<                  P>                  PB                  4      o0\;        SP2                  P>                  PD                  4      o*S*'       d!   SP2                  P>                  PD                  o)\        PF                  o%\        PH                  o$SP2                  PJ                  o3SPL                  o2SPN                  o#SPP                  o5S5'       d@   SPR                  pVe.   V'       d   VP                  V,          pVP#                  V4      o6MRo6S'       Eg6   V	Ee1   RVP0                  3pVSP                  9   dH   SP                  V,          PT                  R8X  d&   SP                  V,          PV                  R,          pMRpSPY                  VV	4      pV'       d   VV	Jd   Se   Q hVPZ                  '       d3   . pTpV'       d&   VV	Jd    VP                  V4       VP\                  pK-  MV.pV FU  p\^        Pa                  SS(V4      '       d   K"  \c        SVVV	V4      p\^        Pe                  SS(VPf                  VVV4       KW  	  \^        Pi                  SS(S4      o-S'       d#   SP                  o1S1f   SPk                  S4      o1MRo1VR,          o.SPl                  '       d   \n        Pp                  o&M\n        P
                  o&VV"V#V$V%V&V'V(V)VVV*V+V,V-V.V/V0V1VV2V3V4V5V63R lp SPr                  '       d-   V	'       g%   S'       g   V"V#V&V.3R lp!\u        V SV SVVVVV!4	      p V # u upi u uppi )zYProduce a mapper level row processor callable
which processes rows into mapped instances.gettersNc              3  J   <"   T F  pSP                   V,          x  K  	  R # 5irq   )r  ).0kr   s   & r:   	<genexpr>&_instance_processor.<locals>.<genexpr>V  s       '*9Qa  /s    #r8  newquickdeferredexpireexistingeagercached_populatorstodoprimary_key_getterFloaderentitiesc                L  < S'       d/   SpVP                  4       pS! V4      pVP                  S 8g  pR pRpMSS! V 4      S3pS"P                  V4      pVeP   S! V4      pS! V4      pVP                  S 8g  pV'       * pRpS#'       d   S$'       d   V'       g   \        SWV S$4       MlS! V^,          4      '       d   R# R pR pR pSP                  P                  4       pS! V4      pS! V4      pWqn        SVn        S!Vn        S"P                  W4       SpSVJ d   R pV'       g
   V'       Ed   V'       d   S'       g	   V'       g   SVn
        SVn        \        SV VVVSVVS4	       V'       Ed1   VP                  p	V'       d   S'       dC   VP                  P                  P                  VS4       VP                  V	8w  d   \!        V4       S'       d0   S! SP"                  V4       VP                  V	8w  d   \!        V4       MKS'       dD   VP                  P                  P%                  VSS4       VP                  S 8w  d   \!        V4       V'       g   VP&                  '       d6   S'       d   S'       d   VP)                  VS4       MVP+                  VS"4       S'       d   SP-                  VR 4       V# VP.                  p
VSP0                  9  pV'       d   V
'       g   SR,          '       d   \3        SV VVVSV
S4      pV'       di   S'       dP   VP                  p	VP                  P                  P%                  VSV4       VP                  V	8w  d   \!        V4       VP)                  W;4       S'       d%   SP4                  '       d   SP-                  VR4       V# )TFNrZ  )rJ   r}   r   _validate_version_idclass_managernew_instancer   r   
session_id_add_unpresentr   r  _populate_fullmanagerdispatchr   rM  r   refreshmodified_commit_commit_all	add_stateunloadedrV   _populate_partialinvoke_all_eagers)%rd   r   r   dict_isnewcurrentloadloaded_instanceidentitykeyeffective_populate_existingexisting_runidrn  to_loadr6   identity_classr   r   r   is_not_primary_keyload_evtr  loaded_as_persistentr   r   persistent_evtr6  
populatorsri   r]  propagated_loader_optionsrefresh_evtrefresh_identity_keyr   r}   rd  session_identity_mapr   version_id_getters%   &           r:   	_instance&_instance_processor.<locals>._instance,  s(   !Eyy{H!(+EKK5(EK#O
 "3'K ,//<H#&x0%h/u,"'i"' %6{(c3D &k!n55""&!//<<>%h/&x0'	'5$ $. $33EG&7#E!*.'
 55 )1L%>""++
 u "'"..33E7C ;;.83E:%,W__eD ;;.83E: MM**22w {{e+/6.%...$e_=))%1EF##E40J ? ~~H!1!11EH
7(;(;
 ,	 ")...66ugwO ;;.83E:MM%1W666##E51r<   c                L   < SS! V 4      S3pS! V^,          4      '       g   V# R# )   Nr8   )rd   ru  ry  r   rz  r]  s   & r:   ensure_no_pk)_instance_processor.<locals>.ensure_no_pk  s2    "3'K
 &k!n55""r<   ))selectinload_polymorphicT);_identity_classr   r   r   	_prop_setintersectionr$   r  rC  _tuple_getterr   r   r   _deferred_column_loaderr   r   _raise_column_loader_gettercreate_row_processorr?  r\   rZ   r  current_pathrh   r   r   r6  always_refreshr   rb  rh  r   ri  r|  r   r   hash_keyr}   r   r   version_id_colstrategy
local_opts_should_selectin_load	is_mapperr   PostLoadpath_exists_load_subclass_via_incallable_for_pathr   for_context_identity_key_from_stateallow_partial_pksr   
issupersetpolymorphic_map_decorate_polymorphic_switch)7r   r   r6   r   rh   rD  r   r   rF  _polymorphic_fromr   
getter_keyrO  propsrI  r\  r[  pk_colscpropr#  getteradapted_colr   r$  r  option_entitiesselectin_load_via_load_supers_endmost_mapper_selectinload_entity	callable_r  r  ry  r   r   r   rz  r{  r  r|  r}  r6  r~  ri   r]  r  r  r  r}   rd  r  r   r  s7   &ff&&&ff&&                        @@@@@@@@@@@@@@@@@@@@@r:   _instance_processorr  ,  sn   * ++N))M V$Jhh}//TBG   &&& '*9' E  88 1:
 2RbR
  ((G7>?w!7??1--w?!'!5!5g!>!%  !2D "4

 D''&t,**%e,334#?#?@ 11 &h/66%7HI,,%e,334#<#<= "F* '.ooc&:&2%+^^K%GF!!'U!;)'299488V:LM
 11#( ""#- D!A D 	)):? 345F5L5L5NO5NzsE#tE{"5NOJ!!\*	
  
 !( A A   --222 	**T1  #??7711JJV5J5JF((11667Hv++44<<=K'//22GGHN&77LL..N,,M))JMME++N))M..%!(!@ &~ > $=.:#'$$$););C)@)I)I N
 *
 &005@@LO"O"88

 !2:K!K #*** ***!"3#'/@@ ''8&5&>&>O 12(4$''Y(<  1(%#	 **(//(( )5* $$WiII,00' $*#B#B$   $$%9:&11&33^ ^ ^ ^@ &7		 		 1%

	 s @` Ps   [)[c                8  aaa	a
aa VP                   o
VP                   pVP                  R Jp\        S
P                  P                  4      ^8H  oVP
                  '       g	   V'       d   S
P                  W#4      w  oo	oMS
P                  w  oo	oVV	V
VVV3R lpV# )Nc                  < S'       gD   V UUu. uF+  w  rVVP                   P                  S4      '       g   K(  WV3NK-  	  pppV'       g   R # V P                  pVP                  '       d$   SP	                  V4      pSP	                  V4      p	MSpSp	V3VP
                  ,           V	3,           p
SP                  ! V
!  pV P                  P                  Vn	        V;P                  RVP                  /,          un	        V P                  '       d   VP                  RR7      pV'       d   V^ \        P                   pV\        P                  R  pV P                  P                  T\!        V UUu. uF:  w  rS'       d   VP"                  ^,          ^ ,          MVP"                  ^,          NK<  	  uppR7      4      P%                  4       P'                  4       P)                  4        K  R # u uppi u uppi )Nr   T)r6  )primary_keys)r   +_would_selectin_load_only_from_given_mapperr   r  _prepend_path_with_optionsr  r   r  r  r6  r   r   
_chunksizer   r  r   r   r  r  all)r6   rh   states	load_onlyeffective_entitysv
orig_queryenable_opt_lcldisable_opt_lclr  q2chunkr   
load_attrsdisable_opt
enable_optr   r  r   zero_idxs   &&&&&          r:   do_load&_load_subclass_via_in.<locals>.do_load  s    #"DA88GGO "   ]]
;;;'55d;N)77=O'N)O
 8 88O;MM 	 YY %33KK
==$$$%%%=B1~889EN5578FOO## 27"16-E ,4		!Q1E16" fhwwy ;F"s   %G+G+0A G1)r   r   r   base_mapperr  r@  _subclass_load_via_in_subclass_load_via_in_mapper)r6   rh   entitypolymorphic_fromr  polymorphic_from_mappernot_against_basemostr  r  r  r   r   r  s   &&&&f   @@@@@r:   r  r    s     ]]F
 /552;;4G6%%112a7H"6%+%A%A&
":{ &,%H%H":{/' /'b Nr<   c	                   V'       d   V P                   Vn         VR ,           F  w  rV
! V4      W9&   K  	  V'       dK   VR,           F<  w  rVP                  V	R4       V'       g   K!  VP                  P                  V	4       K>  	  M7VR,           F*  w  rV'       g   K  VP                  P                  V	4       K,  	  VR,           F  w  rV! W#V4       K  	  R# WRP                  8w  dH   WRn        VR ,           F  w  rW9  g   K  V
! V4      W9&   K  	  VR,           F  w  rV! W#V4       K  	  R# VR,           F  w  rV! W#V4       K  	  R# )rV  rX  NrU  rY  )r}   popexpired_attributesaddr  )r6   rd   r   rq  rr  r  rt  r6  r~  r   r  set_callable	populators   &&&&&&&&&    r:   rf  rf  1  s:    mm%g..KCEJ /%/%9%9!		#t$<,,005 &:
 &0%9%9!<,,005 &: )//NCeC( 0 
oo	% $ &g..KC#C[
 /
 )44NCeC( 5 )44NCeC( 5r<   c                r   V'       gd   V'       d%   VR ,           F  w  rW9   g   K  V	! V4      W8&   K  	  V P                   V,          p
VR,           F  w  rW9   g   K  V! W#V4       K  	  MTp
WP                   V&   VR ,           F  w  rW9   g   K  V	! V4      W8&   K  	  VR,           FD  w  rW9   g   K  VP                  VR4       V'       g   K)  VP                  P                  V4       KF  	  VR,           F  w  rW9   g   K  V! W#V4       K  	  VR,           F  w  rW9  g   K  V! W#V4       K  	  V
# )rV  rY  rX  NrU  rZ  )rV   r  r  r  )r6   rd   r   rq  rr  r  rn  r~  r   r  rx  r  r  s   &&&&&&&&     r:   ro  ro  j  s1    )'22?!'EJ  3 ""5)(44NC~%, 5 ")%g..KC~#C[
 / ",H!5!5C~		#t$<,,005	 "6
 )//NC~%, 0 %W--eC( . Nr<   c           
         V P                  WV P                  4      V! V4      8w  dM   \        P                  ! R \	        V4      : RV P                  WV P                  4      : RV! V4      : R24      hR# )z
Instance 'z' has version id 'z3' which does not match database-loaded version id 'z'.N)_get_state_attr_by_columnr  r   StaleDataErrorr   )r   r   rq  rd   r  s   &&&&&r:   ra  ra    sr    ''f++	 $$ % 00&"7"7 s

 
	
r<   c	                   a aaaaaaaaaa Ve   VoMSP                   oSf   S # S'       d   SP                  S,          oVVVVVV3R lp	\        P                  ! V	4      oSP	                  S4      oVVV VVV3R lp
V
# )Nc           
        <  SP                   V ,          pVSJ d   R # VP                  S4      '       g   R# \        SVSSSSSR7      #   \         d    \	        RT ,          4      hi ; i)NF)r  z*No such polymorphic_identity %r is defined)r  r   r  KeyErrorAssertionError)discriminator
sub_mapperrD  r6   r   rh   r   r   s   & r:   configure_subclass_mapper?_decorate_polymorphic_switch.<locals>.configure_subclass_mapper  s    	//>J V#^^F++&"(   	 <}L 	s   A	 	A'c           
     ^  < S! V 4      pVeq   SV,          pV'       d	   V! V 4      # VRJ dJ   S! V 4      pV'       d8   \         P                  ! RV: RS	: RSP                  V,          : RS: 24      hR # S! V 4      # S! V 4      pV'       d    \         P                  ! RV: RS	: R24      hR # )NFzRow with identity key zG can't be loaded into an object; the polymorphic discriminator column 'z' refers to z-, which is not a sub-mapper of the requested z	' is NULL)r@   rA   r  )
rd   r  r  ru  r  r  instance_fnr   polymorphic_instancesrB  s
   &   r:   polymorphic_instance:_decorate_polymorphic_switch.<locals>.polymorphic_instance  s    s$-m<I ~%e#*3/ 44 (*"22=AA"	   "3''&s+K00 *>;  r<   )rB  rC  r   PopulateDictr  )r  r6   r   r   r   rh   rF  rD  r  r  r  r  r  rB  s   ffffff&ff  @@@r:   r  r    sx     !,2.. 8 . !--.GH^^N+F$ $L  r<   c                  `    ] tR tRtRtRtR tR tR t]	R 4       t
]	R 4       t]	R 4       tR	tR
# )r  i  z4Track loaders and states for "post load" operations.c                	V    / V n         \        P                  ! 4       V n        R V n        R # rq   )loadersr   OrderedDictr  	load_keys)selfs   &r:   __init__PostLoad.__init__  s     &&(r<   c                	"    W P                   V&   R # rq   )r  )r  r   	overwrites   &&&r:   rm  PostLoad.add_state  s    
 'Er<   c                	   V P                   '       g   R # \        P                  P                  V4      pV P                  P                  4        F  w  ppppppV P                   P                  4        U	U
u. uF5  w  rV	P                  P                  P                  V4      '       g   K2  W3NK7  	  pp	p
V'       g   Ko  V! W2WP                  .VO5/ VB  K  	  V P                   P                  4        R # u up
p	i rq   )r  r   PathRegistrycoercer  valuesr\   rg  r   r   r  r]   )r  r6   rh   effective_contexttokenlimit_to_mapperr^  argrG  r   r  r  s   &&&         r:   r^   PostLoad.invoke
  s    {{{))006 \\  "
 )-(9(9(;(;$E==''++O< #"(;  
 v%V^^FIMO # 	s   5/C4)C4c                	t    VP                   P                  VP                  4      pVe   V'       d   W4n        V# rq   )r[   r   rh   r  )clsr6   rh   r   pls   &&&& r:   r  PostLoad.for_context!  s-    $$((3>o*L	r<   c                	    VP                   VP                  9   ;'       d*    W1P                  VP                   ,          P                  9   # rq   )rh   r[   r  )r  r6   rh   r   s   &&&&r:   r  PostLoad.path_exists(  sB     II000 B B..tyy9AAA	
r<   c                	    VP                   VP                  9   d   VP                  VP                   ,          pM"\        4       ;qP                  VP                   &   VVVVVV3VP                  V&   R # rq   )rh   r[   r  r  )	r   r6   rh   r  r  loader_callabler  rG  r  s	   &&&&&&*, r:   r  PostLoad.callable_for_path/  se     99///((3B6>j@B((3


5r<   )r  r  r  N)r  r  r  )__name__
__module____qualname____firstlineno____doc__	__slots__r  rm  r^   classmethodr  r  r  __static_attributes__r8   r<   r:   r  r    sU    >0I
'.   
 
 
 
r<   r  c           	        VP                   pV'       g'   \        P                  ! R\        V4      ,          4      h\	        V\
        P                  ,          4      pV'       d*   VP                  V P                  P                  4       4      pV P                  '       dD   V P                  '       g2   V P                  W4      pVe   \        W4      p\        VVRVVVR7      # \	        VP                  4      pV'       d   VP                  p	MV P                    U
u. uF  qP"                  V
,          P                  NK!  	  pp
VP$                  P                  V4      '       d'   \&        P(                  ! R\        V4      ,          4      hV P+                  V4      p	\,        P.                  ! V	4      '       d   V P0                  '       d   \,        P2                  ! V	4      '       d#   \4        P6                  ! R\        V4      4       R# \        V\9        V 4      P;                  \<        4      V	VVVR7      pV'       d   Vf   \        P>                  ! V4      hR# R# u up
i )z4initiate a column-based attribute refresh operation.zQInstance %s is not bound to a Session; attribute refresh operation cannot proceedN)r   r   r   z_Instance %s cannot be refreshed - it's not  persistent and does not contain a full primary key.zwInstance %s to be refreshed doesn't contain a full primary key - can't be refreshed (and shouldn't be expired, either).)r   r   r   ) r   r   DetachedInstanceErrorr   r   r   NO_AUTOFLUSHr  r  r   r   concrete_optimized_get_statementr   r   r   r  _columntopropertyr  r@   rA   r  r   issubsetr  r  r   warn_limitedr    set_label_styler"   r   )r   r   attribute_namesr   r   r   r   stmthas_keyidentity_keyr#  pk_attrsr   s   &&&&         r:   load_scalar_attributesr  A  s    mmG++9<Ee<LN
 	

 *"9"99:L )66v||7H7H7JKv 33EK	  !3D  /#)  599oGyy :@9K9K
9K#$$S)--9K 	 
 ##00::,,.09%0@A 
 66u= 	<((1I1I1I			l	+	+2 e		
 	v&&'EF'!F 6>((// "wC
s   %IrO   )NNNNNN)NNN)NNNN)^r  
__future__r   typingr   r   r   r   r   r   r	   r
   r   r   r    r   r   r   r   baser   r   r   r   r6   r   r   r   
strategiesr   r   r   r   r@   enginer   engine.resultr   r   r   sqlr    r  sql.selectabler!   r"   r#   r$   _typingr%   r&   
interfacesr'   r   r(   r   r)   r   r*   r   r+   engine.cursorr,   engine.interfacesr-   r.   r/   r0   objectr2   counterr|   str_PopulatorDictr   preload_moduler   became_legacy_20r   r   r   r   r  rK  rM  r  r  rf  ro  ra  r  r  r  r8   r<   r:   <module>r2     s~   #                " " '  " $ ! &     ! 1 ( 0  " ) ; ( )*% $,3&TT \\^
 c4c3h001Zz -.8& /8&v F
 -.Q& /Q&h#L$
 37$ 37$ /3$ 04$ $ )-$ *.$ "$ "$Nu
 37u 37u /3u 04u %)u u )-u *.u "u "up!D4%n	zzEP3)r"J
"V rE
 E
PU0r<   