+
    in%                   H   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,H/t/ ^R%IH0t0 ^R&I1H2t2 ]
'       dI   ^R'I3H4t4 ^R(I3H5t5 ^R)I3H6t6 ^R*I7H8t8 ^R+I9H:t: ^R,I9H;t; ^R-I9H<t< ^R.I9H=t= ^R/I>H?t? ^R0IH@t@ ^R1IHAtA ^R2IBHCtC ]! R3]DR47      tE]	R5R6R7R6/R8 R9 ll4       tF]	R5R6R7R6/R: R; ll4       tFR5R<R7R</R= R> lltF]	R?R6R@RA/RB RC ll4       tG]	R?R6R@RA/RD RE ll4       tGR?R<R@RA/RF RG lltGRH tH ! RI RJ]4      tI ! RK RL]I4      tJ]*P                  ! RMRN4       ! RO RP]I].4      4       tL]*P                  ! RMRQ4       ! RR RS]J]/4      4       tM]*P                  ! RMRT4       ! RU RV]J]-4      4       tNR<# )Wzoadditional ORM persistence classes related to "bulk" operations,
specifically outside of the flush() process.

)annotations)Any)cast)Dict)Iterable)Optional)overload)TYPE_CHECKING)TypeVar)Union)
attributes)context)	evaluator)exc)loading)persistence)NO_VALUE)AbstractORMCompileState)FromStatement)ORMFromStatementCompileState)QueryContext)util)Dialect)result)	coercions)dml)
expression)roles)select)sqltypes)_entity_namespace_key)CompileState)Options)DeleteDMLState)InsertDMLState)UpdateDMLState)
EMPTY_DICT)Literal)DMLStrategyArgument)OrmExecuteOptionsParameter)SynchronizeSessionArgument)Mapper)_BindArguments)ORMExecuteState)Session)SessionTransaction)InstanceState)
Connection)cursor)_CoreAnyExecuteParams_O)bounduse_orm_insert_stmt.execution_optionsc               <    V ^8  d   QhRRRRRRRRR	RR
RRRRRRR/	# )   mapper
Mapper[_O]mappings<Union[Iterable[InstanceState[_O]], Iterable[Dict[str, Any]]]session_transactionr/   isstatesboolreturn_defaultsrender_nullsr6   Literal[None]r7   $Optional[OrmExecuteOptionsParameter]returnNone )formats   "ڈC:\Users\petid\OneDrive\Desktop\Maestro\MAESTRO CLAUDE\MAESTRO\maestro-backend\venv\Lib\site-packages\sqlalchemy\orm\bulk_persistence.py__annotate__rJ   K   sb     
 

J
 ,

 
 
 
 '
 <
 

    c                   R # NrG   r:   r<   r>   r?   rA   rB   r6   r7   s   &&&$$$$$rI   _bulk_insertrO   J   s     rK   c               <    V ^8  d   QhRRRRRRRRR	RR
RRRRRRR/	# )r9   r:   r;   r<   r=   r>   r/   r?   r@   rA   rB   r6   Optional[dml.Insert]r7   rD   rE   zcursor.CursorResult[Any]rG   )rH   s   "rI   rJ   rJ   Y   sb     
# 
#
#J
# ,
#
 
# 
# 
# .
# <
# 
#rK   c                   R # rM   rG   rN   s   &&&$$$$$rI   rO   rO   X   s      #rK   Nc               <    V ^8  d   QhRRRRRRRRR	RR
RRRRRRR/	# )r9   r:   r;   r<   r=   r>   r/   r?   r@   rA   rB   r6   rQ   r7   rD   rE   z"Optional[cursor.CursorResult[Any]]rG   )rH   s   "rI   rJ   rJ   f   sm     U UUJU ,U
 U U U .U <U (UrK   c                 a a S P                   pVP                  P                  '       d   \        R 4      hV'       d   \        '       d'   \        \        \        \        ,          ,          V4      pV'       d3   V U	u. uF  qV	P                  3NK  	  p
p	V
 U	Uu. uF  w  rVNK	  	  pp	pMV U	u. uF  qP                  NK  	  pp	Mr\        '       d-   \        \        \        \        \        3,          ,          V4      pV'       d   \        V4      pMV Uu. uF  p\        V4      NK  	  pp\        S V4       VP                  V4      oRpVP                   P#                  4        UUu. uF  w  rVS P$                  9   g   K  W3NK  	  pppV'       d   RpM\'        V4      ^8  d   RpMRpV F  w  ppVeE   VP)                  4        Uu. uF)  pVP*                  V^ ,          9   g   K  VP*                  NK+  	  upMRpVV 3R l\,        P.                  ! VVV 3R lV 4       RVVVR7       4       p\,        P0                  ! VRVVVVVVR7      pVf   K  VP2                  '       d   Vf   TpK  VP4                  '       g   K  V'       g   Q hVP7                  V4      pK  	  V'       do   V'       dg   S P8                  pS P:                   Uu. uF  pVP*                  NK  	  ppX
 F/  w  rT\=        V Uu. uF  pVV,          NK  	  up4      R3V	n        K1  	  Ve	   Vf   Q hV# R# u up	i u upp	i u up	i u upi u uppi u upi u upi u upi )	zJconnection_callable / per-instance sharding not supported in bulk_insert()NTFc           	   3  J   <"   T F  w  ppppppppR VVS
S	VVV3x  K  	  R # 5irM   rG   ).0state
state_dictparamsmpconnvalue_paramshas_all_pkshas_all_defaults
connectionr:   s   &        rI   	<genexpr>_bulk_insert.<locals>.<genexpr>   sQ      
(	 #  	&s    #c              3  0   <"   T F  pR VSS3x  K  	  R # 5irM   rG   rV   mappingr_   r:   s   & rI   r`   ra      s     MH$4Hs   )bulkrA   rB   include_bulk_keys)bookkeepingr6   r7   rG   )base_mappersessionconnection_callableNotImplementedErrorr	   r   r   r0   r4   dictr   strr   list_expand_compositesr_   _sorted_tablesitems_pks_by_tablelen_get_embedded_bindparamskeyr   _collect_insert_commands_emit_insert_statements
_returningreturns_rowssplice_horizontally_identity_class_identity_key_propstuple)r:   r<   r>   r?   rA   rB   r6   r7   rh   rW   statesdict_mreturn_resulttablerZ   mappers_to_runrg   super_mapperbextra_bp_namesrecordsr   identity_clspidentity_propsru   r_   s   f&&$$$$$                   @rI   rO   rO   f   s    $$K""666!-
 	

 =H]2%67BH7?@xeejj)xF@4:;F.5FH;H089u

H9H=HT#s(^4h?H H~H *22AQH268,$//<J8<M %3399;;IEF((( 	;   	^	q	  -| #. -EEGGA55HQK' G  	
( 55MHM +)"0)
< 44# 3/	
 *&111]5J &$$$""{ - A A& I  .B 8--)/)C)CD)CA!%%)CD"LE^<^cuSzz^<=EI # &((( 'u A;9( 34t E =s<   <L$L).L/L4'L9L9	L?(L?
M2M	use_orm_update_stmtenable_check_rowcountTc               8    V ^8  d   QhRRRRRRRRR	RR
RRRRR/# )r9   r:   Mapper[Any]r<   r=   r>   r/   r?   r@   update_changed_onlyr   rC   r   rE   rF   rG   )rH   s   "rI   rJ   rJ      sX     	 		J	 ,	
 	 	 '	  	 
	rK   c                   R # rM   rG   r:   r<   r>   r?   r   r   r   s   &&&$$$$rI   _bulk_updater      s     rK   c               8    V ^8  d   QhRRRRRRRRR	RR
