Files
aitsc/.venv/Lib/site-packages/sqlalchemy/sql/__pycache__/dml.cpython-312.pyc

977 lines
72 KiB
Plaintext
Raw Normal View History

2025-02-23 09:07:52 +08:00
<EFBFBD>
2025-08-16 19:28:45 +08:00
<00><18>h<EFBFBD><00> <01>X<00>dZddlmZddlmZddlZddlmZddlm Z ddlm
2025-02-23 09:07:52 +08:00
Z
ddlm Z ddlm Z dd lm Z dd
lmZdd lmZdd lmZdd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddl"m#Z#ddl"m$Z$ddl"m%Z%ddl"m&Z&dd l"m'Z'dd!l"m(Z(dd"l"m)Z)dd#l"m*Z*dd$l"m+Z+dd%l"m,Z,dd&l"m-Z-dd'l"m.Z.dd(l/m0Z0dd)l/m1Z1dd*l/m2Z2dd+l/m3Z3dd,l/m4Z4dd-l5m6Z6dd.l5m7Z7dd/l5m8Z8dd0l5m9Z9dd1l5m:Z:dd2l5m;Z;dd3l5m<Z<dd4l5m=Z=dd5l5m>Z>dd6l?m@Z@dd7lAmBZBd8d9lmCZCd8dlmZd8d:lDmEZEd8d;lDmFZFer<>dd<lmGZGdd=lmHZHdd>lmIZIdd?lmJZJdd@lmKZKddAlmLZLddBlmMZMddClmNZNddDlmOZOddElmPZPddFlmQZQddGlmRZRddHlmSZSddIlmTZUddJl"mVZVddKlWmXZXddLl/mYZYddMl5mZZZddNl5m[Z[ddOl5m\Z\ddPl5m]Z]dwdR<64>Z^dxdS<64>Z_dydT<64>Z`n6ej<>dU<64>Z^ej<>dV<64>Z_ej<>dW<64>Z`edXe<08>Y<EFBFBD>Zbeece2efZdee=e6e;fZeGdZ<64>dQe*<2A>Zfe*j<>d[d\<5C>Gd]<5D>d^ef<65><00>Zhe*j<>d[d_<64>Gd`<60>daef<65><00>Zie*j<>d[db<64>Gdc<64>ddef<65><00>ZjGde<64>dfej<>e9e.e+e:e-e7e1<65>
ZlGdg<64>dhel<65>ZmGdi<64>djem<65>ZnGdk<64>dlene>e<00>ZoGdm<64>dn<64>ZpGdo<64>dpepem<65>ZqGdq<64>dreqe>e<00>ZrGds<64>dtepel<65>ZsGdu<64>dveqe>e<00>Zty)zzd
Provide :class:`_expression.Insert`, :class:`_expression.Update` and
:class:`_expression.Delete`.
<EFBFBD>)<01> annotationsN)<01>Any)<01>cast)<01>Dict)<01>Iterable)<01>List)<01>MutableMapping)<01>NoReturn)<01>Optional)<01>overload)<01>Sequence)<01>Set)<01>Tuple)<01>Type)<01> TYPE_CHECKING)<01>TypeVar)<01>Union<6F>)<01> coercions)<01>roles)<01>util)<01>_TP)<01>_unexpected_kw)<01>is_column_element)<01>is_named_from_clause)<01>_entity_namespace_key)<01>_exclusive_against)<01> _from_objects)<01> _generative)<01>_select_iterables)<01>ColumnCollection)<01> ColumnSet)<01> CompileState)<01> DialectKWArgs)<01>
Executable)<01>
Generative)<01>HasCompileState)<01>BooleanClauseList)<01> ClauseElement)<01> ColumnClause)<01> ColumnElement)<01>Null)<01>Alias)<01>ExecutableReturnsRows)<01>
FromClause)<01>HasCTE)<01> HasPrefixes)<01>Join)<01>SelectLabelStyle)<01> TableClause)<01>TypedReturnsRows)<01>NullType)<01>InternalTraversal<61>)<01>exc)<01>Self)<01> TypeGuard)<01>_ColumnExpressionArgument)<01>_ColumnsClauseArgument)<01>_DMLColumnArgument)<01>_DMLColumnKeyMapping)<01>_DMLTableArgument)<01>_T0)<01>_T1)<01>_T2)<01>_T3)<01>_T4)<01>_T5)<01>_T6)<01>_T7)<01>_TypedColumnClauseArgument)<01>ReadOnlyColumnCollection)<01> SQLCompiler)<01>KeyedColumnElement)<01>_ColumnsClauseElement)<01>_SelectIterable)<01>Select)<01>
2025-08-16 19:28:45 +08:00
Selectable<EFBFBD>DMLStatec<01><00>y<00>N<><00><01>dmls <20>6D:\aitsc\.venv\Lib\site-packages\sqlalchemy\sql\dml.py<70>isupdaterX`<00><00><00>c<EFBFBD>c<01><00>yrSrTrUs rW<00>isdeleter\brYrZc<01><00>yrSrTrUs rW<00>isinsertr^drYrZrXr\r^<00>_T)<01>boundc<01>F<00>eZdZUdZdZded<dZded<dZded<dZd ed
2025-02-23 09:07:52 +08:00
<d ed <dZ d Z
d Z d Z ded< dd<10>Z edd<11><04>Ze dd<12><04>Zedd<13><04>Zer ed d<14><04>Ze d!d<15><04>Ze d"d<16><04>Z d#d<17>Zd$d<18>Zd$d<19>Zd%d<1A>Zd&d<1B>Zy)'rQTNz0Optional[MutableMapping[_DMLColumnElement, Any]]<5D>_dict_parametersz6Optional[List[MutableMapping[_DMLColumnElement, Any]]]<5D>_multi_parameters<72>-Optional[List[Tuple[_DMLColumnElement, Any]]]<5D>_ordered_valuesz!Optional[List[_DMLColumnElement]]<5D>_parameter_orderingr/<00>_primary_tableF<65>
UpdateBase<EFBFBD> statementc <01><00>t<00><00>rS<00><01>NotImplementedError)<04>selfri<00>compiler<65>kws rW<00>__init__zDMLState.__init__<5F>s <00><00>"<22>#<23>#rZc<01>v<00>t|j<00>r|jjnd|jd<01>S)N)<02>name<6D>table)rrsrr<00><02>clsris rW<00>get_entity_descriptionzDMLState.get_entity_description<6F>s3<00><00>
(<28> <09><0F><0F>8<><1A><0F><0F>$<24>$<24><19><1E>_<EFBFBD>_<EFBFBD> 
<EFBFBD>
rZc<01>p<00>|jD<00>cgc]}|j|j|d<01><03><02>c}Scc}w)N)rr<00>type<70>expr)<03>_all_selected_columns<6E>keyrx)ruri<00>cs rW<00>!get_returning_column_descriptionsz*DMLState.get_returning_column_descriptions<6E>sF<00><00><1F>4<>4<> 
<EFBFBD> 5<><01> <1A><05><05><19><06><06><19> <0E>
5<> 
<EFBFBD>
<EFBFBD><EFBFBD>
s<00>!3c<01>.<00>|jjSrS)rirs<00>rms rW<00> dml_tablezDMLState.dml_table<6C>s<00><00><13>~<7E>~<7E>#<23>#<23>#rZc<01><00>yrSrTrts rW<00>get_plugin_classzDMLState.get_plugin_class<73>s<00><00>LOrZc <01><><00>|D<00><03><04>cgc]H}|j<00>D<00><04>cic]*\}}tjtj|<04>|<05><02>,c}}<04><02>Jc}}}Scc}}wcc}}}wrS)<05>itemsr<00>expectr<00> DMLColumnRole)ruri<00>multi_kv_iterator<6F>mapping<6E>k<>vs rW<00>_get_multi_crud_kv_pairsz!DMLState._get_multi_crud_kv_pairs<72>sl<00><00>-<2D> 
<EFBFBD>
-<2D><07>$<24>M<EFBFBD>M<EFBFBD>O<EFBFBD> <0E>+<2B>D<EFBFBD>A<EFBFBD>q<EFBFBD><1A> <20> <20><15>!4<>!4<>a<EFBFBD>8<>!<21>;<3B>+<2B> <0E>-<2D> 
<EFBFBD>
<EFBFBD><EFBFBD> <0E><>
s<00>A<08>/A<10>A<08>Ac <01><><00>|D<00><04>cgc]\\}}tjtj|<04>|s|n.tjtj|t <00>d<01><02>f<02><02>^c}}Scc}}w)NT)<02>type_<65>is_crud)rr<>rr<><00>ExpressionElementRoler6)ruri<00> kv_iterator<6F>needs_to_be_cacheabler<65>r<>s rW<00>_get_crud_kv_pairszDMLState._get_crud_kv_pairs<72>su<00><00>*$<24>
<EFBFBD>$<24><04><01>1<EFBFBD><1A> <20> <20><15>!4<>!4<>a<EFBFBD>8<>1<><16>"<22>)<29>)<29><1D>3<>3<><19>&<26>j<EFBFBD> $<24> <16> <0E>$<24>
<EFBFBD>
<EFBFBD><EFBFBD>
s<00>A!A+c<01><><00>g}ttj|j<00><00>}|d}|h}|j}|j
r&|t |j
j<00><00>z }|D]Y}t|<07>D]I}|j|j<00>s|j|<08>|j|j<00><00>K<00>[|j|dd<00>||fS)Nrr)<0E>list<73>sql_util<69>tables_from_leftmostrs<00>_where_criteriarb<00>tuple<6C>valuesr<00> intersection<6F> _cloned_set<65>append<6E>update<74>extend) rmri<00>froms<6D>
all_tables<EFBFBD> primary_table<6C>seen<65>consider<65>crit<69>items rW<00>_make_extra_fromszDMLState._make_extra_froms<6D>s<><00><00>#%<25><05><19>(<28>7<>7<> <09><0F><0F>H<>I<>
<EFBFBD>"<22>1<EFBFBD> <0A> <0A><1D><EFBFBD><04><1C>,<2C>,<2C><08> <0F> <20> <20> <14><05>d<EFBFBD>3<>3<>:<3A>:<3A><<3C>=<3D> =<3D>H<EFBFBD><1C>D<EFBFBD>%<25>d<EFBFBD>+<2B><04><1B>(<28>(<28><14>)9<>)9<>:<3A><19>L<EFBFBD>L<EFBFBD><14>&<26><14> <0B> <0B>D<EFBFBD>,<2C>,<2C>-<2D>,<2C><1D> <0E> <0C> <0C>Z<EFBFBD><01><02>^<5E>$<24><1C>e<EFBFBD>#<23>#rZc<01>N<00>|jr|j|_d|_yy<00>NF)<03>_no_parameters<72>_valuesrb<00>rmris rW<00>_process_valueszDMLState._process_values<65>s&<00><00> <0F> <1E> <1E>$-<2D>$5<>$5<>D<EFBFBD> !<21>"'<27>D<EFBFBD> <1F> rZc<01><><00>|j<00>J<00>|jD<00>cic] }|t<00><00><02>}}|jrd|_||_yJd<02><00>cc}w)NFz%This statement already has parameters)<04> _select_namesr,r<>rb)rmrirr<00>
parameterss rW<00>_process_select_valueszDMLState._process_select_values<65>sk<00><00><18>&<26>&<26>2<>2<>2<>%.<2E>%<<3C>%<<3C>>
<EFBFBD>%<<3C>T<EFBFBD>D<EFBFBD>$<24>&<26>L<EFBFBD>%<<3C> <13>>
<EFBFBD> <10> <1E> <1E>"'<27>D<EFBFBD> <1F>$.<2E>D<EFBFBD> !<21> B<01>A<> A<>5<EFBFBD><35>>
s<00>Ac<01>b<00>tjd|jj<00>z<00><00>)Nz6%s construct does not support multiple parameter sets.)r9<00>InvalidRequestError<6F>__visit_name__<5F>upperr<72>s rW<00>_no_multi_values_supportedz#DMLState._no_multi_values_supported<65>s2<00><00><11>%<25>%<25> '<27>)2<>)A<>)A<>)G<>)G<>)I<> J<01>
<EFBFBD>
rZc<01>,<00>tjd<01><00>)Nz<4E>Can't mix single and multiple VALUES formats in one INSERT statement; one style appends to a list while the other replaces values, so the intent is ambiguous.)r9r<>rs rW<00>_cant_mix_formats_errorz DMLState._cant_mix_formats_error<6F>s<00><00><11>%<25>%<25> <19>
<EFBFBD>
rZ)rirhrnrKror)rirh<00>return<72>Dict[str, Any])rirhr<><00>List[Dict[str, Any]]<5D>r<><00>_DMLTableElement)rir%r<>zType[DMLState])rirhr<>z'Iterable[Dict[_DMLColumnArgument, Any]]r<>z"List[Dict[_DMLColumnElement, Any]])rirhr<>z(Iterable[Tuple[_DMLColumnArgument, Any]]r<><00>boolr<6C>z#List[Tuple[_DMLColumnElement, Any]])ri<00> DMLWhereBaser<65>z#Tuple[FromClause, List[FromClause]]<5D>ri<00>
ValuesBaser<EFBFBD><00>None)rir<>r<>r
)r<>r
)<1C>__name__<5F>
__module__<EFBFBD> __qualname__r<5F>rb<00>__annotations__rcrerf<00>_supports_implicit_returningrXr\r^rp<00> classmethodrvr}<00>propertyr<79>rr<>r<>r<>r<>r<>r<>r<>r<>rTrZrWrQrQrsr<00><00><19>N<EFBFBD>IM<49><14>F<>M<> <0A><16><06> <0A>FJ<01>O<EFBFBD>B<>I<>=A<><17>:<3A>A<><1E><1E>#'<27> <20><14>H<EFBFBD><14>H<EFBFBD><14>H<EFBFBD><19><19>$<24>#<23>$<24>/:<3A>$<24>BE<42>$<24>
<11>
<EFBFBD><11>
<EFBFBD><11>

<EFBFBD>"<22>

<EFBFBD> <1D>

<EFBFBD><11>

<EFBFBD><0E>$<24><0E>$<24><15> <14>O<>
<15>O<><10> 
<EFBFBD><1D> 
<EFBFBD>C<01> 
<EFBFBD>
,<2C> 
<EFBFBD><11> 
<EFBFBD><11>
<EFBFBD><1D>
<EFBFBD>><3E>
<EFBFBD> $<24> 
<EFBFBD>
-<2D> 
<EFBFBD><11>
<EFBFBD>.$<24>%<25>$<24> ,<2C>$<24>,(<28>
B<01>
<EFBFBD> 
rZ<00>default<6C>insertc<01>h<00>eZdZdZdZdZ d d d<03>Zejd
d<04><04>Z d d<05>Z
d d<06>Z y) <0C>InsertDMLStateTFc <01><00>||_|j|_|rd|_d|_|j
r|j |<01>|j<00>|j|<01>|jr|j|<01>yy)NFT) rirsrgr<>r^r<>r<>r<>r<><00> _multi_values<65>_process_multi_values)rmrirn<00>disable_implicit_returningros rWrpzInsertDMLState.__init__sv<00><00>#<23><04><0E>'<27>o<EFBFBD>o<EFBFBD><04><1B> %<25>05<30>D<EFBFBD> -<2D><1C><04> <0A> <14> "<22> "<22> <10> '<27> '<27> <09> 2<> <14> <1C> <1C> (<28> <10> <20> <20><19> +<2B> <14> "<22> "<22> <10> &<26> &<26>y<EFBFBD> 1<> #rZc<01><><00>|jxsdD<00>cgc](}tjtj|d<02><03><00><02>*c}Scc}w)NrTT<><01>as_key)rbrr<>rr<>)rm<00>cols rW<00>_insert_col_keyszInsertDMLState._insert_col_keys$sL<00><00>
<1C>,<2C>,<2C>2<><02>2<>
<EFBFBD>2<><03> <16> <1C> <1C>U<EFBFBD>0<>0<>#<23>d<EFBFBD> C<>2<>
<EFBFBD>
<EFBFBD><EFBFBD>
s<00>-Ac<01><><00>|jr d|_|j|_d|_y|jr|j <00>yyr<>)r<><00>_has_multi_parametersr<73>rbr<>r<>s rWr<>zInsertDMLState._process_values,sC<00><00> <0F> <1E> <1E>).<2E>D<EFBFBD> &<26>$-<2D>$5<>$5<>D<EFBFBD> !<21>"'<27>D<EFBFBD> <1F> <11> '<27> '<27> <10> (<28> (<28> *<2A>(rZc <01><00>|jD]<5D>}|D<00><03><04>cgc]\}t|tj<00>r>t |j
j |<03>D<00><04>cic]\}}|j|<05><02>c}}n|<03><02>^}}}}|jr*d|_d|_ ||_
|jd|_ <00><>|js|j<00><00><>|jsJ<00>|jj|<06><00><>ycc}}wcc}}}w)NFTr)r<><00>
isinstance<EFBFBD>collections_abcr <00>ziprsr|r{r<>r<>rcrbr<>r<>)rmrir<><00> parameter_setr|<00>value<75>multi_parameterss rWr<>z$InsertDMLState._process_multi_values4s<00><00>#<23>1<>1<>J<EFBFBD>&0<>
N<0E>&0<>M<EFBFBD>"<22>-<2D><1F>1I<31>1I<31>J<>),<2C>I<EFBFBD>O<EFBFBD>O<EFBFBD>,=<3D>,=<3D>}<7D>(M<><16>(M<>H<EFBFBD>A<EFBFBD>u<EFBFBD><1A><05><05>u<EFBFBD> <0C>(M<><16>
'<27> '<27>&0<> <1D>
N<0E><14>"<22>"<22>&+<2B><04>#<23>-1<><04>*<2A>)9<><04>&<26>(,<2C>(><3E>(><3E>q<EFBFBD>(A<><04>%<25><19>/<2F>/<2F><14>,<2C>,<2C>.<2E><1B>-<2D>-<2D>-<2D>-<2D><14>&<26>&<26>-<2D>-<2D>.><3E>?<3F>-2<><32><16><>
Ns<00>AD
<EFBFBD>C:<12>/D
<EFBFBD>:D
N<EFBFBD>F)ri<00>InsertrnrKr<>r<>ror)r<>z List[str]r<>) r<>r<>r<>r^<00>include_table_with_column_exprsr<73>rpr<00>memoized_propertyr<79>r<>r<>rTrZrWr<>r<>sh<00><00><13>H<EFBFBD>&+<2B>#<23>!<21><19> ,1<> 2<><19>2<><1E>2<>%)<29> 2<>
<12> 2<>*
<EFBFBD><1B><1B>
<EFBFBD><1C>
<EFBFBD>+<2B>@rZr<>r<>c<01>$<00>eZdZdZdZdd<03>Zdd<04>Zy)<08>UpdateDMLStateTFc <01>d<00>||_d|_|j<00>|j|<01>n;|j<00>|j |<01>n|j r|j|<01>|j|<01>\}}||_ ||_
|x|_ }t|xr |j<00>|_y<00>NT)rirXre<00>_process_ordered_valuesr<73>r<>r<>r<>r<>rg<00> _extra_froms<6D> is_multitabler<65><00>'render_table_with_column_in_update_fromr<6D>)rmrirnro<00>t<>ef<65>mts rWrpzUpdateDMLState.__init__Ts<><00><00>"<22><04><0E><1C><04> <0A> <14> $<24> $<24> 0<> <10> (<28> (<28><19> 3<> <16> <1E> <1E> *<2A> <10> <20> <20><19> +<2B> <16> $<24> $<24> <10> +<2B> +<2B>I<EFBFBD> 6<><14>&<26>&<26>y<EFBFBD>1<><05><01>2<EFBFBD><1F><04><1B><1E><04><19>"$<24>$<24><04><1A>R<EFBFBD>/3<> <0E> C<>8<EFBFBD>C<>C<>0
<EFBFBD><04>,rZc<01><><00>|j}|jr=d|_|<02>J<00>t|<02>|_||_|D<00><03>cgc]\}}|<03><02> c}}|_yt j d<02><00>cc}}w)NFzQCan only invoke ordered_values() once, and not mixed with any other values() call)rer<><00>dictrbrfr9r<>)rmrir<>r{r<>s rWr<>z&UpdateDMLState._process_ordered_valuesgsx<00><00><1E>.<2E>.<2E>
<EFBFBD> <0F> <1E> <1E>"'<27>D<EFBFBD> <1F><1D>)<29> )<29>)<29>$(<28><1A>$4<>D<EFBFBD> !<21>#-<2D>D<EFBFBD> <20>>H<>'I<>j<EFBFBD>
<EFBFBD><03>U<EFBFBD><03>j<EFBFBD>'I<>D<EFBFBD> $<24><15>)<29>)<29>/<2F><0E> <0E><>(Js<00> A+N)ri<00>UpdaternrKrorr<>)r<>r<>r<>rXr<>rpr<>rTrZrWr<>r<>Ns<00><00><13>H<EFBFBD>&+<2B>#<23>
<EFBFBD>& rZr<><00>deletec<01><00>eZdZdZdd<02>Zy)<05>DeleteDMLStateTc <01>r<00>||_d|_|j|<01>\}}||_||_||_yr<>)rir\r<>rgr<>r<>)rmrirnror<>r<>s rWrpzDeleteDMLState.__init__{s<<00><00>"<22><04><0E><1C><04> <0A><14>&<26>&<26>y<EFBFBD>1<><05><01>2<EFBFBD><1F><04><1B><1E><04><19><1F><04>rZN)ri<00>DeleternrKror)r<>r<>r<>r\rprTrZrWr<>r<>ws <00><00><13>H<EFBFBD> rZr<>c<01><><00>eZdZUdZdZej Zded<dZ e
jZ ded<ded <dZ d
Zd ed <d
Zd ed <dZded<dZ dd<12>Zd d<13>Zed!d<14><04>Zed
dd<15> d"d<16><06>Zedd<17> d#d<18><06>Z d$ d%d<19>Zej2d&d<1A><04>Zej2 d'd<1B><04>Ze d( d)d<1C><05>Zed*d<1D><04>Zed+d<1E><04>Zy
),rhzDForm the base for ``INSERT``, ``UPDATE``, and ``DELETE`` statements.<2E> update_basez5util.immutabledict[Tuple[_DMLTableElement, str], str]<5D>_hintsFr3<00> _label_styler<65>rsNz+Optional[Tuple[_ColumnsClauseElement, ...]]<5D>_return_defaults_columns<6E>_supplemental_returningrTz!Tuple[_ColumnsClauseElement, ...]<5D>
_returningTc<01>V<00><01><03><04>|j<00><04><01>fd<01>|jD<00><00>y)Nc3<01>\<00>K<00>|]#}t|<01>r|j<00><03><04><02><00><00><01><00>%y<01>w))<02> primary_key<65> foreign_keysN)r<00> _make_proxy)<05>.0r<EFBFBD>r<00>
fromclauser<EFBFBD>s <20><><EFBFBD>rW<00> <genexpr>zAUpdateBase._generate_fromclause_column_proxies.<locals>.<genexpr><3E>s:<00><><00><><00>(
<EFBFBD>2<><03> <20><13>%<25> <10>O<EFBFBD>O<EFBFBD><1A> <0B>,<2C> <1C> <0E>2<>s<00>),)<02>_populate_separate_keysrz)rmr<00>columnsr<73>rs ` ``rW<00>#_generate_fromclause_column_proxiesz.UpdateBase._generate_fromclause_column_proxies<65>s(<00><><00> <10>'<27>'<27>(
<EFBFBD><1C>1<>1<> (
<EFBFBD>
rZc<01><00>td<01><00>)z<>Set the parameters for the statement.
This method raises ``NotImplementedError`` on the base class,
and is overridden by :class:`.ValuesBase` to provide the
SET/VALUES clause of UPDATE and INSERT.
z<>params() is not supported for INSERT/UPDATE/DELETE statements. To set the values for an INSERT or UPDATE statement, use stmt.values(**parameters).rk)rm<00>argros rW<00>paramszUpdateBase.params<6D>s<00><00>"<22> *<2A>
<EFBFBD>
rZc <01>(<00>|j|<01>|S)a Add dialect options to this INSERT/UPDATE/DELETE object.
e.g.::
upd = table.update().dialect_options(mysql_limit=10)
.. versionadded: 1.4 - this method supersedes the dialect options
associated with the constructor.
)<01>_validate_dialect_kwargs)rm<00>opts rW<00>with_dialect_optionszUpdateBase.with_dialect_options<6E>s<00><00> <0A>%<25>%<25>c<EFBFBD>*<2A><13> rZ)<02>supplemental_cols<6C>sort_by_parameter_orderc<01>L<00>|jrZ|jrF|rDttj|j<00>j d<01>|D<00><00><00>|_nd|_ntd<03>|D<00><00>|_d|_|r(|j stjd<05><00>d|_ |rsd<06>|D<00>}|j<00>%ttj|<04><00>|_
|Sttj|jt|<04>z<00><00>|_
|S)aA$Make use of a :term:`RETURNING` clause for the purpose
of fetching server-side expressions and defaults, for supporting
backends only.
.. deepalchemy::
The :meth:`.UpdateBase.return_defaults` method is used by the ORM
for its internal work in fetching newly generated primary key
and server default values, in particular to provide the underyling
implementation of the :paramref:`_orm.Mapper.eager_defaults`
ORM feature as well as to allow RETURNING support with bulk
ORM inserts. Its behavior is fairly idiosyncratic
and is not really intended for general use. End users should
stick with using :meth:`.UpdateBase.returning` in order to
add RETURNING clauses to their INSERT, UPDATE and DELETE
statements.
Normally, a single row INSERT statement will automatically populate the
:attr:`.CursorResult.inserted_primary_key` attribute when executed,
which stores the primary key of the row that was just inserted in the
form of a :class:`.Row` object with column names as named tuple keys
(and the :attr:`.Row._mapping` view fully populated as well). The
dialect in use chooses the strategy to use in order to populate this
data; if it was generated using server-side defaults and / or SQL
expressions, dialect-specific approaches such as ``cursor.lastrowid``
or ``RETURNING`` are typically used to acquire the new primary key
value.
However, when the statement is modified by calling
:meth:`.UpdateBase.return_defaults` before executing the statement,
additional behaviors take place **only** for backends that support
RETURNING and for :class:`.Table` objects that maintain the
:paramref:`.Table.implicit_returning` parameter at its default value of
``True``. In these cases, when the :class:`.CursorResult` is returned
from the statement's execution, not only will
:attr:`.CursorResult.inserted_primary_key` be populated as always, the
:attr:`.CursorResult.returned_defaults` attribute will also be
populated with a :class:`.Row` named-tuple representing the full range
of server generated
values from that single row, including values for any columns that
specify :paramref:`_schema.Column.server_default` or which make use of
:paramref:`_schema.Column.default` using a SQL expression.
When invoking INSERT statements with multiple rows using
:ref:`insertmanyvalues <engine_insertmanyvalues>`, the
:meth:`.UpdateBase.return_defaults` modifier will have the effect of
the :attr:`_engine.CursorResult.inserted_primary_key_rows` and
:attr:`_engine.CursorResult.returned_defaults_rows` attributes being
fully populated with lists of :class:`.Row` objects representing newly
inserted primary key values as well as newly inserted server generated
values for each row inserted. The
:attr:`.CursorResult.inserted_primary_key` and
:attr:`.CursorResult.returned_defaults` attributes will also continue
to be populated with the first row of these two collections.
If the backend does not support RETURNING or the :class:`.Table` in use
has disabled :paramref:`.Table.implicit_returning`, then no RETURNING
clause is added and no additional data is fetched, however the
INSERT, UPDATE or DELETE statement proceeds normally.
E.g.::
stmt = table.insert().values(data="newdata").return_defaults()
result = connection.execute(stmt)
server_created_at = result.returned_defaults["created_at"]
When used against an UPDATE statement
:meth:`.UpdateBase.return_defaults` instead looks for columns that
include :paramref:`_schema.Column.onupdate` or
:paramref:`_schema.Column.server_onupdate` parameters assigned, when
constructing the columns that will be included in the RETURNING clause
by default if explicit columns were not specified. When used against a
DELETE statement, no columns are included in RETURNING by default, they
instead must be specified explicitly as there are no columns that
normally change values when a DELETE statement proceeds.
.. versionadded:: 2.0 :meth:`.UpdateBase.return_defaults` is supported
for DELETE statements also and has been moved from
:class:`.ValuesBase` to :class:`.UpdateBase`.
The :meth:`.UpdateBase.return_defaults` method is mutually exclusive
against the :meth:`.UpdateBase.returning` method and errors will be
raised during the SQL compilation process if both are used at the same
time on one statement. The RETURNING clause of the INSERT, UPDATE or
DELETE statement is therefore controlled by only one of these methods
at a time.
The :meth:`.UpdateBase.return_defaults` method differs from
:meth:`.UpdateBase.returning` in these ways:
1. :meth:`.UpdateBase.return_defaults` method causes the
:attr:`.CursorResult.returned_defaults` collection to be populated
with the first row from the RETURNING result. This attribute is not
populated when using :meth:`.UpdateBase.returning`.
2. :meth:`.UpdateBase.return_defaults` is compatible with existing
logic used to fetch auto-generated primary key values that are then
populated into the :attr:`.CursorResult.inserted_primary_key`
attribute. By contrast, using :meth:`.UpdateBase.returning` will
have the effect of the :attr:`.CursorResult.inserted_primary_key`
attribute being left unpopulated.
3. :meth:`.UpdateBase.return_defaults` can be called against any
backend. Backends that don't support RETURNING will skip the usage
of the feature, rather than raising an exception, *unless*
``supplemental_cols`` is passed. The return value
of :attr:`_engine.CursorResult.returned_defaults` will be ``None``
for backends that don't support RETURNING or for which the target
:class:`.Table` sets :paramref:`.Table.implicit_returning` to
``False``.
4. An INSERT statement invoked with executemany() is supported if the
backend database driver supports the
:ref:`insertmanyvalues <engine_insertmanyvalues>`
feature which is now supported by most SQLAlchemy-included backends.
When executemany is used, the
:attr:`_engine.CursorResult.returned_defaults_rows` and
:attr:`_engine.CursorResult.inserted_primary_key_rows` accessors
will return the inserted defaults and primary keys.
.. versionadded:: 1.4 Added
:attr:`_engine.CursorResult.returned_defaults_rows` and
:attr:`_engine.CursorResult.inserted_primary_key_rows` accessors.
In version 2.0, the underlying implementation which fetches and
populates the data for these attributes was generalized to be
supported by most backends, whereas in 1.4 they were only
supported by the ``psycopg2`` driver.
:param cols: optional list of column key names or
:class:`_schema.Column` that acts as a filter for those columns that
will be fetched.
:param supplemental_cols: optional list of RETURNING expressions,
in the same form as one would pass to the
:meth:`.UpdateBase.returning` method. When present, the additional
columns will be included in the RETURNING clause, and the
:class:`.CursorResult` object will be "rewound" when returned, so
that methods like :meth:`.CursorResult.all` will return new rows
mostly as though the statement used :meth:`.UpdateBase.returning`
directly. However, unlike when using :meth:`.UpdateBase.returning`
directly, the **order of the columns is undefined**, so can only be
targeted using names or :attr:`.Row._mapping` keys; they cannot
reliably be targeted positionally.
.. versionadded:: 2.0
:param sort_by_parameter_order: for a batch INSERT that is being
executed against multiple parameter sets, organize the results of
RETURNING so that the returned rows correspond to the order of
parameter sets passed in. This applies only to an :term:`executemany`
execution for supporting dialects and typically makes use of the
:term:`insertmanyvalues` feature.
.. versionadded:: 2.0.10
.. seealso::
:ref:`engine_insertmanyvalues_returning_order` - background on
sorting of RETURNING rows for bulk INSERT
.. seealso::
:meth:`.UpdateBase.returning`
:attr:`_engine.CursorResult.returned_defaults`
:attr:`_engine.CursorResult.returned_defaults_rows`
:attr:`_engine.CursorResult.inserted_primary_key`
:attr:`_engine.CursorResult.inserted_primary_key_rows`
c3<01>dK<00>|](}tjtj|<01><00><01><00>*y<00>wrS<00>rr<>r<00>ColumnsClauseRole<6C>rr|s rWrz-UpdateBase.return_defaults.<locals>.<genexpr><3E>s,<00><00><><00>I<16>!%<25>A<EFBFBD>"<22>(<28>(<28><15>)@<40>)@<40>!<21>D<>!%<25><><00>.0rTc3<01>dK<00>|](}tjtj|<01><00><01><00>*y<00>wrSrrs rWrz-UpdateBase.return_defaults.<locals>.<genexpr><3E>s'<00><00><><00>2<0E>FJ<46><11> <09> <20> <20><15>!8<>!8<>!<21><<3C>d<EFBFBD>rTz]The 'sort_by_parameter_order' argument to return_defaults() only applies to INSERT statementsc3<01>dK<00>|](}tjtj|<01><00><01><00>*y<00>wrSrrs rWrz-UpdateBase.return_defaults.<locals>.<genexpr><3E>s+<00><00><><00>$<0E>*<2A>A<EFBFBD><1A> <20> <20><15>!8<>!8<>!<21><<3C>*<2A>r) <0C>_return_defaultsr<73>r<>r<00>
OrderedSet<EFBFBD>union<6F> is_insertr9<00> ArgumentError<6F>_sort_by_parameter_orderr<72><00> unique_list)rmrr<00>cols<6C>supplemental_col_tups rW<00>return_defaultszUpdateBase.return_defaults<74>s.<00><00>n <10> <20> <20><14>,<2C>,<2C><14>05<30><18>O<EFBFBD>O<EFBFBD>D<EFBFBD>$A<>$A<>B<>H<>H<>I<16>!%<25>I<16><16>1<12><04>-<2D>13<31><04>-<2D>,1<>2<0E>FJ<46>2<0E>-<0E>D<EFBFBD> )<29>!%<25><04><1D> "<22><17>><3E>><3E><19>'<27>'<27>J<01><12><12>-1<>D<EFBFBD> )<29> <1C>$<0E>*<2A>$<0E> <20>
<14>+<2B>+<2B>3<>/4<><18>$<24>$<24>%9<>:<3A>0<12><04>,<2C><14> <0B>05<30><18>$<24>$<24><1C>4<>4<><1F> 4<>5<>6<><16>0<12><04>,<2C><14> rZ<00>rc<01><00>|r td|<03><00>|jrtjd<02><00>|xjt d<03>|D<00><00>z c_|r(|j stjd<04><00>d|_|S)aRAdd a :term:`RETURNING` or equivalent clause to this statement.
e.g.:
.. sourcecode:: pycon+sql
>>> stmt = (
... table.update()
... .where(table.c.data == "value")
... .values(status="X")
... .returning(table.c.server_flag, table.c.updated_timestamp)
... )
>>> print(stmt)
{printsql}UPDATE some_table SET status=:status
WHERE some_table.data = :data_1
RETURNING some_table.server_flag, some_table.updated_timestamp
The method may be invoked multiple times to add new entries to the
list of expressions to be returned.
.. versionadded:: 1.4.0b2 The method may be invoked multiple times to
add new entries to the list of expressions to be returned.
The given collection of column expressions should be derived from the
table that is the target of the INSERT, UPDATE, or DELETE. While
:class:`_schema.Column` objects are typical, the elements can also be
expressions:
.. sourcecode:: pycon+sql
>>> stmt = table.insert().returning(
... (table.c.first_name + " " + table.c.last_name).label("fullname")
... )
>>> print(stmt)
{printsql}INSERT INTO some_table (first_name, last_name)
VALUES (:first_name, :last_name)
RETURNING some_table.first_name || :first_name_1 || some_table.last_name AS fullname
Upon compilation, a RETURNING clause, or database equivalent,
will be rendered within the statement. For INSERT and UPDATE,
the values are the newly inserted/updated values. For DELETE,
the values are those of the rows which were deleted.
Upon execution, the values of the columns to be returned are made
available via the result set and can be iterated using
:meth:`_engine.CursorResult.fetchone` and similar.
For DBAPIs which do not
natively support returning values (i.e. cx_oracle), SQLAlchemy will
approximate this behavior at the result level so that a reasonable
amount of behavioral neutrality is provided.
Note that not all databases/DBAPIs
support RETURNING. For those backends with no support,
an exception is raised upon compilation and/or execution.
For those who do support it, the functionality across backends
varies greatly, including restrictions on executemany()
and other statements which return multiple rows. Please
read the documentation notes for the database in use in
order to determine the availability of RETURNING.
:param \*cols: series of columns, SQL expressions, or whole tables
entities to be returned.
:param sort_by_parameter_order: for a batch INSERT that is being
executed against multiple parameter sets, organize the results of
RETURNING so that the returned rows correspond to the order of
parameter sets passed in. This applies only to an :term:`executemany`
execution for supporting dialects and typically makes use of the
:term:`insertmanyvalues` feature.
.. versionadded:: 2.0.10
.. seealso::
:ref:`engine_insertmanyvalues_returning_order` - background on
sorting of RETURNING rows for bulk INSERT (Core level discussion)
:ref:`orm_queryguide_bulk_insert_returning_ordered` - example of
use with :ref:`orm_queryguide_bulk_insert` (ORM level discussion)
.. seealso::
:meth:`.UpdateBase.return_defaults` - an alternative method tailored
towards efficient fetching of server-side defaults and triggers
for single-row INSERTs or UPDATEs.
:ref:`tutorial_insert_returning` - in the :ref:`unified_tutorial`
zUpdateBase.returning()z9return_defaults() is already configured on this statementc3<01>dK<00>|](}tjtj|<01><00><01><00>*y<00>wrSrrs rWrz'UpdateBase.returning.<locals>.<genexpr>s'<00><00><><00>!
<EFBFBD>BF<EFBFBD>Q<EFBFBD>I<EFBFBD> <1C> <1C>U<EFBFBD>4<>4<>a<EFBFBD> 8<>$<24>rzWThe 'sort_by_parameter_order' argument to returning() only applies to INSERT statementsT) rrr9r<>r<>r<>rrr)rmrr <00>_UpdateBase__kws rW<00> returningzUpdateBase.returning<6E>s<><00><00>~ <10> <20>!9<>4<EFBFBD>@<40> @<40> <0F> <20> <20><15>)<29>)<29>K<><0E> <0E> <0A><0F><0F>5<EFBFBD>!
<EFBFBD>BF<EFBFBD>!
<EFBFBD>
<EFBFBD>
<EFBFBD><0F> #<23><17>><3E>><3E><19>'<27>'<27>8<><12><12>-1<>D<EFBFBD> )<29><13> rZc<01><<00>|jj||<02><01>S)N)<01>require_embedded)<02>exported_columns<6E>corresponding_column)rm<00>columnr)s rWr+zUpdateBase.corresponding_column+s(<00><00><14>$<24>$<24>9<>9<> <12>%5<>:<3A>
<EFBFBD>
rZc<01>R<00>t|j<00>D<00>cgc]}|<01><02>c}Scc}wrS)r r<>)rmr|s rWrzz UpdateBase._all_selected_columns2s%<00><00>,<2C>T<EFBFBD>_<EFBFBD>_<EFBFBD>=<3D>><3E>=<3D>a<EFBFBD><01>=<3D>><3E>><3E><>>s<00> $c<01>V<00>td<01>|jD<00><00>j<00>S)zxReturn the RETURNING columns as a column collection for this
statement.
.. versionadded:: 1.4
c3<01>NK<00>|]}t|<01>r|j|f<02><01><00>y<00>wrS)rr{rs rWrz.UpdateBase.exported_columns.<locals>.<genexpr>@s(<00><00><><00>
<EFBFBD>/<2F><01> <20><11>#<23><0F>U<EFBFBD>U<EFBFBD>A<EFBFBD>J<EFBFBD>/<2F>s<00>#%)r!rz<00> as_readonlyrs rWr*zUpdateBase.exported_columns6s-<00><00> <20>
<EFBFBD><19>/<2F>/<2F>
<EFBFBD>
<EFBFBD> <16>+<2B>-<2D>  rZc<01><><00>|<02> |j}n$tjtj|<02>}|j
j ||f|i<01>|_|S)aAdd a table hint for a single table to this
INSERT/UPDATE/DELETE statement.
.. note::
:meth:`.UpdateBase.with_hint` currently applies only to
Microsoft SQL Server. For MySQL INSERT/UPDATE/DELETE hints, use
:meth:`.UpdateBase.prefix_with`.
The text of the hint is rendered in the appropriate
location for the database backend in use, relative
to the :class:`_schema.Table` that is the subject of this
statement, or optionally to that of the given
:class:`_schema.Table` passed as the ``selectable`` argument.
The ``dialect_name`` option will limit the rendering of a particular
hint to a particular backend. Such as, to add a hint
that only takes effect for SQL Server::
mytable.insert().with_hint("WITH (PAGLOCK)", dialect_name="mssql")
:param text: Text of the hint.
:param selectable: optional :class:`_schema.Table` that specifies
an element of the FROM clause within an UPDATE or DELETE
to be the subject of the hint - applies only to certain backends.
:param dialect_name: defaults to ``*``, if specified as the name
of a particular dialect, will apply these hints only when
that dialect is in use.
)rsrr<>r<00> DMLTableRoler<65>r)rm<00>text<78>
selectable<EFBFBD> dialect_names rW<00> with_hintzUpdateBase.with_hintFsQ<00><00>H <16> <1D><1D><1A><1A>J<EFBFBD>"<22>)<29>)<29>%<25>*<<3C>*<<3C>j<EFBFBD>I<>J<EFBFBD><1A>k<EFBFBD>k<EFBFBD>'<27>'<27>*<2A>l<EFBFBD>)C<>T<EFBFBD>(J<>K<><04> <0B><13> rZc<01>P<00>tj|<00>j}||<00>S)a=Return a :term:`plugin-enabled` description of the table and/or
entity which this DML construct is operating against.
This attribute is generally useful when using the ORM, as an
extended structure which includes information about mapped
entities is returned. The section :ref:`queryguide_inspection`
contains more background.
For a Core statement, the structure returned by this accessor
is derived from the :attr:`.UpdateBase.table` attribute, and
refers to the :class:`.Table` being inserted, updated, or deleted::
>>> stmt = insert(user_table)
>>> stmt.entity_description
{
"name": "user_table",
"table": Table("user_table", ...)
}
.. versionadded:: 1.4.33
.. seealso::
:attr:`.UpdateBase.returning_column_descriptions`
:attr:`.Select.column_descriptions` - entity information for
a :func:`.select` construct
:ref:`queryguide_inspection` - ORM background
)rQr<>rv<00>rm<00>meths rW<00>entity_descriptionzUpdateBase.entity_descriptionqs%<00><00>B<18>(<28>(<28><14>.<2E>E<>E<><04><13>D<EFBFBD>z<EFBFBD>rZc<01>P<00>tj|<00>j}||<00>S)a<>Return a :term:`plugin-enabled` description of the columns
which this DML construct is RETURNING against, in other words
the expressions established as part of :meth:`.UpdateBase.returning`.
This attribute is generally useful when using the ORM, as an
extended structure which includes information about mapped
entities is returned. The section :ref:`queryguide_inspection`
contains more background.
For a Core statement, the structure returned by this accessor is
derived from the same objects that are returned by the
:attr:`.UpdateBase.exported_columns` accessor::
>>> stmt = insert(user_table).returning(user_table.c.id, user_table.c.name)
>>> stmt.entity_description
[
{
"name": "id",
"type": Integer,
"expr": Column("id", Integer(), table=<user>, ...)
},
{
"name": "name",
"type": String(),
"expr": Column("name", String(), table=<user>, ...)
},
]
.. versionadded:: 1.4.33
.. seealso::
:attr:`.UpdateBase.entity_description`
:attr:`.Select.column_descriptions` - entity information for
a :func:`.select` construct
:ref:`queryguide_inspection` - ORM background
)rQr<>r}r8s rW<00>returning_column_descriptionsz(UpdateBase.returning_column_descriptions<6E>s-<00><00>T<18>(<28>(<28> <10>
<EFBFBD>
+<2B>
+<2B> <0A><14>D<EFBFBD>z<EFBFBD>rZ)
rr/rz.ColumnCollection[str, KeyedColumnElement[Any]]r<>r"rzSet[KeyedColumnElement[Any]]r<>r<>)r rrorr<>r
)r rr<>r:)r r>rz&Optional[Iterable[_DMLColumnArgument]]rr<>r<>r:)r <00>_ColumnsClauseArgument[Any]rr<>r&rr<>rhr<>)r,zKeyedColumnElement[Any]r)r<>r<><00>Optional[ColumnElement[Any]])r<>rN)r<>z;ReadOnlyColumnCollection[Optional[str], ColumnElement[Any]])N<>*)r3<00>strr4zOptional[_DMLTableArgument]r5r@r<>r:)r<>r<>)r<>r<>) r<>r<>r<><00>__doc__r<5F>r<00>
EMPTY_DICTr<EFBFBD>r<><00>named_with_columnr3<00>LABEL_STYLE_DISAMBIGUATE_ONLYr<59>rr<>r<>r<><00>is_dmlrr
rrr"r'r+<00>ro_memoized_propertyrzr*r6r<>r:r<rTrZrWrhrh<00>s.<00><00>O<01>"<22>N<EFBFBD> <0A><0F><0F> <0B> A<><06><1E><15> <19>6<>6<><11>"<22><06> <1C><1B><1C><14> <0C><1D>I<><06>LP<01><1B>H<>O<>46<34>J<EFBFBD>1<>6<> <11>F<EFBFBD> 
<EFBFBD><1E> 
<EFBFBD>@<01> 
<EFBFBD><1F> 
<EFBFBD>
3<> 
<EFBFBD>
<0E> 
<EFBFBD> 
<EFBFBD><11> <14><11> <14><11>EI<01>(-<2D> d<14>!<21>d<14>B<01>d<14>"&<26> d<14>
<0E> d<14><11>d<14>L<11>).<2E>n<14>*<2A>n<14>"&<26>n<14><14> n<14>
<14> n<14><11>n<14>bIN<01>
<EFBFBD>-<2D>
<EFBFBD>AE<EFBFBD>
<EFBFBD> %<25>
<EFBFBD>
<EFBFBD><1E><1E>?<3F><1F>?<3F>
<EFBFBD><1E><1E> <18> D<> <18><1F> <18><11>37<33><1F> (<14><11>(<14>0<>(<14><1A> (<14>
<0E> (<14><11>(<14>T<0E>!<1A><0E>!<1A>F<0E>,<1A><0E>,rZrhc<01><><00>eZdZUdZdZdZdZded< dZded< dZ d ed
<d Z
d ed <dZ ded<dZ ded<dZ ded<dd<14>Zeeddddd<17><02><18> dd<19><04><00>Zy)r<>zTSupplies support for :meth:`.ValuesBase.values` to
INSERT and UPDATE constructs.<2E> values_baseFNzOptional[Select[Any]]<5D>selectzOptional[ClauseElement]<5D>_post_values_clausez4Optional[util.immutabledict[_DMLColumnElement, Any]]r<>rTzRTuple[Union[Sequence[Dict[_DMLColumnElement, Any]], Sequence[Sequence[Any]]], ...]r<>rdrezOptional[List[str]]r<>r<><00>_inlinec<01>Z<00>tjtj||<00><01>|_y<00>N<><01>apply_propagate_attrs<72>rr<>rr2rs<00>rmrss rWrpzValuesBase.__init__<5F><00>!<00><00><1E>%<25>%<25> <11> <1E> <1E><05>T<EFBFBD>
<EFBFBD><04>
rZz,This construct already inserts from a SELECT<43>1This statement already has ordered values present)r<>re)<01>msgsc<01><><00>|<01>r5|d}|rtjd<02><00>t|<01>dkDrtjd<04><00>t|tj
<00>r<>|rQt|dt <00>r>tj|<00>j}|xj|||<03>fz c_
|S|r1t|dttf<02>r|xj|fz c_
|Strt|t<00>sJ<00>t|j j"|<03>D<00><05>cic]\}}|j$|<06><02>}}}n#t'd|<02>}|rtjd<04><00>tj|<00>j(}t |||j+<00>d<06><00>}|j,r"|j,j/|<08>|_|St1j2|<08>|_|Scc}}w)aYSpecify a fixed VALUES clause for an INSERT statement, or the SET
clause for an UPDATE.
Note that the :class:`_expression.Insert` and
:class:`_expression.Update`
constructs support
per-execution time formatting of the VALUES and/or SET clauses,
based on the arguments passed to :meth:`_engine.Connection.execute`.
However, the :meth:`.ValuesBase.values` method can be used to "fix" a
particular set of parameters into the statement.
Multiple calls to :meth:`.ValuesBase.values` will produce a new
construct, each one with the parameter list modified to include
the new parameters sent. In the typical case of a single
dictionary of parameters, the newly passed keys will replace
the same keys in the previous construct. In the case of a list-based
"multiple values" construct, each new list of values is extended
onto the existing list of values.
:param \**kwargs: key value pairs representing the string key
of a :class:`_schema.Column`
mapped to the value to be rendered into the
VALUES or SET clause::
users.insert().values(name="some name")
users.update().where(users.c.id == 5).values(name="some name")
:param \*args: As an alternative to passing key/value parameters,
a dictionary, tuple, or list of dictionaries or tuples can be passed
as a single positional argument in order to form the VALUES or
SET clause of the statement. The forms that are accepted vary
based on whether this is an :class:`_expression.Insert` or an
:class:`_expression.Update` construct.
For either an :class:`_expression.Insert` or
:class:`_expression.Update`
construct, a single dictionary can be passed, which works the same as
that of the kwargs form::
users.insert().values({"name": "some name"})
users.update().values({"name": "some new name"})
Also for either form but more typically for the
:class:`_expression.Insert` construct, a tuple that contains an
entry for every column in the table is also accepted::
users.insert().values((5, "some name"))
The :class:`_expression.Insert` construct also supports being
passed a list of dictionaries or full-table-tuples, which on the
server will render the less common SQL syntax of "multiple values" -
this syntax is supported on backends such as SQLite, PostgreSQL,
MySQL, but not necessarily others::
users.insert().values(
[
{"name": "some name"},
{"name": "some other name"},
{"name": "yet another name"},
]
)
The above form would render a multiple VALUES statement similar to:
.. sourcecode:: sql
INSERT INTO users (name) VALUES
(:name_1),
(:name_2),
(:name_3)
It is essential to note that **passing multiple values is
NOT the same as using traditional executemany() form**. The above
syntax is a **special** syntax not typically used. To emit an
INSERT statement against multiple rows, the normal method is
to pass a multiple values list to the
:meth:`_engine.Connection.execute`
method, which is supported by all database backends and is generally
more efficient for a very large number of parameters.
.. seealso::
:ref:`tutorial_multiple_parameters` - an introduction to
the traditional Core method of multiple parameter set
invocation for INSERTs and other statements.
The UPDATE construct also supports rendering the SET parameters
in a specific order. For this feature refer to the
:meth:`_expression.Update.ordered_values` method.
.. seealso::
:meth:`_expression.Update.ordered_values`
rz;Can't pass positional and kwargs to values() simultaneouslyrzWOnly a single dictionary/tuple or list of dictionaries/tuples is accepted positionally.zDict[_DMLColumnArgument, Any]T)r9r<00>lenr<6E>r<>r r<>rQr<>r<>r<>r<>r<>rr<>r<>rsr|r{rr<>r<>r<>rr<00> immutabledict) rm<00>args<67>kwargsr <00>multi_kv_generatorr|r<><00> kv_generator<6F> coerced_args rWr<>zValuesBase.values<65>s<><00><00>h <10> <17>q<EFBFBD>'<27>C<EFBFBD><15><19>'<27>'<27>%<25><12><12><15>T<EFBFBD><19>Q<EFBFBD><1D><19>'<27>'<27>D<01><12><12>
<1C>C<EFBFBD><1F>!9<>!9<>:<3A><16>:<3A>c<EFBFBD>!<21>f<EFBFBD>d<EFBFBD>3<>)1<>)B<>)B<><1C>*<16>.<2E>.<2E>'<27><19>&<26>&<26>+=<3D>d<EFBFBD>C<EFBFBD>+H<>*J<>J<>&<26><1F>K<EFBFBD><16>:<3A>c<EFBFBD>!<21>f<EFBFBD>t<EFBFBD>U<EFBFBD>m<EFBFBD><<3C><18>&<26>&<26>3<EFBFBD>&<26>0<>&<26><1F>K<EFBFBD> <20>&<26>d<EFBFBD>F<EFBFBD>3<>3<>3<>58<35><04>
<EFBFBD>
<EFBFBD> <0C> <0C>c<EFBFBD>4J<34>K<>4J<34><08><01>5<EFBFBD>q<EFBFBD>u<EFBFBD>u<EFBFBD>e<EFBFBD>|<7C>4J<34><03>K<>
<17>6<><06>?<3F>C<EFBFBD><13><19>'<27>'<27>D<01><12><12> <20>0<>0<><14>6<>I<>I<> <0C><1A><<3C><04>c<EFBFBD>i<EFBFBD>i<EFBFBD>k<EFBFBD>4<EFBFBD>@<40>A<> <0B> <0F><<3C><<3C><1F><<3C><<3C>-<2D>-<2D>k<EFBFBD>:<3A>D<EFBFBD>L<EFBFBD><14> <0B> <20>-<2D>-<2D>k<EFBFBD>:<3A>D<EFBFBD>L<EFBFBD><13> <0B><>1Ls<00>G&<06>rsr@)rXz/Union[_DMLColumnKeyMapping[Any], Sequence[Any]]rYrr<>r:)r<>r<>r<>rAr<><00>_supports_multi_parametersrIr<>rJr<>r<>rer<>rKrprrr<>rTrZrWr<>r<><00>s<><00><00>%<25>#<23>N<EFBFBD>!&<26><1E>$(<28>F<EFBFBD> !<21>(<28>4<>37<33><17>0<>7<>)<29>EI<01>G<EFBFBD> A<>H<> <0B> <12><06> <0B>FJ<01>O<EFBFBD>B<>I<>)-<2D>M<EFBFBD>&<26>-<2D><19>G<EFBFBD>T<EFBFBD><19>
<EFBFBD>
<11><17><17><19>K<> <1D>
<EFBFBD><06>g<14>
<EFBFBD>g<14> <16> g<14>
<0E>g<14><06><11>grZr<>c <01><><00><00>eZdZUdZdZdZdZdZdZde d<dZ
de d <d e jfd
e jfd e jfd e jfd e j fde jfde jfde j"fde j$fde jfde j"fde jfg ej(zej,zej0zej4zZd"<22>fd<14> Zed#d<15><04>Ze d$ d%d<16><05>Ze r<>e!dd<17> d&d<18><06>Z"e!dd<17> d'd<19><06>Z"e!dd<17> d(d<1A><06>Z"e!dd<17> d)d<1B><06>Z"e!dd<17> d*d<1C><06>Z"e!dd<17> d+d<1D><06>Z"e!dd<17> d,d<1E><06>Z"e!dd<17> d-d<1F><06>Z"e!dd<17> d.d <20><06>Z"dd<17> d.d!<21>Z"<22>xZ#S<00>xZ#S)/r<>z<>Represent an INSERT construct.
The :class:`_expression.Insert` object is created using the
:func:`_expression.insert()` function.
r<>TNFr<46>rr4rsrKr<>r<>r<>rIrJr<>r<>rr<>c<01>$<00><01>t<00>|<00>|<01>yrS<00><02>superrp<00>rmrs<00> __class__s <20>rWrpzInsert.__init__<5F><00><00><><00> <0A><07><18><15>rZc<01><00>d|_|S)a<>Make this :class:`_expression.Insert` construct "inline" .
When set, no attempt will be made to retrieve the
SQL-generated default values to be provided within the statement;
in particular,
this allows SQL expressions to be rendered 'inline' within the
statement without the need to pre-execute them beforehand; for
backends that support "returning", this turns off the "implicit
returning" feature for the statement.
.. versionchanged:: 1.4 the :paramref:`_expression.Insert.inline`
parameter
is now superseded by the :meth:`_expression.Insert.inline` method.
T<>rKrs rW<00>inlinez Insert.inline<6E>s<00><00>$<1C><04> <0C><13> rZc<01>2<00>|jrtjd<01><00>|D<00>cgc](}tjt
j |d<02><03><00><02>*c}|_d|_||_ tjt
j|<02>|_ |Scc}w)a+Return a new :class:`_expression.Insert` construct which represents
an ``INSERT...FROM SELECT`` statement.
e.g.::
sel = select(table1.c.a, table1.c.b).where(table1.c.c > 5)
ins = table2.insert().from_select(["a", "b"], sel)
:param names: a sequence of string column names or
:class:`_schema.Column`
objects representing the target columns.
:param select: a :func:`_expression.select` construct,
:class:`_expression.FromClause`
or other construct which resolves into a
:class:`_expression.FromClause`,
such as an ORM :class:`_query.Query` object, etc. The order of
columns returned from this FROM clause should correspond to the
order of columns sent as the ``names`` parameter; while this
is not checked before passing along to the database, the database
would normally raise an exception if these column lists don't
correspond.
:param include_defaults: if True, non-server default values and
SQL expressions as specified on :class:`_schema.Column` objects
(as documented in :ref:`metadata_defaults_toplevel`) not
otherwise specified in the list of names will be rendered
into the INSERT and SELECT statements, so that these values are also
included in the data to be inserted.
.. note:: A Python-side default that uses a Python callable function
will only be invoked **once** for the whole statement, and **not
per row**.
z0This construct already inserts value expressionsTr<54>) r<>r9r<>rr<>rr<>r<>rK<00>#include_insert_from_select_defaults<74> DMLSelectRolerI)rm<00>namesrI<00>include_defaultsrrs rW<00> from_selectzInsert.from_select<63>s<><00><00>R <10><<3C><<3C><15>)<29>)<29>B<><0E> <0E> <1E>
<EFBFBD><1D><04> <16> <1C> <1C>U<EFBFBD>0<>0<>$<24>t<EFBFBD> D<><1D>
<EFBFBD><04><1A><1C><04> <0C>3C<33><04>0<><1F>&<26>&<26>u<EFBFBD>':<3A>':<3A>F<EFBFBD>C<><04> <0B><13> <0B><>
s<00>-Br#c<01><00>yrSrT)rm<00> _Insert__ent0rs rWr'zInsert.returning<00><00><00>+.rZc<01><00>yrSrT)rmrp<00> _Insert__ent1rs rWr'zInsert.returning"s<00><00>03rZc<01><00>yrSrT)rmrprs<00> _Insert__ent2rs rWr'zInsert.returning+s<00><00>58rZc<01><00>yrSrT)rmrprsru<00> _Insert__ent3rs rWr'zInsert.returning5s<00><00>:=rZc<01><00>yrSrT)rmrprsrurw<00> _Insert__ent4rs rWr'zInsert.returning@s<00><00>?BrZc<01><00>yrSrT)rmrprsrurwry<00> _Insert__ent5rs rWr'zInsert.returningLs <00><00>DGrZc<01><00>yrSrT) rmrprsrurwryr{<00> _Insert__ent6rs rWr'zInsert.returningYs <00><00>ILrZc <01><00>yrSrT)
rmrprsrurwryr{r}<00> _Insert__ent7rs
rWr'zInsert.returninggs<00><00> rZc<01><00>yrSrT<00>rmrr <00> _Insert__kws rWr'zInsert.returningzs<00><00> $'rZc<01><00>yrSrTr<>s rWr'zInsert.returning<6E>s<00><00>
$'rZr]<00>r<>r:)T)rlzSequence[_DMLColumnArgument]rIrPrmr<>r<>r:)rp<00>
_TCCA[_T0]rr<>r<>zReturningInsert[Tuple[_T0]])rpr<>rs<00>
_TCCA[_T1]rr<>r<>z ReturningInsert[Tuple[_T0, _T1]])
rpr<>rsr<>ru<00>
_TCCA[_T2]rr<>r<>z%ReturningInsert[Tuple[_T0, _T1, _T2]]) rpr<>rsr<>rur<>rw<00>
_TCCA[_T3]rr<>r<>z*ReturningInsert[Tuple[_T0, _T1, _T2, _T3]])rpr<>rsr<>rur<>rwr<>ry<00>
_TCCA[_T4]rr<>r<>z/ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4]])rpr<>rsr<>rur<>rwr<>ryr<>r{<00>
_TCCA[_T5]rr<>r<>z4ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]])rpr<>rsr<>rur<>rwr<>ryr<>r{r<>r}<00>
_TCCA[_T6]rr<>r<>z9ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]])rpr<>rsr<>rur<>rwr<>ryr<>r{r<>r}r<>r<00>
_TCCA[_T7]rr<>r<>z>ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]])r r=rr<>r<>rr<>zReturningInsert[Any])$r<>r<>r<>rAr<>r^rIrjrr<>rr7<00>dp_clauseelement<6E>
dp_boolean<EFBFBD>dp_string_list<73> dp_dml_values<65>dp_dml_multi_values<65>dp_clauseelement_tuple<6C>dp_table_hint_listr1<00> _has_prefixes_traverse_internalsr$<00>"_dialect_kwargs_traverse_internalsr%<00>_executable_traverse_internalsr0<00>_has_ctes_traverse_internals<6C>_traverse_internalsrprrhrnrr r'<00> __classcell__<5F>rds@rWr<>r<><00>s<><00><><00><08><1E>N<EFBFBD>!%<25><1E> <11>F<EFBFBD>*/<2F>'<27>%*<2A><1C>d<EFBFBD>*<2A><14>I<EFBFBD> <16><16><15>'<27>8<>8<> 9<> <16>)<29>4<>4<> 5<> <1C>/<2F>><3E>><3E> ?<3F> <16>)<29>7<>7<> 8<> <1C>/<2F>C<>C<> D<> <15>(<28>9<>9<> :<3A> "<22>$5<>$F<>$F<> G<> <19>,<2C>C<>C<> D<> <15>(<28>;<3B>;<3B> <<3C> <1F>!2<>!=<3D>!=<3D> ><3E>*<2A>!<21>8<>8<> <0E>(<28>):<3A>)E<>)E<> F<>
<EFBFBD>" <16>
6<EFBFBD>
6<EFBFBD># 7<>$ <18>
:<3A>
:<3A>% ;<3B>& <15>
3<EFBFBD>
3<EFBFBD>' 4<>( <11>
-<2D>
-<2D>) .<2E><18>0 <20><11><14><11><14>(<11>
"&<26> 4<14>+<2B>4<14><1B>4<14><1F> 4<14>
<0E> 4<14><11>4<14>l<15>
<12>IN<49> .<2E>$<24> .<2E>BF<42> .<2E> (<28> .<2E>
<12> .<2E>
<12> -2<>  3<><1E> 3<><1F> 3<>
&*<2A>  3<> .<2E>  3<>
<12> 3<>
<12>-2<>  8<><1E> 8<><1F> 8<><1F>  8<> &*<2A>  8<>3<> 8<>
<12> 8<>
<12>-2<> =<3D><1E> =<3D><1F> =<3D><1F>  =<3D>
<1F>  =<3D>&*<2A> =<3D>8<> =<3D>
<12> =<3D>
<12>-2<> B<01><1E> B<01><1F> B<01><1F> B<01>
<1F> B<01> <1F> B<01>&*<2A> B<01>=<3D> B<01>
<12> B<01>
<12>-2<>
G<01><1E>
G<01><1F>
G<01><1F>
G<01>
<1F>
G<01> <1F>
G<01><1F>
G<01>&*<2A>
G<01>B<01>
G<01>
<12>
G<01>
<12>-2<> L<01><1E> L<01><1F> L<01><1F> L<01>
<1F> L<01> <1F> L<01><1F> L<01><1F> L<01>&*<2A> L<01>G<01> L<01>
<12> L<01>
<12>-2<> <0F><1E> <0F><1F> <0F><1F>  <0F>
<1F>  <0F> <1F>  <0F><1F> <0F><1F> <0F><1F> <0F>&*<2A> <0F>
<EFBFBD> <0F>
<12> <0F>$
<12>-2<> '<27>.<2E> '<27>&*<2A> '<27><18>  '<27>
"<22>  '<27>
<12> '<27>-2<> '<27>.<2E> '<27>&*<2A> '<27><18>  '<27>
"<22>  '<27>WrZr<>c<01><00>eZdZdZy)<03>ReturningInsertz<74>Typing-only class that establishes a generic type form of
:class:`.Insert` which tracks returned column types.
This datatype is delivered when calling the
:meth:`.Insert.returning` method.
.. versionadded:: 2.0
N<>r<>r<>r<>rArTrZrWr<>r<><00><00><00><00>rZr<>c<01>b<00>eZdZUded<dZded<ed d<06><04>Zd d<07>Zdd<08>Zdd <09>Z e
dd
<EFBFBD><04>Z y )r<>r<>rsrTzTuple[ColumnElement[Any], ...]r<>c<01><><00>|D]>}tjtj||<00><01>}|xj|fz c_<00>@|S)a<>Return a new construct with the given expression(s) added to
its WHERE clause, joined to the existing clause via AND, if any.
Both :meth:`_dml.Update.where` and :meth:`_dml.Delete.where`
support multiple-table forms, including database-specific
``UPDATE...FROM`` as well as ``DELETE..USING``. For backends that
don't have multiple-table support, a backend agnostic approach
to using multiple tables is to make use of correlated subqueries.
See the linked tutorial sections below for examples.
.. seealso::
:ref:`tutorial_correlated_updates`
:ref:`tutorial_update_from`
:ref:`tutorial_multi_table_deletes`
rN)rr<>r<00>WhereHavingRoler<65>)rm<00> whereclause<73> criterion<6F>where_criterias rW<00>wherezDMLWhereBase.where<72>sH<00><00>,%<25>I<EFBFBD>1:<3A>1A<31>1A<31><15>%<25>%<25>y<EFBFBD><04>2<0E>N<EFBFBD> <11> <20> <20>^<5E>$5<> 5<> <20> %<25>
<14> rZc<01> <00>|j|<01>S)zbA synonym for the :meth:`_dml.DMLWhereBase.where` method.
.. versionadded:: 1.4
)r<>)rm<00>criterias rW<00>filterzDMLWhereBase.filter<65>s<00><00><1A>t<EFBFBD>z<EFBFBD>z<EFBFBD>8<EFBFBD>$<24>$rZc<01><00>|jSrS)rsrs rW<00>_filter_by_zerozDMLWhereBase._filter_by_zero<72>s <00><00><13>z<EFBFBD>z<EFBFBD>rZc <01><><00>|j<00>}|j<00>D<00><03>cgc]\}}t||<03>|k(<00><02>}}}|j|<05>Scc}}w)zWapply the given filtering criterion as a WHERE clause
to this select.
)r<>r<>rr<>)rmrY<00> from_entityr{r<><00>clausess rW<00> filter_byzDMLWhereBase.filter_by<62>sb<00><00>
<1B>*<2A>*<2A>,<2C> <0B>%<25>l<EFBFBD>l<EFBFBD>n<EFBFBD>
<EFBFBD>,<2C>
<EFBFBD><03>U<EFBFBD> "<22>+<2B>s<EFBFBD> 3<>u<EFBFBD> <<3C>,<2C> <10>
<EFBFBD><1B>t<EFBFBD>{<7B>{<7B>G<EFBFBD>$<24>$<24><> 
s<00>Ac<01>@<00>tj|j<00>S)aReturn the completed WHERE clause for this :class:`.DMLWhereBase`
statement.
This assembles the current collection of WHERE criteria
into a single :class:`_expression.BooleanClauseList` construct.
.. versionadded:: 1.4
)r(<00>_construct_for_whereclauser<65>rs rWr<>zDMLWhereBase.whereclause<73>s <00><00>!<21>;<3B>;<3B> <10> <20> <20>
<EFBFBD>
rZN)r<>z_ColumnExpressionArgument[bool]r<>r:)r<>z roles.ExpressionElementRole[Any]r<>r:r<>)rYrr<>r:)r<>r>) r<>r<>r<>r<>r<>rr<>r<>r<>r<>r<>r<>rTrZrWr<>r<><00>sH<00><00> <1B><1B>68<36>O<EFBFBD>3<>8<><10><14><11><14>8%<25><1A> %<25><0E>
<EFBFBD><0E>
rZr<>c
<01>$<00><00>eZdZdZdZdZdejfdejfdejfdejfdejfd ejfd
ejfd ejfd ejfg e jzej zej$zej(zZd<1A>fd <0A> Zedd<0E><04>Zedd<0F><04>Zer<>e dd<10><04>Ze dd<11><04>Ze dd<12><04>Ze d d<13><04>Ze d!d<14><04>Ze d"d<15><04>Ze d#d<16><04>Ze d$d<17><04>Ze d%d<18><04>Z d%d<19>Z<1C>xZS<00>xZS)&r<>z<>Represent an Update construct.
The :class:`_expression.Update` object is created using the
:func:`_expression.update()` function.
r<>Trsr<>rKrer<>r<>r<>rr<>c<01>$<00><01>t<00>|<00>|<01>yrSrarcs <20>rWrpzUpdate.__init__rerZc<01><><00>|jrtjd<01><00>|jrtjd<02><00>tj |<00>j }|||d<03>|_|S)a<>Specify the VALUES clause of this UPDATE statement with an explicit
parameter ordering that will be maintained in the SET clause of the
resulting UPDATE statement.
E.g.::
stmt = table.update().ordered_values(("name", "ed"), ("ident", "foo"))
.. seealso::
:ref:`tutorial_parameter_ordered_updates` - full example of the
:meth:`_expression.Update.ordered_values` method.
.. versionchanged:: 1.4 The :meth:`_expression.Update.ordered_values`
method
supersedes the
:paramref:`_expression.update.preserve_parameter_order`
parameter, which will be removed in SQLAlchemy 2.0.
z)This statement already has values presentrST)r<>r9rrerQr<>r<>)rmrXr[s rW<00>ordered_valueszUpdate.ordered_valuessp<00><00>, <10><<3C><<3C><15>#<23>#<23>;<3B><0E> <0E><12> !<21> !<21><15>#<23>#<23>C<><0E> <0E> <20>0<>0<><14>6<>I<>I<> <0C>+<2B>D<EFBFBD>$<24><04>=<3D><04><1C><13> rZc<01><00>d|_|S)aJMake this :class:`_expression.Update` construct "inline" .
When set, SQL defaults present on :class:`_schema.Column`
objects via the
``default`` keyword will be compiled 'inline' into the statement and
not pre-executed. This means that their values will not be available
in the dictionary returned from
:meth:`_engine.CursorResult.last_updated_params`.
.. versionchanged:: 1.4 the :paramref:`_expression.update.inline`
parameter
is now superseded by the :meth:`_expression.Update.inline` method.
Trgrs rWrhz Update.inline)s<00><00> <1C><04> <0C><13> rZc<01><00>yrSrT)rm<00> _Update__ent0s rWr'zUpdate.returningBrqrZc<01><00>yrSrT)rmr<><00> _Update__ent1s rWr'zUpdate.returningG<00><00><00>03rZc<01><00>yrSrT)rmr<>r<><00> _Update__ent2s rWr'zUpdate.returningL<00><00><00>58rZc<01><00>yrSrT)rmr<>r<>r<><00> _Update__ent3s rWr'zUpdate.returningQ<00><00><00>:=rZc<01><00>yrSrT)rmr<>r<>r<>r<><00> _Update__ent4s rWr'zUpdate.returningZ<00><00><00>?BrZc<01><00>yrSrT)rmr<>r<>r<>r<>r<><00> _Update__ent5s rWr'zUpdate.returningd<00> <00><00>DGrZc<01><00>yrSrT)rmr<>r<>r<>r<>r<>r<><00> _Update__ent6s rWr'zUpdate.returningo<00> <00><00>ILrZc <01><00>yrSrT) rmr<>r<>r<>r<>r<>r<>r<><00> _Update__ent7s rWr'zUpdate.returning{<00><00><00> rZc<01><00>yrSrT<00>rmr <00> _Update__kws rWr'zUpdate.returning<6E><00><00><00>$'rZc<01><00>yrSrTr<>s rWr'zUpdate.returning<6E><00><00><00>#&rZr])rXzTuple[_DMLColumnArgument, Any]r<>r:r<>)r<>r<>r<>zReturningUpdate[Tuple[_T0]])r<>r<>r<>r<>r<>z ReturningUpdate[Tuple[_T0, _T1]])r<>r<>r<>r<>r<>r<>r<>z%ReturningUpdate[Tuple[_T0, _T1, _T2]])
r<EFBFBD>r<>r<>r<>r<>r<>r<>r<>r<>z*ReturningUpdate[Tuple[_T0, _T1, _T2, _T3]]) r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>z/ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4]])r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>z4ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]])r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>z9ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]])r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>z>ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]])r r=r<>rr<>zReturningUpdate[Any])r<>r<>r<>rAr<><00> is_updater7r<>r<>r<><00>dp_dml_ordered_valuesr<73>r<>r1r<>r$r<>r%r<>r0r<>r<>rprr<>rhrr r'r<>r<>s@rWr<>r<><00>s<><00><><00><08><1E>N<EFBFBD><14>I<EFBFBD><15>'<27>8<>8<> 9<> <1E> 1<> H<> H<> I<> <16>)<29>4<>4<> 5<> <1E> 1<> G<> G<> H<> <16>)<29>7<>7<> 8<> <19>,<2C>C<>C<> D<> <15>(<28>;<3B>;<3B> <<3C> <1F>!2<>!=<3D>!=<3D> ><3E>*<2A>!<21>8<>8<> <0E>
<EFBFBD> <16>
6<EFBFBD>
6<EFBFBD> 7<> <18>
:<3A>
:<3A> ;<3B> <15>
3<EFBFBD>
3<EFBFBD>! 4<>" <11>
-<2D>
-<2D># .<2E><18>* <20><11> <14><11> <14>D<11><14><11><14>$<15>
<12> .<2E>$<24> .<2E> (<28> .<2E>
<12> .<2E>
<12> 3<>$<24> 3<>.8<EFBFBD> 3<> -<2D> 3<>
<12> 3<>
<12> 8<>$<24> 8<>.8<EFBFBD> 8<>BL<42> 8<> 2<> 8<>
<12> 8<>
<12> =<3D><1E> =<3D><1F> =<3D><1F>  =<3D>
<1F>  =<3D> 8<>  =<3D>
<12> =<3D>
<12> B<01><1E> B<01><1F> B<01><1F>  B<01>
<1F>  B<01> <1F>  B<01>=<3D> B<01>
<12> B<01>
<12> G<01><1E> G<01><1F> G<01><1F>  G<01>
<1F>  G<01> <1F>  G<01><1F> G<01>B<01> G<01>
<12> G<01>
<12> L<01><1E> L<01><1F> L<01><1F> L<01>
<1F> L<01> <1F> L<01><1F> L<01><1F> L<01>G<01> L<01>
<12> L<01>
<12> <0F><1E> <0F><1F> <0F><1F> <0F>
<1F> <0F> <1F> <0F><1F> <0F><1F> <0F><1F> <0F>
<EFBFBD> <0F>
<12> <0F>
<12> '<27>4<> '<27>>A<> '<27> !<21> '<27>
<12> '<27> '<27>4<> '<27>>A<> '<27> !<21> '<27>krZr<>c<01><00>eZdZdZy)<03>ReturningUpdatez<65>Typing-only class that establishes a generic type form of
:class:`.Update` which tracks returned column types.
This datatype is delivered when calling the
:meth:`.Update.returning` method.
.. versionadded:: 2.0
Nr<4E>rTrZrWr<>r<><00>r<>rZr<>c<01>l<00>eZdZdZdZdZdejfdejfdejfdejfge
jze jzejzej"zZdd<08>Zer<>e dd <09><04>Ze dd
<EFBFBD><04>Ze dd <0B><04>Ze dd <0C><04>Ze dd <0A><04>Ze dd<0E><04>Ze dd<0F><04>Ze dd<10><04>Ze dd<11><04>Z dd<12>Zyy)r<>z<>Represent a DELETE construct.
The :class:`_expression.Delete` object is created using the
:func:`_expression.delete()` function.
r<>Trsr<>r<>r<>c<01>Z<00>tjtj||<00><01>|_yrMrPrQs rWrpzDelete.__init__<5F>rRrZc<01><00>yrSrT)rm<00> _Delete__ent0s rWr'zDelete.returning<6E>rqrZc<01><00>yrSrT)rmr<><00> _Delete__ent1s rWr'zDelete.returning<6E>r<>rZc<01><00>yrSrT)rmr<>r<><00> _Delete__ent2s rWr'zDelete.returning<6E>r<>rZc<01><00>yrSrT)rmr<>r<>r<><00> _Delete__ent3s rWr'zDelete.returning<6E>r<>rZc<01><00>yrSrT)rmr<>r<>r<>r<><00> _Delete__ent4s rWr'zDelete.returning<6E>r<>rZc<01><00>yrSrT)rmr<>r<>r<>r<>r<><00> _Delete__ent5s rWr'zDelete.returning<6E>r<>rZc<01><00>yrSrT)rmr<>r<>r<>r<>r<>r<><00> _Delete__ent6s rWr'zDelete.returning<6E>r<>rZc <01><00>yrSrT) rmr<>r<>r<>r<>r<>r<>r<><00> _Delete__ent7s rWr'zDelete.returning<6E>r<>rZc<01><00>yrSrT<00>rmr <00> _Delete__kws rWr'zDelete.returningr<>rZc<01><00>yrSrTr<>s rWr'zDelete.returningr<>rZNr])r<>r<>r<>zReturningDelete[Tuple[_T0]])r<>r<>r<>r<>r<>z ReturningDelete[Tuple[_T0, _T1]])r<>r<>r<>r<>r<>r<>r<>z%ReturningDelete[Tuple[_T0, _T1, _T2]])
r<EFBFBD>r<>r<>r<>r<>r<>r<>r<>r<>z*ReturningDelete[Tuple[_T0, _T1, _T2, _T3]]) r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>z/ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4]])r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>z4ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]])r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>z9ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]])r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>z>ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]])r r=r<>rr<>zReturningDelete[Any])r<>r<>r<>rAr<><00> is_deleter7r<>r<>r<>r1r<>r$r<>r%r<>r0r<>r<>rprr r'rTrZrWr<>r<><00>sM<00><00><08><1E>N<EFBFBD><14>I<EFBFBD><15>'<27>8<>8<> 9<> <1E> 1<> H<> H<> I<> <19>,<2C>C<>C<> D<> <15>(<28>;<3B>;<3B> <<3C> 
<EFBFBD> <16>
6<EFBFBD>
6<EFBFBD>  7<> <18>
:<3A>
:<3A> ;<3B> <15>
3<EFBFBD>
3<EFBFBD> 4<> <11>
-<2D>
-<2D> .<2E><18>
<EFBFBD>
<15>
<12> .<2E>$<24> .<2E> (<28> .<2E>
<12> .<2E>
<12> 3<>$<24> 3<>.8<EFBFBD> 3<> -<2D> 3<>
<12> 3<>
<12> 8<>$<24> 8<>.8<EFBFBD> 8<>BL<42> 8<> 2<> 8<>
<12> 8<>
<12> =<3D><1E> =<3D><1F> =<3D><1F>  =<3D>
<1F>  =<3D> 8<>  =<3D>
<12> =<3D>
<12> B<01><1E> B<01><1F> B<01><1F>  B<01>
<1F>  B<01> <1F>  B<01>=<3D> B<01>
<12> B<01>
<12> G<01><1E> G<01><1F> G<01><1F>  G<01>
<1F>  G<01> <1F>  G<01><1F> G<01>B<01> G<01>
<12> G<01>
<12> L<01><1E> L<01><1F> L<01><1F> L<01>
<1F> L<01> <1F> L<01><1F> L<01><1F> L<01>G<01> L<01>
<12> L<01>
<12> <0F><1E> <0F><1F> <0F><1F> <0F>
<1F> <0F> <1F> <0F><1F> <0F><1F> <0F><1F> <0F>
<EFBFBD> <0F>
<12> <0F>
<12> '<27>4<> '<27>>A<> '<27> !<21> '<27>
<12> '<27> '<27>4<> '<27>>A<> '<27> !<21> '<27>krZr<>c<01><00>eZdZdZy)<03>ReturningDeletez<65>Typing-only class that establishes a generic type form of
:class:`.Delete` which tracks returned column types.
This datatype is delivered when calling the
:meth:`.Delete.returning` method.
.. versionadded:: 2.0
Nr<4E>rTrZrWr<>r<>r<>rZr<>)rVrQr<>zTypeGuard[UpdateDMLState])rVrQr<>zTypeGuard[DeleteDMLState])rVrQr<>zTypeGuard[InsertDMLState])urA<00>
__future__r<00>collections.abc<62>abcr<63><00>operator<6F>typingrrrrrr r
r r r rrrrrr<00>rrrr<><00>_typingrrrr<00>baserrrrr r!r"r#r$r%r&r'<00>elementsr(r)r*r+r,r4r-r.r/r0r1r2r3r4r5<00>sqltypesr6<00>visitorsr7r9<00> util.typingr:r;r<r=r>r?r@rArBrCrDrErFrGrHrI<00>_TCCArJrnrKrLrMrNrOrPrXr\r^<00>
attrgetterr_r@<00>_DMLColumnElementr<74>rQ<00>
plugin_forr<EFBFBD>r<>r<><00>DMLRolerhr<>r<>r<>r<>r<>r<>r<>r<>rTrZrW<00><module>rs<><00><01><04>
#<23>)<29><0F><16><17><17><1B><17>!<21><1B><1B><1B><1B><16><18><17> <20><1A><18><17><13><1E><18>#<23>&<26>)<29>'<27>$<24><1F><1D>#<23>"<22><1B><1E><1F><1C><1C>!<21>'<27>#<23>"<22>#<23><1A><1D>-<2D>"<22><1E>#<23><1C>(<28>#<23>(<28><1E>'<27><12><13><1E>#<23><10>2<>/<2F>+<2B>-<2D>*<2A><1C><1C><1C><1C><1C><1C><1C><1C><<3C>.<2E>%<25>,<2C>1<>+<2B>"<22>&<26>A<>A<>A<>#<23>x<EFBFBD>"<22>"<22>:<3A>.<2E>H<EFBFBD>"<22>x<EFBFBD>"<22>"<22>:<3A>.<2E>H<EFBFBD>"<22>x<EFBFBD>"<22>"<22>:<3A>.<2E>H<EFBFBD> <0A>T<EFBFBD><13><1D><02><19>#<23>|<7C>C<EFBFBD>0<>0<>1<><11><18><1B>e<EFBFBD>T<EFBFBD>1<>2<><10>R
<EFBFBD>|<7C>R
<EFBFBD>j<19><1C><18><18><19>H<EFBFBD>-<2D>C@<01>X<EFBFBD>C@<01>.<2E>C@<01>L<19><1C><18><18><19>H<EFBFBD>-<2D>%<0E>X<EFBFBD>%<0E>.<2E>%<0E>P<19><1C><18><18><19>H<EFBFBD>-<2D>
 <20>X<EFBFBD>
 <20>.<2E>
 <20>}<1A> <09>M<EFBFBD>M<EFBFBD>
<EFBFBD><13><11><0F><0E><19><11>}<1A>@S<14><1A>S<14>ll'<27>Z<EFBFBD>l'<27>^ <08>f<EFBFBD>.<2E>s<EFBFBD>3<> <08>I
<EFBFBD>I
<EFBFBD>Xq'<27>\<5C>:<3A>q'<27>h <08>f<EFBFBD>.<2E>s<EFBFBD>3<> <08>u'<27>\<5C>:<3A>u'<27>p <08>f<EFBFBD>.<2E>s<EFBFBD>3<> rZ