RRRRR/# )r9   r:   r   r<   r=   r>   r/   r?   r@   r   r   Optional[dml.Update]r   rE   z_result.Result[Any]rG   )rH   s   "rI   rJ   rJ     sX     	 		J	 ,	
 	 	 .	  	 	rK   c                   R # rM   rG   r   s   &&&$$$$rI   r   r     s     rK   c               8    V ^8  d   QhRRRRRRRRR	RR
RRRRR/# )r9   r:   r   r<   r=   r>   r/   r?   r@   r   r   r   r   rE   zOptional[_result.Result[Any]]rG   )rH   s   "rI   rJ   rJ     sb     Y% Y%Y%JY% ,Y%
 Y% Y% .Y%  Y% #Y%rK   c                 a aa S P                   pS P                  oS P                  '       d'   S P                  P                  0P	                  S4      oV3R  lpV'       d<   V'       d   V U	u. uF  q! S V	4      NK  	  pp	MAV U	u. uF  qP
                  NK  	  pp	M&V U
u. uF  p
\        V
4      NK  	  pp
\        S V4       VP                  P                  '       d   \        R4      hVP                  V4      oVeE   VP                  4        Uu. uF)  pVP                  V^ ,          9   g   K  VP                  NK+  	  upMRpVP                  P                  4        Ft  w  rS P                  V4      '       d   VS P                  9  d   K/  \         P"                  ! RVVV 3R lV 4       RVVR7      p\         P$                  ! VRVVVRVVR7       Kv  	  Ve   \&        P(                  ! 4       # R# u up	i u up	i u up
i u upi )	c                   < VP                   P                  4        UUu/ uF   w  r#W!P                  9   g
   VS9   g   K  W#bK"  	  upp# u uppi rM   )rl   rq   committed_state)r:   rW   kvsearch_keyss   &&  rI   _changed_dict#_bulk_update.<locals>._changed_dict(  sP     

((*
*)))Q+-= AD*
 	
 
s
   A	A	zJconnection_callable / per-instance sharding not supported in bulk_update()Nc              3     <"   T F;  pR TSSSP                   '       d   VSP                   P                  ,          MR 3x  K=  	  R # 5irM   )_version_id_propru   rc   s   & rI   r`   _bulk_update.<locals>.<genexpr>S  sQ        (G  "222   7 7 ; ;<!
  (s
   A(AT)re   r   rf   F)rg   r   r   rG   )rh   _primary_key_propkeysr   ru   unionrl   ro   ri   rj   rk   r_   rt   rp   rq   isarr   r   _collect_update_commands_emit_update_statements_resultnull_result)r:   r<   r>   r?   r   r   r   rh   r   rW   r   r   r   r   r   r   r_   r   s   f&&$$$$         @@rI   r   r     s    $$K..K..22399+F
 BJK(fe4(HKH089u

H9H%-.XDGX.68,""666!-
 	

 %//<J * )AAC	
Cuu# AEEC	
    +99??Azz,''58L8L+L66  (  3,'
* 	++ 3"7		
3  BH &""$$ ' L9.	
s   .G2G7!G<H0Hc                   V P                   pV'       g   R # \        VP                  4       4      pV Uu/ uF  pWBV,          P                  4       bK  	  ppV F)  pVP	                  V4       F  pWT,          ! V4       K  	  K+  	  R # u upi rM   )
compositessetkeys)_populate_composite_bulk_save_mappings_fnintersection)r:   r<   composite_attrscomposite_keysru   
populatorsrd   s   &&     rI   ro   ro   t  s    ''O--/0N "!C 	S!KKMM!   !..w7COG$ 8 	s    Bc                      ] tR tRt$ RtRtR]R&   ]R 4       t]R 4       t	]R 4       t
]R	 4       t]R
 4       t]R 4       tRR/R lt]R 4       tRtR# )ORMDMLStatei  TNz&Optional[ORMFromStatementCompileState]from_statement_ctxc           	   #  	f  "   \         P                  pV EF  w  rg\        P                  ! \        P
                  V4      p\        V\        4      '       d   \        W\        R 7      pV\        J do   \        P                  ! \        P
                  V4      V'       d<   \        P                  ! \        P                  V\        P                  ! 4       RR7      MT3x  K  V! VVP                  V4      V4       Rj  xL
  K  RVP                  9   dK   VP                  p	\        V	R,          V	R,          4      p
V! VV
P                  V4      V4       Rj  xL
  EKH  TV'       g   TM:\        P                  ! \        P                  V\        P                  ! 4       RR7      3x  EK  	  R#  L LY5i))defaultT)type_is_crudNentity_namespace	proxy_key)r%   _get_crud_kv_pairsr   expectr   DMLColumnRole
isinstancerm   r    r   ExpressionElementRoler   NullType_bulk_update_tuples_annotations)clsr:   	statementkv_iteratorneeds_to_be_cacheablecore_get_crud_kv_pairsr   r   desck_annoattrs   &&&&&      rI   _get_orm_crud_kv_pairs"ORMDMLState._get_orm_crud_kv_pairs  s{     "0!B!BDA  !4!4a8A!S!!,VI8#!(()<)<a@  5 &,, % ; ; !&.&7&7&9(,	 "#   6!003-   
 $q~~5,-.{0C 2,,Q/)     5 &--!77"*"3"3"5$(	 I  (s3   BF1AF1;F-<AF1F/F1&AF1/F1c                	    VP                   P                  P                  R 4      pV'       d*   VP                  '       d   VVP                  R ,          Jd   R# V# )plugin_subjectN)r   _propagate_attrsgetr:   )r   r   r   s   && rI   _get_dml_plugin_subject#ORMDMLState._get_dml_plugin_subject  sQ    "99==>NO !(((--.>?@ rK   c                	    V P                  V4      pV'       g   \        P                  ! W4      # V Uu. uF7  p\        V P	                  VP
                  WP                  4       R 4      4      NK9  	  up# u upi )F)r   r%   _get_multi_crud_kv_pairsrl   r   r:   rq   )r   r   r   r   
value_dicts   &&&  rI   r   $ORMDMLState._get_multi_crud_kv_pairs  s    44Y?!::  *
 *
 **"))96F6F6H%
 *
 	
 
s   =A4c                	    V'       g   Q R 4       hV P                  V4      pV'       g   \        P                  ! WV4      # \        V P	                  VP
                  VVV4      4      # )z0no test coverage for needs_to_be_cacheable=False)r   r%   r   rn   r   r:   )r   r   r   r   r   s   &&&& rI   r   ORMDMLState._get_crud_kv_pairs  st     "	>=	>! 44Y?!44(=  &&%%%	
 	
rK   c           
     	&   VP                   P                  R ,          pVP                  pVP                  '       d   VP                  pMVP
                  P                  pRVRVP
                  RVP                  RVP                  RVP                  /# )parententitynametypeexprentityr   )	r   r   r:   is_aliased_classr   class___name__r   local_table)r   r   ext_infor:   _label_names   &&   rI   get_entity_description"ORMDMLState.get_entity_description  sz    ??//?$$$"--K --00K KFMMHOOhooV''
 	
rK   c                	   R  pR pVP                    Uu. uF  qDV! V4      3NK  	  up UUu. uF?  w  rERVP                  RVP                  RV! WE4      RVP                  RVP                  /NKA  	  upp# u upi u uppi )c                :    V P                   P                  R R4      # )r   N)r   r   )cs   &rI   _ent_for_colCORMDMLState.get_returning_column_descriptions.<locals>._ent_for_col  s    >>%%nd;;rK   c                    Vf   V # V P                   P                  RR 4      pV'       g   V # \        VP                  W 4      # )Nr   )r   r   getattrr   )r   entr   s   && rI   _attr_for_colDORMDMLState.get_returning_column_descriptions.<locals>._attr_for_col	  s;    {**;=Iszz988rK   r   r   r   aliasedr   )_all_selected_columnsru   r   r   r   )r   r   r   r   r   r   s   &&    rI   !get_returning_column_descriptions-ORMDMLState.get_returning_column_descriptions  s    	<	9$ /8.M.M.MLO$.M
 a-3//#**
 	

s   A6AA;use_supplemental_colsc               Z   VP                   '       Ed   \        VP                   VRR7      pVP                  ! R/ VP                  B pVP                  ! VP
                  !  pW`n        \        P                  ! Wa4      ;V n	        pVP                  V4       VP                  4       pRVn         VP                   Uu. uF
  qf   K  VNK  	  p	pV	'       g   V	P                  VP                  4       V'       d   VP                  ! VP                  RV	/ pV# VP                   ! V	!  pV# u upi )a<  establish ORM column handlers for an INSERT, UPDATE, or DELETE
which uses explicit returning().

called within compilation level create_for_statement.

The _return_orm_returning() method then receives the Result
after the statement was executed, and applies ORM loading to the
state that we first established here.

F)_adapt_on_namessupplemental_colsrG   )rx   r   r7   _execution_optionsoptions_with_optionsselect_statementr   create_for_statementr   !setup_dml_returning_compile_state	_generateprimary_columnsextendprimary_keyrA   	returning)
selfcompilerorm_level_statementdml_level_statement
dml_mapperr   fsfscr   cols_to_returns
   &&&&&$    rI   _setup_orm_returning ORMDMLState._setup_orm_returning  s.   ( )))#..# %B
 %%O(;(N(NOB0>>?B$&!,AA"OD#c 11*="5"?"?"A-/*),)<)<N)<Aaa)<NN "%%j&<&<=$&9&I&I  ++' '5'#( #"	 ':&C&C#'# #"9 Os   ;D(D(c           
     	r   VP                   pVP                  P                  pVP                  '       d   VP                  P                  P
                  '       g]   VP                  R \        P                  4      p	\        VP                  VP                  VVVV	VV4      p
\        P                  ! Wj4      # V# )_sa_orm_load_options)r   compiledcompile_stater   compile_options_is_starr   r   default_load_optionsr   r   	instances)r   ri   r   rY   r7   bind_argumentsr   execution_contextr  load_optionsquerycontexts   &&&&&&&    rI   _return_orm_returning!ORMDMLState._return_orm_returningb  s     #NN)22@@ ,,,!44DDMMM,00&(I(IL (00..!	L $$V::MrK   )r   r   )r   
__module____qualname____firstlineno__is_dml_returningr   __annotations__classmethodr   r   r   r   r   r   r  r  __static_attributes__rG   rK   rI   r   r     s    AE>E5 5n 
 
 
 
" 
 
( 
 
  
 
4A# #A#F    rK   r   c            	         ] tR tRt ! R R]4      t]RRRRRRRR/R	 R
 ll4       t]R 4       t]R 4       t	]R 4       t
]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       tRtR# )BulkUDCompileStatei  c                      ] tR tRt$ RtR]R&   RtR]R&   RtR]R	&   RtR]R
&   Rt	R]R&   Rt
R]R&   RtR]R&   ]tRtRtRtRtR]R&   RtR# ))BulkUDCompileState.default_update_optionsi  autor(   _dml_strategyr*   _synchronize_sessionFr@   _can_use_returning_is_delete_using_is_update_fromT
_autoflushNOptional[Mapper[Any]]_subject_mapper_populate_existingrG   )r   r  r  r  r(  r   r)  r*  r+  r,  r-  r/  r&   _resolved_values_eval_condition_matched_rows_identity_tokenr0  r"  rG   rK   rI   default_update_optionsr&    sn    -3*3;A8A#(D(!&$& %%
D15.5%#(D(rK   r5  is_multitableFis_update_fromis_delete_usingis_executemanyc               4    V ^8  d   QhRRRRRRRRRRR	RR
R/# r9   dialectr   r:   r   r6  r@   r7  r8  r9  rE   rG   )rH   s   "rI   rJ   BulkUDCompileState.__annotate__  sP     
$ 
$
$ 
$
 
$ 
$ 
$ 
$ 

$rK   c               	    \        4       hrM   )rk   )r   r<  r:   r6  r7  r8  r9  s   &&&$$$$rI   can_use_returning$BulkUDCompileState.can_use_returning  s     "##rK   c                	   \         P                  P                  R 0 RmVVP                  4      w  ppW%R&    VP                  R,          pV'       d%   VP
                  VR&   VRVP
                  /,          pR
TP                  P                  9  d   TRR/,          pMw\        T\        4      '       gF   TP                  R8X  d   TRR/,          pMDTP                  R8X  d   \        P                  ! R4      hMTP                  R8X  d   TRR/,          pTP                  p	T	eL   T	R9  d   \        P                  ! R4      hTP                  R8X  d   T	R8X  d   \        P                  ! R4      hT'       Eg&   TP                   '       d   TP!                  4        TP                  R8X  dy   TP                  R8X  d   T P#                  TTTTTT4      pM}TP                  R8X  d   T P%                  TTTTTT4      pMUTP                  R8X  d   T P'                  TTTTTT4      pM-TP                  R8X  d   TP                  R8X  d   TRR/,          pTP)                  RTP                  RTP*                  RTP,                  RTP                  RTP.                  /4      pT\0        P2                  ! T4      P5                  R T/4      3#   \         d	    Q R	4       hi ; i)_sa_orm_update_optionssynchronize_sessionr8  r7  dml_strategyclauser   r:   r/  0statement had 'orm' plugin but no plugin_subjectr   r(  	core_onlyr'  ormre   HCan't use "bulk" ORM insert strategy without passing separate parametersevaluatefetchzSValid strategies for session synchronization are 'auto', 'evaluate', 'fetch', FalsezkThe 'fetch' synchronization strategy is not available for 'bulk' ORM updates (i.e. multiple parameter sets)r)  r?  >   	autoflushrD  identity_tokenr7  r8  populate_existingrC  )r'  rJ  rK  F)r$  r5  from_execution_optionsr   r   r:   KeyErrorr   r   r   rn   r(  sa_excInvalidRequestErrorr)  ArgumentErrorr-  _do_pre_synchronize_auto_do_pre_synchronize_evaluate_do_pre_synchronize_fetch	_annotater+  r,  r*  r   immutabledictr   )
r   ri   r   rY   r7   r  is_pre_eventupdate_optionsr   syncs
   &&&&&&&   rI   orm_pre_session_exec'BulkUDCompileState.orm_pre_session_exec  s	    55LL$ ((
	
 $-x 	M&778HIN +9+@+@x(#4n6K6K"LL!=!==<<NFD))++v5?E"::--7002  8 ++v5?F";;22??**=  ++v5$'/00L 
 |(((""$++u4!66&@%(%A%A!)&&&N $88JF%(%E%E!)&&&N $88GC%(%B%B!)&&&N  --7!66&@"'=z&JJN "++)>+N+N%~'F'F$n&D&D"N$@$@')J)JI 0177)>:
 	
i  	MLLL5	Ms   K Kc                	^   VR ,          pVP                   R8X  dI   VP                  R8X  d   V P                  WWg4       MZVP                  R8X  d   V P                  WWg4       M6VP                   R8X  d&   VP                  R8X  d   V P	                  WWg4       V# V P                  VVVVVV4      # )rB  rH  rJ  rK  re   )r(  r)  _do_post_synchronize_evaluate_do_post_synchronize_fetch"_do_post_synchronize_bulk_evaluater  )r   ri   r   rY   r7   r  r   rZ  s   &&&&&&& rI   orm_setup_cursor_result*BulkUDCompileState.orm_setup_cursor_result  s    $ ++CD''5022j@11  44?.. ))V322j@66V M((
 	
rK   c                  aa RpSP                   '       d   SP                  MRoRSP                  3V9   d`   T\        ;QJ d*    . V3R lVRSP                  3,           4       F  NK  	  5M#! V3R lVRSP                  3,           4       4      ,          pSP                  P                  e   VSP                  P                  3,          pS'       d3   \        ;QJ d    . V3R lV 4       F  NK  	  5M! V3R lV 4       4      pV# )a]  Apply extra criteria filtering.

For all distinct single-table-inheritance mappers represented in the
table being updated or deleted, produce additional WHERE criteria such
that only the appropriate subtypes are selected from the total results.

Additionally, add WHERE criteria originating from LoaderCriteriaOptions
collected from the statement.

Nadditional_entity_criteriac              3     <"   T F:  pVP                   '       g   VP                  SJ g   K'  VP                  S4      x  K<  	  R # 5irM   )include_aliasesr   _resolve_where_criteria)rV   aer   s   & rI   r`   @BulkUDCompileState._adjust_for_extra_criteria.<locals>.<genexpr>\  sE      !B %%%h)>	 5**844s   AAAc              3  F   <"   T F  pSP                  V4      x  K  	  R # 5irM   )traverse)rV   critadapters   & rI   r`   rj  h  s     O;4 0 0 6 6;s   !rG   )r   _adapterr:   r}   _single_table_criterion)r   global_attributesr   return_critrn  s   &&f @rI   _adjust_for_extra_criteria-BulkUDCompileState._adjust_for_extra_criteriaG  s     '/'@'@'@(##d )OO
  55 !+18??C!55 !+18??C!  K ??22>HOOCCEEK%O;O%%O;OOKrK   c                .    VP                   VP                  P                   Jd'   VP                  VP                   P                  4      pMVP                  VP                  4      p V Uu. uF
  qT! V4      NK  	  up#   \         d    . u # i ; iu upi )a  return rows that indicate PK cols in mapper.primary_key position
for RETURNING rows.

Prior to 2.0.36, this method seemed to be written for some kind of
inheritance scenario but the scenario was unused for actual joined
inheritance, and the function instead seemed to perform some kind of
partial translation that would remove non-PK cols if the PK cols
happened to be first in the row, but not otherwise.  The joined
inheritance walk feature here seems to have never been used as it was
always skipped by the "local_table" check.

As of 2.0.36 the function strips away non-PK cols and provides the
PK cols for the table in mapper PK order.

)r   rh   _tuple_getterr  rP  )r   r   r:   rowspk_keysrows   &&&&  rI   _interpret_returning_rows,BulkUDCompileState._interpret_returning_rowsl  s    $	!!););)G)GG
 !..v/A/A/M/MN ..v/A/AB )----  	 I		 .s   A	A? A? ,B?BBc                	:   VP                   pVP                  pV Uu. uFV  pVP                  P                  V4      '       g   K&  VP                  '       d   K:  VP                  4       WUP                  3NKX  	  ppVP                  pVe.   V UUU	u. uF  w  rp	VP                  V8X  g   K  WV	3NK  	  pppp	. p
V FO  w  rp	V! V4      pVRJ g   V\        P                  J g   K*  V
P                  VVV	V\        P                  J 34       KQ  	  V
# u upi u up	ppi )NT)r/  r2  r:   r   expiredobjrl   r4  rM  r   _EXPIRED_OBJECTappend)r   rZ  r~   r:   eval_conditionrW   raw_datarM  r~  r   r   evaled_conditions   &&&         rI    _get_matched_objects_on_criteria3BulkUDCompileState._get_matched_objects_on_criteria  s+   //'77  
||' -05 -UYY[%, 	 
 (77% *2)1%C''>9 $U#)1   !)C-c2
 !D(#y'@'@@(I,E,EE	 "*" A
s   #DD DD,Dc                	   VP                   pVP                  p\        P                  ! V4      pRpVP                  '       d   WbP                  ,          p/ pVP
                   F(  pVP                  '       g   K  VP                  V4       K*  	  V'       d   W`P                  Ws4      ,          pV'       d   VP                  ! V!  p	V	# R  p
T
p	V	# )c                    R # )TrG   )r~  s   &rI   r2  JBulkUDCompileState._eval_condition_from_statement.<locals>._eval_condition  s    rK   rG   )
r/  r   r   _EvaluatorCompiler_where_criteriar   _is_criteria_optionget_global_criteriars  process)r   rZ  r   r:   
target_clsevaluator_compilerrm  rq  optr  r2  s   &&&        rI   _eval_condition_from_statement1BulkUDCompileState._eval_condition_from_statement  s    //]]
&99*E$$$---D**C&&&''(9: + 223DMMD/77>N  -NrK   c                     V P                  Wb4      pVRVRR/,           #   \        P                   d     Mi ; iTRR/,          pT P                  TTTTTT4      # )a  setup auto sync strategy


"auto" checks if we can use "evaluate" first, then falls back
to "fetch"

evaluate is vastly more efficient for the common case
where session is empty, only has a few objects, and the UPDATE
statement can potentially match thousands/millions of rows.

OTOH more complex criteria that fails to work with "evaluate"
we would hope usually correlates with fewer net rows.

r2  r)  rJ  rK  )r  r   UnevaluatableErrorrV  )r   ri   r   rY   r7   r  rZ  r  s   &&&&&&& rI   rT  +BulkUDCompileState._do_pre_synchronize_auto  s    2	 ??N "!>&
%   ++ 		 	17;;,,
 	
s     88c                	     V P                  Wb4      pTRT/,           #   \        P                   d$   p\        P                  ! R T,          4      ThRp?ii ; i)z{Could not evaluate current criteria in Python: "%s". Specify 'fetch' or False for the synchronize_session execution option.Nr2  )r  r   r  rQ  rR  )	r   ri   r   rY   r7   r  rZ  r  errs	   &&&&&&&  rI   rU  /BulkUDCompileState._do_pre_synchronize_evaluate  sp    
	 ??N ~!
 
 	
 ++ 	,,8:=> 		s    AAAc                	    VP                   '       d   . # VP                  '       d   \        VP                  4      # VP                  '       d$   \        VP                  P	                  4       4      # . # rM   )_multi_values_ordered_valuesrn   _valuesrq   )r   r:   r   s   &&&rI   _get_resolved_values'BulkUDCompileState._get_resolved_values  s[    """I&&&	1122	))//122IrK   c                	D   . pV F{  w  rEV'       dT   \        V\        P                  4      '       d4    VP                  V,          pVP	                  VP
                  V34       K`  \        P                  ! R V,          4      h	  V#   \        P                   d     K  i ; i)zCAttribute name not found, can't be synchronized back to objects: %r)
r   r   ColumnElement_columntopropertyr  ru   orm_excUnmappedColumnErrorrQ  rR  )r   r:   resolved_valuesvaluesr   r   r   s   &&&    rI   _resolved_keys_as_propnames.BulkUDCompileState._resolved_keys_as_propnames(  s    #DA*Q
(@(@AA1!33A6D MM488Q-00079:;  $  22 s   BBBc                	^  a aaa SP                   o\        SP                  SP                  3,           !  P	                  S4      P
                  ! VP                  !  pVP                  Vn        R oR VV VV3R llpVP                  VVVVVR7      p	V	P                  4       p
SRV
RS/,           # )Nc                    V ^8  d   QhRRRR/# )r9   orm_contextr-   rE   r   rG   )rH   s   "rI   rJ   BBulkUDCompileState._do_pre_synchronize_fetch.<locals>.__annotate__\  s     	 	O 	 	rK   c                  < V P                   P                  ! R/ V P                  B pSP                  VP                  SSP
                  SP                  V P                  R 7      pSe   SV8w  d   \        P                  ! R4      hM2V P                  '       d   V'       g   \        P                  ! R4      hVoV'       d   \        P                  ! 4       # R# ))r7  r8  r9  NzjFor synchronize_session='fetch', can't mix multiple backends where some support RETURNING and others don'tzFor synchronize_session='fetch', can't use multiple parameter sets in ORM mode, which this backend does not support with RETURNINGrG   )ri   get_bindr  r?  r<  r,  r+  r9  rQ  rR  r   r   )r  bindper_bind_resultr?  r   r:   rZ  s   &  rI   skip_for_returningHBulkUDCompileState._do_pre_synchronize_fetch.<locals>.skip_for_returning\  s    &&//M+2L2LMD "33-== . ? ?*99 4 O !,$7 44   8 +++O00-  %4!**,,rK   )r7   r  
_add_eventr3  r*  )
r/  r   r  select_identity_tokenselect_fromr   r   r  executefetchall)r   ri   r   rY   r7   r  rZ  select_stmtr  r   matched_rowsr?  r:   s   f&&&&&f    @@rI   rV  ,BulkUDCompileState._do_pre_synchronize_fetch:  s      // V''6+G+G*IIK[ W--/ 	
 '0&?&?# !	 	B /)) ! 
 (\ "3!
 
 	
rK   rG   N)r   r  r  r  r"   r5  r!  r?  r\  rb  rs  rz  r  r  rT  rU  r  r  rV  r"  rG   rK   rI   r$  r$    s0   ) ) 
$
 $
$  %
$ !&
$  %
$ 
$ v
 v
p )
 )
V " "H  .  .D $ $L  8 -
 -
^ 
 
2    " N
 N
rK   r$  rH  insertc                     a  ] tR tRt$  ! R R]4      tRtR]R&   ]R 4       t	]R R	 l4       t
]R
 V 3R ll4       t]R 4       tR tR tRtV ;t# )BulkORMInserti  c                  l    ] tR tRt$ RtR]R&   RtR]R&   RtR]R&   R	tR
]R&   Rt	R]R&   Rt
R]R&   RtR	# )$BulkORMInsert.default_insert_optionsi  r'  r(   r(  Fr@   _render_nulls_return_defaultsNr.  r/  Tr-  r0  rG   )r   r  r  r  r(  r   r  r  r/  r-  r0  r"  rG   rK   rI   default_insert_optionsr    sB    -3*3#t#!&$&15.5
D#(D(rK   r  NzOptional[FromStatement]r   c                	\   \         P                  P                  R 0 RmVVP                  4      w  ppW%R&    VP                  R,          pV'       d%   VP
                  VR&   VRVP
                  /,          pT'       gF   TP                  R8X  d   TRR	/,          pMDTP                  R
8X  d   \        P                  ! R4      hMTP                  R8X  d   TRR
/,          pTP                  R8w  d9   T'       g   \        P                  pMTP                  \        P                  4      pT'       g#   TP                  '       d   TP                  4        TP                  RTP                  /4      pT\        P                   ! T4      P                  R T/4      3#   \         d	    Q R4       hi ; i)_sa_orm_insert_optionsrD  rE  r   r:   r/  rF  r'  r(  rH  re   rI  raw>   rL  rD  rB   rN  )r  r  rO  r   r   r:   rP  r(  rQ  rR  r   _orm_load_exec_optionsr   r-  rW  r   rX  )	r   ri   r   rY   r7   r  rY  insert_optionsr   s	   &&&&&&&  rI   r\  "BulkORMInsert.orm_pre_session_exec  s    00GG$N((	
	
 $-x 	M&778HIN +9+@+@x(#4n6K6K"LL++v5?E"::--7002  8 ++v5?F";;''50 %$+$B$B!$5$;$;22%!  9 9 9 ''^99:
	
 0177)>:
 	
O  	MLLL5	Ms   F F+c               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )r9   ri   r.   r   z
dml.InsertrY   r3   r7   r)   r  r,   r[   r1   rE   _result.ResultrG   )rH   s   "rI   rJ   BulkORMInsert.__annotate__  sY     V
 V
V
 V
 &	V

 6V
 'V
 V
 
V
rK   c                	   VP                  R V P                  4      pVP                  R9  d   \        P                  ! R4      hVP                  R8X  d    TP                  Y#;'       g    / VR7      pV# VP                  R8X  d   VP                  p	VP                  e,   V	P                  '       d   \        P                  ! RV	 24      hV	f   Q hVP                  f   Q h\        T	\        R\        V\        4      '       d   V.MT4      VP                  RVP                  VP                   VVR	7      pM9VP                  R8X  d   TP                  Y#;'       g    / VR7      pM
\#        4       h\%        VP&                  4      '       g   V# VP(                  '       d?   VP                  R
\*        P,                  4      p
V
RR/,          p
VP/                  R
V
/4      pV P1                  VVVVVV4      # )r  r  re   rH  zHValid strategies for ORM insert strategy are 'raw', 'orm', 'bulk', 'auto)r7   z`bulk INSERT with a 'post values' clause (typically upsert) not supported for multi-table mapper Iterable[Dict[str, Any]]F)r?   rA   rB   r6   r7   r  r0  T)r  re   rH  r'  )r   r  r(  rQ  rS  r  r/  _post_values_clause_multiple_persistence_tablesrR  _transactionrO   r   r   rl   r  r  AssertionErrorr@   rx   r0  r   r  r   r  )r   ri   r   rY   r7   r  r[   r  r   r:   r  s   &&&&&&&    rI   orm_execute_statement#BulkORMInsert.orm_execute_statement  s    +..$c&@&@
 '' 0
 
 &&2  ''50\\<<R;L " F M''61#33F --977700$X'  %%%''333!. *64 8 8VHf $$ . ? ?+99$-"3F ))U2\\<<R;L " F !""I(())M,,,,00&(I(IL 1488L 1 7 7'6! ((
 	
rK   c                   V ^8  d   QhRR/# )r9   rE   r  rG   )rH   s   "rI   rJ   r  6  s       rK   c                	L  < \        \        \        SV `  ! W3/ VB 4      pVe   VP                  '       * pMRpV'       g   V# VP
                  R,          pVP                  P                  RR4      pVR8X  d   VP                  V4       V# VR8X  d   VP                  W&4       V# )NTr   rD  r  re   rH  )
r   r  superr   stackr   r   r   _setup_for_bulk_insert_setup_for_orm_insert)	r   r   r  kwr  toplevelr:   rD  	__class__s	   &&&,    rI   r   "BulkORMInsert.create_for_statement5  s    G(CC

 #>>)HHK++,<= --11.%H6!''1  U"&&x8rK   c                	   a V3R  lVP                  4        4        UUUu/ uF  w  r4pVe   VP                  MTVbK  	  uppp# u upppi )c              3  b   <"   T F$  w  rSP                   P                  V4      W3x  K&  	  R # 5irM   )r   r   )rV   r   r   r:   s   &  rI   r`   ;BulkORMInsert._resolved_keys_as_col_keys.<locals>.<genexpr>P  s(      4ODAa!'4Os   ,/)rq   ru   )r   r:   resolved_value_dictcolr   r   s   &f&   rI   _resolved_keys_as_col_keys(BulkORMInsert._resolved_keys_as_col_keysL  sR    4G4M4M4O
	 CGGAq0
 	
 
s   Ac                	    \        \        P                  V P                  4      ;r4V P	                  VVVVR R7      pW0n        R# )Fr  r   N)r   r   Insertr   r  )r  r  r:   r   r  s   &&&  rI   r  #BulkORMInsert._setup_for_orm_insertU  sD    *.szz4>>*JJ	--"' . 
	 #rK   c                <   \        \        P                  V P                  4      ;r#VP                  pVR,          VR,          reVP                  4       pWRn        V P                  '       dF   V P                  P                  4        UUu/ uF  w  rxVP                  VJ g   K  WxbK  	  uppV n        V P                  VVVVRR7      pV P                  e=   V P                  P                  P                  '       d   \        P                  ! R4      hW n        R# u uppi )zestablish an INSERT statement within the context of
bulk insert.

This method will be within the "conn.execute()" call that is invoked
by persistence._emit_insert_statement().

_emit_insert_table_emit_insert_mapperTr  NzCan't use RETURNING * with bulk ORM INSERT.  Please use a different INSERT form, such as INSERT..VALUES or INSERT with a Core Connection)r   r   r  r   r   _cloner   _dict_parametersrq   r  r   r  r  rQ  CompileError)	r  r  r   r  anemit_insert_tableemit_insert_mapperr  vals	   &&       rI   r  $BulkORMInsert._setup_for_bulk_inserta  s    +/szz4>>*JJ	## #$$% .
 $$&	+    !% 5 5 ; ; =% =HC99 11  =%D! --)"& . 
	 ##/''77@@@%%3  #1%s   D!D)r  r   )r   r  r  r  r"   r  r   r   r!  r\  r  r   r  r  r  r"  __classcell__r  s   @rI   r  r    s    ) ) 15-4A
 A
F V
 V
p  , 
 

#,# ,#rK   r  updatec            	         a  ] tR tRt]R 4       tR tR t]R V 3R ll4       t]RRR	RR
RRR/R R ll4       t	]R 4       t
]R 4       t]R 4       t]R 4       tRtV ;t# )BulkORMUpdatei  c                	   V P                  V 4      pVP                  P                  R R4      pVP                  '       * pV'       d   VR8X  d   VP	                  W4       V# VR8X  g#   VR8X  d6   RVP
                  P                  9  d   \        P                  ! WAV3/ VB  V# V'       d   VR9   d   VP                  W4       V# )rD  unspecifiedre   rG  r   )rH  r  )	__new__r   r   r  _setup_for_bulk_updater   r%   __init___setup_for_orm_update)r   r   r  r  r  rD  r  s   &&&,   rI   r   "BulkORMUpdate.create_for_statement  s    {{3 --11M
  ~~%.''	<  K'},ioo&B&BB##DXDD  \-CC&&y;rK   c                	   TpVP                   '       * pVP                  P                  R ,          pVP                  ;V n        pV P	                  Wq4      V n        V P                  VVVVR7       VP                  '       d   \        V P
                  4      V n        VP                  4       pVP                  P                  R ,          VJ d   VP                  Vn        VP                  '       d   V P
                  Vn        M#VP                  '       d   V P
                  Vn        V P                  V P                  V4      p	V	'       d   VP                  ! V	!  p\        P                   ! WV3/ VB  Rp
V'       g   RpMVP                  P#                  RR4      pVP                  P#                  RR4      pVRJd5   VR8H  ;'       d(    V P%                  VP&                  WpP(                  R7      pVR8X  d/   V'       d'   Rp
VP*                  ! VP                  P,                  !  pV'       d   V P/                  VVVVV
R	7      pWn        R# )
r   r  process_criteria_for_toplevelFNrC  r?  rK  )r6  Tr  )r  r   r   r:   r  r1  _init_global_attributesr  rl   r  r   r  rs  rq  wherer%   r  r   r?  r<  r6  rA   r  r  r   )r  r   r  r  r  r  r   r:   new_stmtnew_critr   rC  r?  s   &&&,         rI   r  #BulkORMUpdate._setup_for_orm_update  s%   '~~%??//?'.f $ 9 9& L$$*2	 	% 	
 $()>)>$?D!##%>>&&~6&@#//HN $$$'+'<'<H$#44H22""F
 ~~x0H 	?B? %"&"*"7"7";";%t# %1155
 E) $w.  **$$f<N<N +   ').?$(!  //1K1KLH00#!&; 1 H "rK   c                   \        \        P                  V4      pVP                  pVR,          VR,          reVP	                  4       pWQn        \        P                  ! WV3/ VB  V P                  '       d   \        P                  ! R4      hV P                  '       dF   V P                  P                  4        UUu/ uF  w  rxVP
                  VJ g   K  WxbK  	  uppV n        Wn        R# u uppi )zestablish an UPDATE statement within the context of
bulk insert.

This method will be within the "conn.execute()" call that is invoked
by persistence._emit_update_statement().

_emit_update_table_emit_update_mapperzbulk ORM UPDATE does not support ordered_values() for custom UPDATE statements with bulk parameter sets.  Use a non-bulk UPDATE statement or use values().N)r   r   Updater   r  r   r%   r  r  rQ  rR  r  rq   r   )	r  r   r  r  r  emit_update_table_r  r  s	   &&&,     rI   r  $BulkORMUpdate._setup_for_bulk_update  s     Y/	## #$$% 
 $$&	+@R@,,=      !% 5 5 ; ; =% =HC99 11  =%D!
 #%s   =C-C-c               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )r9   ri   r.   r   z
dml.UpdaterY   r3   r7   r)   r  r,   r[   r1   rE   r  rG   )rH   s   "rI   rJ   BulkORMUpdate.__annotate__0  sY     S SS S &	S
 6S 'S S 
SrK   c           
     	  < VP                  R V P                  4      pVP                  '       d?   VP                  R\        P                  4      pVRR/,          pVP                  RV/4      pVP                  R9  d   \        P                  ! R4      hVP                  R8X  d   VP                  '       * p	VP                  R8w  g   Q hVP                  '       d(   VP                  R8X  d   \        P                  ! R4      hVP                  p
V
f   Q hVP                  f   Q h\        T
\        R	\!        V\"        4      '       d   V.MT4      VP                  R
R
VV	R7      pV P%                  VVVVVV4      # \&        SV `Q  VVVVVV4      # )rB  r  r0  Tre   zOValid strategies for ORM UPDATE strategy are 'orm', 'auto', 'bulk', 'core_only'rK  rJ  zbulk synchronize of persistent objects not supported when using bulk update with additional WHERE criteria right now.  add synchronize_session=None execution option to bypass synchronize of persistent objects.r  F)r?   r   r   r   )rH  r'  re   rG  )r   r5  r0  r   r  r   r(  rQ  rS  r  r)  rR  r/  r  r   r   r   rl   rb  r  r  )r   ri   r   rY   r7   r  r[   rZ  r  r   r:   r   r  s   &&&&&&&     rI   r  #BulkORMUpdate.orm_execute_statement/  s    +..$c&@&@
 ,,,,00&(I(IL 1488L 1 7 7'6! '' 0
 
 &&9  ''61(1(A(A$A!!66'AAA )))"77:E00  $33F%%%''333!. *64 8 8VHf $$$)$-&;F ..!  70! rK   r6  Fr7  r8  r9  c               4    V ^8  d   QhRRRRRRRRRRR	RR
R/# r;  rG   )rH   s   "rI   rJ   r    sP     " "" "
 " " " " 
"rK   c               	:   VP                   ;'       d    VP                  P                  pV'       g   R # V'       d   VP                  # V'       d   VP                  # V'       d7   VP                  '       g%   \
        P                  ! RVP                   R24      hR# )F	Dialect "z" does not support RETURNING with UPDATE..FROM; for synchronize_session='fetch', please add the additional execution option 'is_update_from=True' to the statement to indicate that a separate SELECT should be used for this backend.T)update_returningr   implicit_returningupdate_executemany_returningupdate_returning_multifromrQ  r  r   r   r<  r:   r6  r7  r8  r9  normal_answers   &&&$$$$ rI   r?  BulkORMUpdate.can_use_returning  s     $$NN););)N)N 	 777 5557#E#E#E%%GLL> *E E  rK   c                	  a V'       g   R # VP                   pVP                   Uu. uF  qfP                  NK  	  ppVP                  pV EF   oVP	                  V3R lV 4       VP
                  4      p	VP                  V	4      p
V
'       g   KE  \        S4      P                  V4      pV
P                  pV
P                  P                  V4      pV F  pW9   g   K  SV,          W&   K  	  V
P                  P                  P                  V
R V4       V
P                  V\!        V4      4       VP                  V4      P                  V4      pV'       g   EK  V
P#                  W4       EK#  	  R # u upi )Nc              3  6   <"   T F  pSV,          x  K  	  R # 5irM   rG   )rV   ru   params   & rI   r`   CBulkORMUpdate._do_post_synchronize_bulk_evaluate.<locals>.<genexpr>  s     /wsws   )r/  r|   ru   identity_mapidentity_key_from_primary_keyr4  fast_get_stater   
differencerl   
unmodifiedr   managerdispatchrefresh_commitrn   _expire_attributes)r   ri   rY   r   rZ  r:   proprx  r   identity_keyrW   evaluated_keysr   to_evaluateru   	to_expirer  s   &&&&&           @rI   ra  0BulkORMUpdate._do_post_synchronize_bulk_evaluate  s;    //(.(B(BC(B88(BC++E!??/w/..L !//=E Z227;NJJE**77GK"<!&sEJ # MM""**5$DMM%k!23
 '33E:EEI y((:; 	 Ds   E1c                	<   V P                  VVP                  P                  4       4      pT P                  TTTVP                  P
                  ^ ,          V UUUU	u. uF
  w  rgrWgV3NK  	  up	pppVP                  4       VP                  4       4       R# u up	pppi )    N)r  r   
all_states#_apply_update_set_values_to_objectsr   compiled_parametersprefetch_colspostfetch_cols)
r   ri   r   r   rZ  matched_objectsr~  rW   r   r  s
   &&&&&     rI   r_  +BulkORMUpdate._do_post_synchronize_evaluate  s     >>  ++-

 	//NN..q1=LM_%9Sc% _M  "!!#	

 Ns   Bc                	p   VP                   pVP                  pV'       d@   V P                  W5V4      pV Uu. uF   p\        V4      VP                  3,           NK"  	  p	pMVP
                  p	V	 Uu. uF  q^ R VR,          3NK  	  up U
Uu. uFA  w  rVP                  e   WP                  8X  g   K%  VP                  \        V
4      VR7      NKC  	  upp
 Uu. uF(  pWP                  9   g   K  VP                  V,          NK*  	  ppV'       g   R# T P                  TTTVP                  P                  ^ ,          V Uu. uF0  pV\        P                  ! V4      \        P                  ! V4      3NK2  	  upVP                  4       VP!                  4       4       R# u upi u upi u upp
i u upi u upi )r1  NrM  )r/  returned_defaults_rowsrz  r}   r4  r3  r!  rn   r   r3  r   r4  r   instance_stateinstance_dictr5  r6  )r   ri   r   r   rZ  target_mapperr<  pk_rowsry  r  r  rM  r+  objsr~  s   &&&&&          rI   r`  (BulkORMUpdate._do_post_synchronize_fetch  s    '66!'!>!>!33'=G
 #"C c
n<<>>>"  L
 *77L 5A44@S2YB(L4
!
4/K "119!%C%CC;;%#1 < 4
!

! 333 /G  ..
! 	 
  //NN..q1    C	 --c2,,S1
     "!!#	
54
!
0s)   &F0F#"F(3 F(F.0F.6F3c           
         VP                   pVP                  p	\        P                  ! V	4      p
V P	                  W4      pV P                  W4      p/ pV F>  w  r V
P                  \        P                  ! \        P                  V4      4      pVW&   K@  	  \        VP                  4       4      pV UUu0 uF  w  ppVkK
  	  ppp\        4       pV Uu0 uF>  pVP                  V9   g   K  VVP                   9   g   K)  VP                  V9  g   K<  VkK@  	  ppV Uu0 uF3  pVVP                   9   g   K  VP                   V,          P                  kK5  	  upP#                  V4      pV Uu. uF,  pVP                   V,          P                  VP                  3NK.  	  ppV EF  w  pppTP%                  V UUu/ uF  w  ppVVV,          bK  	  upp4       VP'                  VP(                  V4       VP*                  P-                  V4      pV F  pVV9   g   K  W,          ! V4      VV&   K  	  VP.                  P0                  P3                  VRV4       VP5                  V\        V4      4       VP-                  V4      P#                  V4      pV'       d   VP'                  VV4       VP7                  V4       EK   	  VP9                  V4       R#   \        P                   d     EK  i ; iu uppi u upi u upi u upi u uppi )zUapply values to objects derived from an update statement, e.g.
UPDATE..SET <values>

N)r/  r   r   r  r  r  r  r   r   r   r   r  rn   r   r   ru   r  r#  r  r)  rl   r$  r   r%  r&  r'  r(  add_register_altered) r   ri   rZ  r   effective_paramsr7  r5  r6  r:   r  r  r  resolved_keys_as_propnamesvalue_evaluatorsru   value
_evaluatorr,  r   r   attribr~   r   to_prefetchr.  prefetch_transferr~  rW   r   col_to_propc_keyr-  s    &&&&&&&&                        rI   r3  1BulkORMUpdate._apply_update_set_values_to_objects  s      //]]
&99*E226E%(%D%D&
" 4JC3/77$$U%@%@%H
 )3 % 5 .3356 :; :1! :; #
"uu((  V---  ^+	 A" 	 
 $
#F,,, ,F$$Q'++#
 *^
$	 	 ?J
>IV%%a(,,aee4k 	 
 "1CLL /@.?*U  !1%!88.? $$UZZ;**77GK"%<!1!6s!;E#J #
 MM""**5$DMM%k!23
 ++E2==kJI((	:JJu; "1< 	!!&)s //  <


sH   4K5K5K;,K;?K;K;L 6!L -2L;L
K21K2)r  r1  r:   r   )r   r  r  r  r!  r   r  r  r  r?  ra  r_  r`  r3  r"  r  r  s   @rI   r  r    s     ,`"D"#H S Sj "
 $"  %" !&"  %" "H (; (;T 
 
$ 3
 3
j U* U*rK   r  deletec            	         a  ] tR tRt]R 4       t]R V 3R ll4       t]RRRRRRR	R/R
 R ll4       t]R 4       t]R 4       t	Rt
V ;t# )BulkORMDeleteiw  c           	     	   V P                  V 4      pVP                  P                  R R4      pVR8X  g#   VR8X  d6   RVP                  P                  9  d   \        P
                  ! WAV3/ VB  V# VP                  '       * pTpVP                  P                  R,          pVP                  ;Vn        p	VP                  VVVVR7       VP                  4       p
V
P                  P                  R,          V	J d   V	P                  V
n        V P                  VP                  V	4      pV'       d   V
P                  ! V!  p
\        P
                  ! WJV3/ VB  RpV'       g   RpMVP                  P                  RR4      pVP                  P                  RR4      pVRJdQ   VR	8H  ;'       dD    VP                  VP                  V	VP                   VP                  P                  R
R4      R7      pV'       d'   RpV
P"                  ! V
P                  P$                  !  p
V'       d   VP'                  VVV
V	VR7      p
Wn        V# )rD  r  rG  r   r   FNrC  r?  rK  r8  )r6  r8  Tr  )r  r   r   r   r#   r  r  r:   r  r  r   rs  rq  r  r?  r<  r6  rA   r  r  r   )r   r   r  r  r  rD  r  r  r   r:   r  r  r   rC  r?  s   &&&,           rI   r   "BulkORMDelete.create_for_statementy  s<   {{3 --11M

 K'},ioo&B&BB##DXDDK~~%'??//?'.f$$*2	 	% 	
 ##%>>&&~6&@#//HN11""F
 ~~x0H 	?B? %"&"*"7"7";";%t# %1155
 E) $w.  **$$"&"4"4$,$9$9$=$=)5%	 +   $(!//1K1KLH00#!&; 1 H "rK   c               4    V ^8  d   QhRRRRRRRRR	R
RRRR/# )r9   ri   r.   r   z
dml.DeleterY   r3   r7   r)   r  r,   r[   r1   rE   r  rG   )rH   s   "rI   rJ   BulkORMDelete.__annotate__  sP     
 

 
 &	

 6
 '
 
 

rK   c                	   < VP                  R V P                  4      pVP                  R8X  d   \        P                  ! R4      hVP                  R9  d   \        P
                  ! R4      h\        SV `  WW4WV4      # )rB  re   zBulk ORM DELETE not supported right now. Statement may be invoked at the Core level using session.connection().execute(stmt, parameters)zGValid strategies for ORM DELETE strategy are 'orm', 'auto', 'core_only')rH  r'  rG  )r   r5  r(  rQ  rR  rS  r  r  )	r   ri   r   rY   r7   r  r[   rZ  r  s	   &&&&&&& rI   r  #BulkORMDelete.orm_execute_statement  s     +..$c&@&@
 ''61,,A  ''/KK&& 
 w,>
 	
rK   r6  Fr7  r8  r9  c               4    V ^8  d   QhRRRRRRRRRRR	RR
R/# r;  rG   )rH   s   "rI   rJ   rW    sP     & && &
 & & & & 
&rK   c               	   VP                   ;'       d    VP                  P                  pV'       g   R # V'       d   VP                  # V'       d7   VP                  '       g%   \        P
                  ! RVP                   R24      hR# )Fr  z" does not support RETURNING with DELETE..USING; for synchronize_session='fetch', please add the additional execution option 'is_delete_using=True' to the statement to indicate that a separate SELECT should be used for this backend.T)delete_returningr   r  delete_returning_multifromrQ  r  r   r  s   &&&$$$$ rI   r?  BulkORMDelete.can_use_returning  s     $$NN););)N)N 	   5557#E#E#E %%GLL> *E E  rK   c                	,   V P                  VVP                  P                  4       4      p. pV FF  w  rxrV
'       d(   VP                  WP                  P                  4       K5  VP                  V4       KH  	  V'       d   VP                  V4       R # R # rM   )r  r   r2  _expire	_modifiedr  _remove_newly_deleted)r   ri   r   r   rZ  r7  	to_deleter  rW   r   is_partially_expireds   &&&&&      rI   r_  +BulkORMDelete._do_post_synchronize_evaluate  s     >>  ++-

 	5D1Ae#e%9%9%C%CD  '	 6E )))4 rK   c                	   VP                   pVP                  pV'       d@   V P                  W5V4      pV Uu. uF   p\        V4      VP                  3,           NK"  	  p	pMVP
                  p	V	 Fv  pV^ R p
VR,          pVP                  \        V
4      VR7      pWP                  9   g   K?  VP                  \        P                  ! VP                  V,          4      .4       Kx  	  R# u upi )r1  r:  Nr;  )r/  r<  rz  r}   r4  r3  r!  rn   r   rb  r   r=  )r   ri   r   r   rZ  r?  r<  r@  ry  r  r  rM  r+  s   &&&&&        rI   r`  (BulkORMDelete._do_post_synchronize_fetch2  s     '66!'!>!>!33'=G #"C c
n<<>>>"  L
 *77LCa)K WN )FF[!- G L 333--"11#00>  s   &C*)r:   r   )r   r  r  r  r!  r   r  r?  r_  r`  r"  r  r  s   @rI   rS  rS  w  s    Y Yv 
 
> &
 $&  %& !&&  %& &P 5 5& $ $rK   rS  )O__doc__
__future__r   typingr   r   r   r   r   r   r	   r
   r    r   r   r   r   r  r   r   baser   r   r   r   r   rQ  r   enginer   r   r   sqlr   r   r   r   r   r   sql.baser    r!   r"   sql.dmlr#   r$   r%   r&   util.typingr'   _typingr(   r)   r*   r:   r+   ri   r,   r-   r.   r/   rW   r0   r1   r2   engine.interfacesr3   objectr4   rO   r   ro   r   r$  
plugin_forr  r  rS  rG   rK   rI   <module>rv     s@  
 #                  , " 1 !    &       , #  $ $ $  !,33'( +$#9T  

 *-
 ?B
 

 

# 14
# ?B
# 

#U 15U ?CUp 
	 *-	 #'	 
	 
	 14	 #'	 
	Y% 15Y% #'Y%x%@) @FC
 C
L )@#K @# *@#F )c*& c* *c*L )_& _ *_rK   