Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
dml.cpython-313.pyc984 linesDownload Raw Back to __pycache__
1�

2��j���b�SrSSKJr SSKJr SSKrSSKJr SSKJ	r	 SSKJ3r4 SSKJr SSKJr SS	KJ
r
 SS5KJr SSKJr SSKJr SS
KJr SSKJr SSKJr SSKJr SSKJr SSKJr SSKJr SSKJr SSKJr SSKJr SSKJr SSKJr SSKJ r  SSKJ!r! SSK"J#r# SSK"J$r$ SSK"J%r% SSK"J&r& SS K"J'r' SS!K"J(r( SS"K"J)r) SS#K"J*r* SS$K"J+r+ SS%K"J,r, SS&K"J-r- SS'K"J.r. SS(K/J0r0 SS)K/J1r1 SS*K/J2r2 SS+K/J3r3 SS,K/J4r4 SS-K5J6r6 SS.K5J7r7 SS/K5J8r8 SS0K5J9r9 SS1K5J:r: SS2K5J;r; SS3K5J<r< SS4K5J=r= SS5K5J>r> SS6K?J@r@ SS7KAJBrB S8S9KJCrC S8SKJr S8S:KDJErE S8S;KDJFrF \(a�SS<KJGrG SS=KJHrH SS>KJIrI SS?KJJrJ SS@KJKrK SSAKJLrL SSBKJMrM SSCKJNrN SSDKJOrO SSEKJPrP SSFKJQrQ SSGKJRrR SSHKJSrS SSIKJTrU SSJK"JVrV SSKKWJXrX SSLK/JYrY SSMK5JZrZ SSNK5J[r[ SSOK5J\r\ SSPK5J]r] SwSRjr^SxSSjr_SySTjr`O6\R�"SU5r^\R�"SV5r_\R�"SW5r`\"SX\SY9rb\\c\2\4rd\\=\6\;4re"SZSQ\*5rf\*R�"S[S\5"S]S^\f55rh\*R�"S[S_5"S`Sa\f55ri\*R�"S[Sb5"ScSd\f55rj"SeSf\R�\9\.\+\:\-\7\156rl"SgSh\l5rm"SiSj\m5rn"SkSl\n\>\5ro"SmSn5rp"SoSp\p\m5rq"SqSr\q\>\5rr"SsSt\p\l5rs"SuSv\q\>\5rtg)zzd7Provide :class:`_expression.Insert`, :class:`_expression.Update` and8:class:`_expression.Delete`.9 10�)�annotationsN)�Any)�cast)�Dict)�Iterable)�List)�MutableMapping)�NoReturn)�Optional)�overload)�Sequence)�Set)�Tuple)�Type)�
TYPE_CHECKING)�TypeVar)�Union�)�	coercions)�roles)�util)�_TP)�_unexpected_kw)�is_column_element)�is_named_from_clause)�_entity_namespace_key)�_exclusive_against)�
_from_objects)�_generative)�_select_iterables)�ColumnCollection)�	ColumnSet)�CompileState)�
DialectKWArgs)�11Executable)�12Generative)�HasCompileState)�BooleanClauseList)�
ClauseElement)�ColumnClause)�
ColumnElement)�Null)�Alias)�ExecutableReturnsRows)�13FromClause)�HasCTE)�HasPrefixes)�Join)�SelectLabelStyle)�TableClause)�TypedReturnsRows)�NullType)�InternalTraversal�)�exc)�Self)�	TypeGuard)�_ColumnExpressionArgument)�_ColumnsClauseArgument)�_DMLColumnArgument)�_DMLColumnKeyMapping)�_DMLTableArgument)�_T0)�_T1)�_T2)�_T3)�_T4)�_T5)�_T6)�_T7)�_TypedColumnClauseArgument)�ReadOnlyColumnCollection)�SQLCompiler)�KeyedColumnElement)�_ColumnsClauseElement)�_SelectIterable)�Select)�14Selectable�DMLStatec��g�N���dmls �XD:\code\apps\devtools\python\user_packages\Python313\site-packages\sqlalchemy/sql/dml.py�isupdaterX`���c�c��grSrTrUs rW�isdeleter\brYrZc��grSrTrUs rW�isinsertr^drYrZrXr\r^�_T)�boundc�p�\rSrSr%SrSrS\S'SrS\S'SrS\S	'Sr	S15\S'S\S
'Sr16SrSrSr
S\S'SSjr\SSj5r\S Sj5r\S!Sj5r\(a17\S"Sj5r\S#Sj5r\S$Sj5rS%SjrS&SjrS&SjrS'SjrS(SjrSrg))rQ�rTNz0Optional[MutableMapping[_DMLColumnElement, Any]]�_dict_parametersz6Optional[List[MutableMapping[_DMLColumnElement, Any]]]�_multi_parameters�-Optional[List[Tuple[_DMLColumnElement, Any]]]�_ordered_valuesz!Optional[List[_DMLColumnElement]]�_parameter_orderingr/�_primary_tableF�18UpdateBase�	statementc��[5erS��NotImplementedError)�selfrj�compiler�kws    rW�__init__�DMLState.__init__�s
��"�#�#rZc��[UR5(aURROSURS.$)N)�name�table)rrurt��clsrjs  rW�get_entity_description�DMLState.get_entity_description�s6��19(�	���8�8����$�$���_�_�
20�	21rZc�v�URVs/sHnURURUS.PM sn$s snf)N)rt�type�expr)�_all_selected_columns�keyr{)rwrj�cs   rW�!get_returning_column_descriptions�*DMLState.get_returning_column_descriptions�sF���4�4�
22�5��	�������
�235�
24�	25��26s�$6c�.�URR$rS)rjru�rns rW�	dml_table�DMLState.dml_table�s���~�~�#�#�#rZc��grSrTrvs  rW�get_plugin_class�DMLState.get_plugin_class�s��LOrZc
���UVVVs/sHLnUR5VVs0sH+upE[R"[RU5U_M- snnPMN snnn$s snnfs snnnfrS)�itemsr�expectr�
DMLColumnRole)rwrj�multi_kv_iterator�mapping�k�vs      rW�_get_multi_crud_kv_pairs�!DMLState._get_multi_crud_kv_pairs�sj��-�27�28-��$�M�M�O�
�+�D�A�� � ��!4�!4�a�8�!�;�+�
�-�29�	30��
��31s�A%�2A�A%�A%c���UVVs/sH`upE[R"[RU5U(dUO,[R"[RU[5SS94PMb snn$s snnf)NT)�type_�is_crud)rr�rr��ExpressionElementRoler6)rwrj�kv_iterator�needs_to_be_cacheabler�r�s      rW�_get_crud_kv_pairs�DMLState._get_crud_kv_pairs�ss��*$�32�$���� � ��!4�!4�a�8�1��"�)�)��3�3��&�j� $�	�
�$�33�	34��35s�A'A1c���/n[[R"UR55nUSnU1nURnUR36(a&U[
UR37R55-
nUHan[U5HOnURUR5(dURU5 URUR5 MQ Mc URUSS5 XB4$)Nrr)�list�sql_util�tables_from_leftmostru�_where_criteriarc�tuple�valuesr�intersection�_cloned_set�append�update�extend)	rnrj�froms�38all_tables�
primary_table�seen�consider�crit�items	         rW�_make_extra_froms�DMLState._make_extra_froms�s���#%���(�7�7�	���H�I�39�"�1�
�
�����,�,��� � ���d�3�3�:�:�<�=�=�H��D�%�d�+���(�(��)9�)9�:�:��L�L��&����D�,�,�-�,��	���Z���^�$��#�#rZc�X�UR(aURUlSUlgg�NF)�_no_parameters�_valuesrc�rnrjs  rW�_process_values�DMLState._process_values�s&�����$-�$5�$5�D�!�"'�D��rZc��URceURVs0sH
o"[5_M nnUR(aSUlX0lgS5es snf)NFz%This statement already has parameters)�
_select_namesr,r�rc)rnrjrt�40parameterss    rW�_process_select_values�DMLState._process_select_values�sg���&�&�2�2�2�%.�%<�%<�>41�%<�T�$�&�L�%<�	�>42����"'�D��$.�!�
B�A�A�5��>43s�Ac�d�[R"SURR5-5e)Nz6%s construct does not support multiple parameter sets.)r9�InvalidRequestError�__visit_name__�upperr�s  rW�_no_multi_values_supported�#DMLState._no_multi_values_supported�s2���%�%�
'�)2�)A�)A�)G�)G�)I�
J�44�	45rZc�.�[R"S5e)Nz�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�r�s rW�_cant_mix_formats_error� DMLState._cant_mix_formats_error�s���%�%�
�46�	47rZ)rcr�)rjrirorKrpr)rjri�return�Dict[str, Any])rjrir��List[Dict[str, Any]]�r��_DMLTableElement)rjr%r�zType[DMLState])rjrir�z'Iterable[Dict[_DMLColumnArgument, Any]]r�z"List[Dict[_DMLColumnElement, Any]])rjrir�z(Iterable[Tuple[_DMLColumnArgument, Any]]r��boolr�z#List[Tuple[_DMLColumnElement, Any]])rj�DMLWhereBaser�z#Tuple[FromClause, List[FromClause]]�rj�48ValuesBaser��None)rjr�r�r49)r�r50)�__name__�51__module__�__qualname__�__firstlineno__r�rc�__annotations__rdrfrg�_supports_implicit_returningrXr\r^rq�classmethodrxr��propertyr�rr�r�r�r�r�r�r�r��__static_attributes__rTrZrWrQrQrsr���N�IM��F�M�	
���
�FJ�O�B�I�=A��:�A���#'� ��H��H��H���$�#�$�/:�$�BE�$�52�53��54��5556�"�5758�	�5960��6162��$��$��	�O�63�O��64��65�C�66�67,�	68��69��70��71�>�72� $�	73�7475-�76��77�.$�%�$�	,�$�,(�78B�79�80rZ�default�insertc�z�\rSrSrSrSrSrS81SSjjr\RSSj5r82S
SjrS
SjrSr
g	)�InsertDMLStateiTFc�"�XlURUlU(aSUlSUlUR83(aUR
U5 URbURU5 UR(aURU5 gg)NFT)rjrurhr�r^r�r�r�r��
_multi_values�_process_multi_values)rnrjro�disable_implicit_returningrps     rWrq�InsertDMLState.__init__st��#��'�o�o���%�05�D�-���
��"�"��'�'�	�2����(�� � ��+��"�"��&�&�y�1�#rZc	��UR=(d SVs/sH'n[R"[RUSS9PM) sn$s snf)NrTT��as_key)rcrr�rr�)rn�cols  rW�_insert_col_keys�InsertDMLState._insert_col_keys$sL��84�,�,�2��2�85�2��
���U�0�0�#�d�C�2�86�	87��88s�.A	c��UR(a SUlURUlSUlgUR(aUR	5 ggr�)r��_has_multi_parametersr�rcr�r�s  rWr��InsertDMLState._process_values,sC�����).�D�&�$-�$5�$5�D�!�"'�D��
�
'�
'��(�(�*�(rZc�J�URGHnUVVVs/sHdn[U[R5(a@[	UR89RU5VVs0sHupEURU_M snnOUPMf nnnnUR(a*SUlSUl	X`l90URSUlM�UR(dUR5 M�UR(deURRU5 GM gs snnfs snnnf)NFTr)r��91isinstance�collections_abcr
�ziprurr~r�r�rdrcr�r�)rnrjr��
parameter_setr�value�multi_parameterss       rWr��$InsertDMLState._process_multi_values4s��#�1�1�J�&0�92N�&0�M�"�-��1I�1I�J�J�),�I�O�O�,=�,=�}�(M��(M�H�A����u��(M��93'�'�&0�
�94N��"�"�&+��#�-1��*�)9�&�(,�(>�(>�q�(A��%��/�/��,�,�.��-�-�-�-��&�&�-�-�.>�?�-2����95Ns�AD96�D�897D98�D99)rcr�rdr�rhr�r^rjN�F)rj�InsertrorKr�r�rpr)r�z	List[str]r�)r�r�r�r�r^�include_table_with_column_exprsr�rqr�memoized_propertyr�r�r�r�rTrZrWr�r�sh���H�&+�#�!��,1�	2��2��2�%)�	2�100�2�*101���102��103�+�@rZr�r�c�0�\rSrSrSrSrSSjrS	SjrSrg)104�UpdateDMLStateiNTFc�t�XlSUlURbURU5 OAURbURU5 O"UR(aURU5 URU5upEX@l	XPl105U=Uln[U=(a UR5Ulg�NT)rjrXrf�_process_ordered_valuesr�r�r�r�r�rh�_extra_froms�
is_multitabler��'render_table_with_column_in_update_fromr�)rnrjrorp�t�ef�mts       rWrq�UpdateDMLState.__init__Ts���"����
��$�$�0��(�(��3�
�
�
�
*�� � ��+�
�
$�
$��+�+�I�6��&�&�y�1�������"$�$���R�/3��C�8�C�C�0106��,rZc���URnUR(a?SUlUce[U5UlX lUVVs/sHup4UPM	 snnUlg[107R"S5es snnf)NFzQCan only invoke ordered_values() once, and not mixed with any other values() call)rfr��dictrcrgr9r�)rnrjr�r~r�s     rWr��&UpdateDMLState._process_ordered_valuesgst���.�.�108����"'�D���)�)�)�$(��$4�D�!�#-� �>H�'I�j�109���j�'I�D�$��)�)�/��
��(Js�A3)110rcr�r�rfrgrhr�r�rXrjN)rj�UpdaterorKrprr�)	r�r�r�r�rXr�rqr�r�rTrZrWr�r�Ns���H�&+�#�111�&
rZr��deletec�"�\rSrSrSrSSjrSrg)�DeleteDMLStateiwTc�h�XlSUlURU5upEX@lXPlXPlgr�)rjr\r�rhr�r�)rnrjrorpr�r�s      rWrq�DeleteDMLState.__init__{s2��"����
��&�&�y�1��������rZ)r�rhr�r\rjN)rj�DeleterorKrpr)r�r�r�r�r\rqr�rTrZrWrrws���H� rZrc���\rSrSr%SrSr\RrS\	S'Sr112\Rr
S\	S'S	\	S113'SrSrS\	S
'SrS\	S'SrS\	S'SrS"SjrS#Sjr\S$Sj5r\SSS.S%Sjj5rS&Sjr\SS.S'Sjj5rS(S)Sjjr\R6S*Sj5r\R6S+Sj5r\S,S-Sjj5r\S.Sj5r \S/S j5r!S!r"g)0rii�zDForm the base for ``INSERT``, ``UPDATE``, and ``DELETE`` statements.�update_basez5util.immutabledict[Tuple[_DMLTableElement, str], str]�_hintsFr3�_label_styler�ruNz+Optional[Tuple[_ColumnsClauseElement, ...]]�_return_defaults_columns�_supplemental_returningrTz!Tuple[_ColumnsClauseElement, ...]�114_returningTc���URS5VVVVV	s/sH/unnnnn	[U5(dMURUUUSUUS9PM1 n115nnnnn	URU1165 gs sn	nnnnf)NFT)r~rt�name_is_truncatable�primary_key�foreign_keys)�_generate_columns_plus_namesr�_make_proxy�_populate_separate_keys)rn�117fromclause�columnsrr�required_label_name�	proxy_key�fallback_label_namer�repeated�proxs           rW�#_generate_fromclause_column_proxies�.UpdateBase._generate_fromclause_column_proxies�s���,�3�3�E�:�118�;�
�#��#��� ��#�
�A�M�M���(�$(�'�)�

�
�;�	
�119�&	�'�'��-��'120s121�A&�A&c��[S5e)z�Set the parameters for the statement.122 123This method raises ``NotImplementedError`` on the base class,124and is overridden by :class:`.ValuesBase` to provide the125SET/VALUES clause of UPDATE and INSERT.126 127z�params() is not supported for INSERT/UPDATE/DELETE statements. To set the values for an INSERT or UPDATE statement, use stmt.values(**parameters).rl)rn�argrps   rW�params�UpdateBase.params�s��"�
*�128�	129rZc�(�URU5 U$)z�Add dialect options to this INSERT/UPDATE/DELETE object.130 131e.g.::132 133    upd = table.update().dialect_options(mysql_limit=10)134 135.. versionadded: 1.4 - this method supersedes the dialect options136   associated with the constructor.137 138 139)�_validate_dialect_kwargs)rn�opts  rW�with_dialect_options�UpdateBase.with_dialect_options�s��	
�%�%�c�*��rZ)�supplemental_cols�sort_by_parameter_orderc��UR(aeUR(aLU(aE[[R"UR5RSU555UlOSUlO[SU55UlSUlU(a.UR(d[R"S5eSUl	U(avSU5nURc&[[R"U55Ul140U$[[R"UR[U5-55Ul141U$)a�Make use of a :term:`RETURNING` clause for the purpose142of fetching server-side expressions and defaults, for supporting143backends only.144 145.. deepalchemy::146 147    The :meth:`.UpdateBase.return_defaults` method is used by the ORM148    for its internal work in fetching newly generated primary key149    and server default values, in particular to provide the underlying150    implementation of the :paramref:`_orm.Mapper.eager_defaults`151    ORM feature as well as to allow RETURNING support with bulk152    ORM inserts.  Its behavior is fairly idiosyncratic153    and is not really intended for general use.  End users should154    stick with using :meth:`.UpdateBase.returning` in order to155    add RETURNING clauses to their INSERT, UPDATE and DELETE156    statements.157 158Normally, a single row INSERT statement will automatically populate the159:attr:`.CursorResult.inserted_primary_key` attribute when executed,160which stores the primary key of the row that was just inserted in the161form of a :class:`.Row` object with column names as named tuple keys162(and the :attr:`.Row._mapping` view fully populated as well). The163dialect in use chooses the strategy to use in order to populate this164data; if it was generated using server-side defaults and / or SQL165expressions, dialect-specific approaches such as ``cursor.lastrowid``166or ``RETURNING`` are typically used to acquire the new primary key167value.168 169However, when the statement is modified by calling170:meth:`.UpdateBase.return_defaults` before executing the statement,171additional behaviors take place **only** for backends that support172RETURNING and for :class:`.Table` objects that maintain the173:paramref:`.Table.implicit_returning` parameter at its default value of174``True``. In these cases, when the :class:`.CursorResult` is returned175from the statement's execution, not only will176:attr:`.CursorResult.inserted_primary_key` be populated as always, the177:attr:`.CursorResult.returned_defaults` attribute will also be178populated with a :class:`.Row` named-tuple representing the full range179of server generated180values from that single row, including values for any columns that181specify :paramref:`_schema.Column.server_default` or which make use of182:paramref:`_schema.Column.default` using a SQL expression.183 184When invoking INSERT statements with multiple rows using185:ref:`insertmanyvalues <engine_insertmanyvalues>`, the186:meth:`.UpdateBase.return_defaults` modifier will have the effect of187the :attr:`_engine.CursorResult.inserted_primary_key_rows` and188:attr:`_engine.CursorResult.returned_defaults_rows` attributes being189fully populated with lists of :class:`.Row` objects representing newly190inserted primary key values as well as newly inserted server generated191values for each row inserted. The192:attr:`.CursorResult.inserted_primary_key` and193:attr:`.CursorResult.returned_defaults` attributes will also continue194to be populated with the first row of these two collections.195 196If the backend does not support RETURNING or the :class:`.Table` in use197has disabled :paramref:`.Table.implicit_returning`, then no RETURNING198clause is added and no additional data is fetched, however the199INSERT, UPDATE or DELETE statement proceeds normally.200 201E.g.::202 203    stmt = table.insert().values(data="newdata").return_defaults()204 205    result = connection.execute(stmt)206 207    server_created_at = result.returned_defaults["created_at"]208 209When used against an UPDATE statement210:meth:`.UpdateBase.return_defaults` instead looks for columns that211include :paramref:`_schema.Column.onupdate` or212:paramref:`_schema.Column.server_onupdate` parameters assigned, when213constructing the columns that will be included in the RETURNING clause214by default if explicit columns were not specified. When used against a215DELETE statement, no columns are included in RETURNING by default, they216instead must be specified explicitly as there are no columns that217normally change values when a DELETE statement proceeds.218 219.. versionadded:: 2.0  :meth:`.UpdateBase.return_defaults` is supported220   for DELETE statements also and has been moved from221   :class:`.ValuesBase` to :class:`.UpdateBase`.222 223The :meth:`.UpdateBase.return_defaults` method is mutually exclusive224against the :meth:`.UpdateBase.returning` method and errors will be225raised during the SQL compilation process if both are used at the same226time on one statement. The RETURNING clause of the INSERT, UPDATE or227DELETE statement is therefore controlled by only one of these methods228at a time.229 230The :meth:`.UpdateBase.return_defaults` method differs from231:meth:`.UpdateBase.returning` in these ways:232 2331. :meth:`.UpdateBase.return_defaults` method causes the234   :attr:`.CursorResult.returned_defaults` collection to be populated235   with the first row from the RETURNING result. This attribute is not236   populated when using :meth:`.UpdateBase.returning`.237 2382. :meth:`.UpdateBase.return_defaults` is compatible with existing239   logic used to fetch auto-generated primary key values that are then240   populated into the :attr:`.CursorResult.inserted_primary_key`241   attribute. By contrast, using :meth:`.UpdateBase.returning` will242   have the effect of the :attr:`.CursorResult.inserted_primary_key`243   attribute being left unpopulated.244 2453. :meth:`.UpdateBase.return_defaults` can be called against any246   backend. Backends that don't support RETURNING will skip the usage247   of the feature, rather than raising an exception, *unless*248   ``supplemental_cols`` is passed. The return value249   of :attr:`_engine.CursorResult.returned_defaults` will be ``None``250   for backends that don't support RETURNING or for which the target251   :class:`.Table` sets :paramref:`.Table.implicit_returning` to252   ``False``.253 2544. An INSERT statement invoked with executemany() is supported if the255   backend database driver supports the256   :ref:`insertmanyvalues <engine_insertmanyvalues>`257   feature which is now supported by most SQLAlchemy-included backends.258   When executemany is used, the259   :attr:`_engine.CursorResult.returned_defaults_rows` and260   :attr:`_engine.CursorResult.inserted_primary_key_rows` accessors261   will return the inserted defaults and primary keys.262 263   .. versionadded:: 1.4 Added264      :attr:`_engine.CursorResult.returned_defaults_rows` and265      :attr:`_engine.CursorResult.inserted_primary_key_rows` accessors.266      In version 2.0, the underlying implementation which fetches and267      populates the data for these attributes was generalized to be268      supported by most backends, whereas in 1.4 they were only269      supported by the ``psycopg2`` driver.270 271 272:param cols: optional list of column key names or273 :class:`_schema.Column` that acts as a filter for those columns that274 will be fetched.275:param supplemental_cols: optional list of RETURNING expressions,276  in the same form as one would pass to the277  :meth:`.UpdateBase.returning` method. When present, the additional278  columns will be included in the RETURNING clause, and the279  :class:`.CursorResult` object will be "rewound" when returned, so280  that methods like :meth:`.CursorResult.all` will return new rows281  mostly as though the statement used :meth:`.UpdateBase.returning`282  directly. However, unlike when using :meth:`.UpdateBase.returning`283  directly, the **order of the columns is undefined**, so can only be284  targeted using names or :attr:`.Row._mapping` keys; they cannot285  reliably be targeted positionally.286 287  .. versionadded:: 2.0288 289:param sort_by_parameter_order: for a batch INSERT that is being290 executed against multiple parameter sets, organize the results of291 RETURNING so that the returned rows correspond to the order of292 parameter sets passed in.  This applies only to an :term:`executemany`293 execution for supporting dialects and typically makes use of the294 :term:`insertmanyvalues` feature.295 296 .. versionadded:: 2.0.10297 298 .. seealso::299 300    :ref:`engine_insertmanyvalues_returning_order` - background on301    sorting of RETURNING rows for bulk INSERT302 303.. seealso::304 305    :meth:`.UpdateBase.returning`306 307    :attr:`_engine.CursorResult.returned_defaults`308 309    :attr:`_engine.CursorResult.returned_defaults_rows`310 311    :attr:`_engine.CursorResult.inserted_primary_key`312 313    :attr:`_engine.CursorResult.inserted_primary_key_rows`314 315c3�l# �UH*n[R"[RU5v� M, g7frS�rr�r�ColumnsClauseRole��.0rs  rW�	<genexpr>�-UpdateBase.return_defaults.<locals>.<genexpr>�s.���I�!%�A�"�(�(��)@�)@�!�D�D�!%���24rTc3�l# �UH*n[R"[RU5v� M, g7frSr0r2s  rWr4r5�s)���2�FJ��	� � ��!8�!8�!�<�<�d�r6Tz]The 'sort_by_parameter_order' argument to return_defaults() only applies to INSERT statementsc3�l# �UH*n[R"[RU5v� M, g7frSr0r2s  rWr4r5�s-���$�*�A�� � ��!8�!8�!�<�<�*�r6)�_return_defaultsrr�r�316OrderedSet�union�	is_insertr9�
ArgumentError�_sort_by_parameter_orderr�unique_list)rnr,r-�cols�supplemental_col_tups     rW�return_defaults�UpdateBase.return_defaults�s.��n� � ��,�,��05��O�O�D�$A�$A�B�H�H�I�!%�I��1��-�13��-�,1�2�FJ�2�-�D�)�!%���"��>�>��'�'�J���-1�D�)��$�*�$� �317�+�+�3�/4��$�$�%9�:�0��,���05��$�$��4�4�� 4�5�6��0��,��rZc��g)z�Return ``True`` if this :class:`.ReturnsRows` is318'derived' from the given :class:`.FromClause`.319 320Since these are DMLs, we dont want such statements ever being adapted321so we return False for derives.322 323FrT)rnrs  rW�is_derived_from�UpdateBase.is_derived_from�s��rZ�r-c�.�U(a[SU5eUR(a[R"S5eU=R[SU55-
slU(a.UR(d[R"S5eSUlU$)a:
Add a :term:`RETURNING` or equivalent clause to this statement.324 325e.g.:326 327.. sourcecode:: pycon+sql328 329    >>> stmt = (330    ...     table.update()331    ...     .where(table.c.data == "value")332    ...     .values(status="X")333    ...     .returning(table.c.server_flag, table.c.updated_timestamp)334    ... )335    >>> print(stmt)336    {printsql}UPDATE some_table SET status=:status337    WHERE some_table.data = :data_1338    RETURNING some_table.server_flag, some_table.updated_timestamp339 340The method may be invoked multiple times to add new entries to the341list of expressions to be returned.342 343.. versionadded:: 1.4.0b2 The method may be invoked multiple times to344 add new entries to the list of expressions to be returned.345 346The given collection of column expressions should be derived from the347table that is the target of the INSERT, UPDATE, or DELETE.  While348:class:`_schema.Column` objects are typical, the elements can also be349expressions:350 351.. sourcecode:: pycon+sql352 353    >>> stmt = table.insert().returning(354    ...     (table.c.first_name + " " + table.c.last_name).label("fullname")355    ... )356    >>> print(stmt)357    {printsql}INSERT INTO some_table (first_name, last_name)358    VALUES (:first_name, :last_name)359    RETURNING some_table.first_name || :first_name_1 || some_table.last_name AS fullname360 361Upon compilation, a RETURNING clause, or database equivalent,362will be rendered within the statement.   For INSERT and UPDATE,363the values are the newly inserted/updated values.  For DELETE,364the values are those of the rows which were deleted.365 366Upon execution, the values of the columns to be returned are made367available via the result set and can be iterated using368:meth:`_engine.CursorResult.fetchone` and similar.369For DBAPIs which do not370natively support returning values (i.e. cx_oracle), SQLAlchemy will371approximate this behavior at the result level so that a reasonable372amount of behavioral neutrality is provided.373 374Note that not all databases/DBAPIs375support RETURNING.   For those backends with no support,376an exception is raised upon compilation and/or execution.377For those who do support it, the functionality across backends378varies greatly, including restrictions on executemany()379and other statements which return multiple rows. Please380read the documentation notes for the database in use in381order to determine the availability of RETURNING.382 383:param \*cols: series of columns, SQL expressions, or whole tables384 entities to be returned.385:param sort_by_parameter_order: for a batch INSERT that is being386 executed against multiple parameter sets, organize the results of387 RETURNING so that the returned rows correspond to the order of388 parameter sets passed in.  This applies only to an :term:`executemany`389 execution for supporting dialects and typically makes use of the390 :term:`insertmanyvalues` feature.391 392 .. versionadded:: 2.0.10393 394 .. seealso::395 396    :ref:`engine_insertmanyvalues_returning_order` - background on397    sorting of RETURNING rows for bulk INSERT (Core level discussion)398 399    :ref:`orm_queryguide_bulk_insert_returning_ordered` - example of400    use with :ref:`orm_queryguide_bulk_insert` (ORM level discussion)401 402.. seealso::403 404  :meth:`.UpdateBase.return_defaults` - an alternative method tailored405  towards efficient fetching of server-side defaults and triggers406  for single-row INSERTs or UPDATEs.407 408  :ref:`tutorial_insert_returning` - in the :ref:`unified_tutorial`409 410zUpdateBase.returning()z9return_defaults() is already configured on this statementc3�l# �UH*n[R"[RU5v� M, g7frSr0r2s  rWr4�'UpdateBase.returning.<locals>.<genexpr>6s)���!411�BF�Q�I���U�4�4�a�8�8�$�r6zWThe 'sort_by_parameter_order' argument to returning() only applies to INSERT statementsT)	rr9r9r�rr�r<r=r>)rnr-r@�_UpdateBase__kws    rW�	returning�UpdateBase.returning�s���~� �!9�4�@�@�� � ��)�)�K��
�	
���5�!412�BF�!413�414�	415��#��>�>��'�'�8���-1�D�)��rZc�4�URRXS9$)N)�require_embedded)�exported_columns�corresponding_column)rn�columnrOs   rWrQ�UpdateBase.corresponding_columnBs%���$�$�9�9��:�416�	417rZc�V�[UR5Vs/sHoPM sn$s snfrS)r r)rnrs  rWr}� UpdateBase._all_selected_columnsIs%��,�T�_�_�=�>�=�a��=�>�>��>s�&c�V�[SUR55R5$)z`Return the RETURNING columns as a column collection for this418statement.419 420.. versionadded:: 1.4421 422c3�b# �UH%n[U5(dMURU4v� M' g7frS)rr~r2s  rWr4�.UpdateBase.exported_columns.<locals>.<genexpr>Ws)��� 423�/�� ��#�
�Q�U�U�A�J�/�s�/�/)r!r}�as_readonlyr�s rWrP�UpdateBase.exported_columnsMs-�� � 424��/�/� 425�426��+�-�		rZc��Uc
URnO%[R"[RU5nUR427R
X#4U05UlU$)abAdd a table hint for a single table to this428INSERT/UPDATE/DELETE statement.429 430.. note::431 432 :meth:`.UpdateBase.with_hint` currently applies only to433 Microsoft SQL Server.  For MySQL INSERT/UPDATE/DELETE hints, use434 :meth:`.UpdateBase.prefix_with`.435 436The text of the hint is rendered in the appropriate437location for the database backend in use, relative438to the :class:`_schema.Table` that is the subject of this439statement, or optionally to that of the given440:class:`_schema.Table` passed as the ``selectable`` argument.441 442The ``dialect_name`` option will limit the rendering of a particular443hint to a particular backend. Such as, to add a hint444that only takes effect for SQL Server::445 446    mytable.insert().with_hint("WITH (PAGLOCK)", dialect_name="mssql")447 448:param text: Text of the hint.449:param selectable: optional :class:`_schema.Table` that specifies450 an element of the FROM clause within an UPDATE or DELETE451 to be the subject of the hint - applies only to certain backends.452:param dialect_name: defaults to ``*``, if specified as the name453 of a particular dialect, will apply these hints only when454 that dialect is in use.455)rurr�r�DMLTableRolerr;)rn�text�456selectable�dialect_names    rW�	with_hint�UpdateBase.with_hint]sO��H�����J�"�)�)�%�*<�*<�j�I�J��k�k�'�'�*�)C�T�(J�K����rZc�P�[RU5RnU"U5$)a�Return a :term:`plugin-enabled` description of the table and/or457entity which this DML construct is operating against.458 459This attribute is generally useful when using the ORM, as an460extended structure which includes information about mapped461entities is returned.  The section :ref:`queryguide_inspection`462contains more background.463 464For a Core statement, the structure returned by this accessor465is derived from the :attr:`.UpdateBase.table` attribute, and466refers to the :class:`.Table` being inserted, updated, or deleted::467 468    >>> stmt = insert(user_table)469    >>> stmt.entity_description470    {471        "name": "user_table",472        "table": Table("user_table", ...)473    }474 475.. versionadded:: 1.4.33476 477.. seealso::478 479    :attr:`.UpdateBase.returning_column_descriptions`480 481    :attr:`.Select.column_descriptions` - entity information for482    a :func:`.select` construct483 484    :ref:`queryguide_inspection` - ORM background485 486)rQr�rx�rn�meths  rW�entity_description�UpdateBase.entity_description�s%��B�(�(��.�E�E���D�z�rZc�P�[RU5RnU"U5$)a�Return a :term:`plugin-enabled` description of the columns487which this DML construct is RETURNING against, in other words488the expressions established as part of :meth:`.UpdateBase.returning`.489 490This attribute is generally useful when using the ORM, as an491extended structure which includes information about mapped492entities is returned.  The section :ref:`queryguide_inspection`493contains more background.494 495For a Core statement, the structure returned by this accessor is496derived from the same objects that are returned by the497:attr:`.UpdateBase.exported_columns` accessor::498 499    >>> stmt = insert(user_table).returning(user_table.c.id, user_table.c.name)500    >>> stmt.entity_description501    [502        {503            "name": "id",504            "type": Integer,505            "expr": Column("id", Integer(), table=<user>, ...)506        },507        {508            "name": "name",509            "type": String(),510            "expr": Column("name", String(), table=<user>, ...)511        },512    ]513 514.. versionadded:: 1.4.33515 516.. seealso::517 518    :attr:`.UpdateBase.entity_description`519 520    :attr:`.Select.column_descriptions` - entity information for521    a :func:`.select` construct522 523    :ref:`queryguide_inspection` - ORM background524 525)rQr�r�rcs  rW�returning_column_descriptions�(UpdateBase.returning_column_descriptions�s-��T�(�(��526�527+�528+�	
��D�z�rZ)rr9rr>r)529rr/rz.ColumnCollection[str, KeyedColumnElement[Any]]rr"rzSet[KeyedColumnElement[Any]]r�r�)r$rrprr�r530)r)rr�r:)r@r>r,z&Optional[Iterable[_DMLColumnArgument]]r-r�r�r:)rzOptional[FromClause]r�r�)r@�_ColumnsClauseArgument[Any]r-r�rKrr�rir�)rRzKeyedColumnElement[Any]rOr�r��Optional[ColumnElement[Any]])r�rN)r�z;ReadOnlyColumnCollection[Optional[str], ColumnElement[Any]])N�*)r]�strr^zOptional[_DMLTableArgument]r_rmr�r:)r�r�)r�r�)#r�r�r�r��__doc__r�r�531EMPTY_DICTrr��named_with_columnr3�LABEL_STYLE_DISAMBIGUATE_ONLYrr9rrr�is_dmlr!r%rr*rBrErLrQ�ro_memoized_propertyr}rPr`r�rerhr�rTrZrWriri�s3��O�"�N�	
����A����	�6�6��"��������I��LP��H�O�46�J�1�6�
�F�.��.�@�.��	.�5323�.�533�
.�8534��
��
��EI�(-�	d�!�d�B�d�"&�	d�535536�d��d�L��).�n�*�n�"&�n��	n�537538�n��n�bIN�539�-�540�AE�541�	%�542�543���?��?�544���
�	D�
��
��37��	(��(�0�(��	(�545546�(��(�T�!��!�F�,��,rZric���\rSrSr%SrSrSrSrS\S'Sr	S\S	'Sr547S548\S'SrS
\S'SrS\S'Sr
S\S'SrS\S'SSjr\\"SSSSS.S9SSj55rSrg)r�i�zPSupplies support for :meth:`.ValuesBase.values` to549INSERT and UPDATE constructs.�values_baseFNzOptional[Select[Any]]�selectzOptional[ClauseElement]�_post_values_clausez4Optional[util.immutabledict[_DMLColumnElement, Any]]r�rTzRTuple[Union[Sequence[Dict[_DMLColumnElement, Any]], Sequence[Sequence[Any]]], ...]r�rerfzOptional[List[str]]r�r��_inlinec�T�[R"[RXS9Ulg�N��apply_propagate_attrs�rr�rr\ru�rnrus  rWrq�ValuesBase.__init__�����%�%�����550��551rZz,This construct already inserts from a SELECT�1This statement already has ordered values present)r�rf)�msgsc�P�U(GaaUSnU(a[R"S5e[U5S:�a[R"S5e[U[R5525(a�U(aU[US[5(a=[RU5RnU=RU"X54-
sl553U$U(a6[US[[45(aU=RU4-
sl554U$[(a[U[5(de[UR R"U5VVs0sHupVUR$U_M nnnO)['SU5nU(a[R"S5e[RU5R(n[
U"XR+5S55nUR,(a"UR,R/U5UlU$[0R2"U5UlU$s snnf)a�Specify a fixed VALUES clause for an INSERT statement, or the SET555clause for an UPDATE.556 557Note that the :class:`_expression.Insert` and558:class:`_expression.Update`559constructs support560per-execution time formatting of the VALUES and/or SET clauses,561based on the arguments passed to :meth:`_engine.Connection.execute`.562However, the :meth:`.ValuesBase.values` method can be used to "fix" a563particular set of parameters into the statement.564 565Multiple calls to :meth:`.ValuesBase.values` will produce a new566construct, each one with the parameter list modified to include567the new parameters sent.  In the typical case of a single568dictionary of parameters, the newly passed keys will replace569the same keys in the previous construct.  In the case of a list-based570"multiple values" construct, each new list of values is extended571onto the existing list of values.572 573:param \**kwargs: key value pairs representing the string key574  of a :class:`_schema.Column`575  mapped to the value to be rendered into the576  VALUES or SET clause::577 578        users.insert().values(name="some name")579 580        users.update().where(users.c.id == 5).values(name="some name")581 582:param \*args: As an alternative to passing key/value parameters,583 a dictionary, tuple, or list of dictionaries or tuples can be passed584 as a single positional argument in order to form the VALUES or585 SET clause of the statement.  The forms that are accepted vary586 based on whether this is an :class:`_expression.Insert` or an587 :class:`_expression.Update` construct.588 589 For either an :class:`_expression.Insert` or590 :class:`_expression.Update`591 construct, a single dictionary can be passed, which works the same as592 that of the kwargs form::593 594    users.insert().values({"name": "some name"})595 596    users.update().values({"name": "some new name"})597 598 Also for either form but more typically for the599 :class:`_expression.Insert` construct, a tuple that contains an600 entry for every column in the table is also accepted::601 602    users.insert().values((5, "some name"))603 604 The :class:`_expression.Insert` construct also supports being605 passed a list of dictionaries or full-table-tuples, which on the606 server will render the less common SQL syntax of "multiple values" -607 this syntax is supported on backends such as SQLite, PostgreSQL,608 MySQL, but not necessarily others::609 610    users.insert().values(611        [612            {"name": "some name"},613            {"name": "some other name"},614            {"name": "yet another name"},615        ]616    )617 618 The above form would render a multiple VALUES statement similar to:619 620 .. sourcecode:: sql621 622        INSERT INTO users (name) VALUES623                        (:name_1),624                        (:name_2),625                        (:name_3)626 627 It is essential to note that **passing multiple values is628 NOT the same as using traditional executemany() form**.  The above629 syntax is a **special** syntax not typically used.  To emit an630 INSERT statement against multiple rows, the normal method is631 to pass a multiple values list to the632 :meth:`_engine.Connection.execute`633 method, which is supported by all database backends and is generally634 more efficient for a very large number of parameters.635 636   .. seealso::637 638       :ref:`tutorial_multiple_parameters` - an introduction to639       the traditional Core method of multiple parameter set640       invocation for INSERTs and other statements.641 642       :ref:`tutorial_core_insert_values_clause` - Insert tutorial643       detailing alternatives to the multiple values syntax.644 645  The UPDATE construct also supports rendering the SET parameters646  in a specific order.  For this feature refer to the647  :meth:`_expression.Update.ordered_values` method.648 649   .. seealso::650 651      :meth:`_expression.Update.ordered_values`652 653 654rz;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=�lenr�r�r
rrQr�r�r�r�r�rr�r�rurr~rr�r�r�r;r�
immutabledict)	rn�args�kwargsr$�multi_kv_generatorrr��kv_generator�coerced_args	         rWr��ValuesBase.values�s���n��q�'�C���'�'�%����T��Q���'�'�D���655�C��!9�!9�:�:��:�c�!�f�d�3�3�)1�)B�)B��*�.�.�'��&�&�+=�d�+H�*J�J�&��K��:�c�!�f�t�U�m�<�<��&�&�3�&�0�&��K� �=�&�d�F�3�3�3�3�58��656�657���c�4J�K�4J���q�u�u�e�|�4J��K��658�6��?�C���'�'�D��� �0�0��6�I�I���<��i�i�k�4�@�A���<�<��<�<�-�-�k�:�D�L��� �-�-�k�:�D�L����1Ls�
H")r�ru�rur@)r�z/Union[_DMLColumnKeyMapping[Any], Sequence[Any]]r�rr�r:)r�r�r�r�rnr��_supports_multi_parametersrvr�rwr�r�rfr�rxrqrrr�r�rTrZrWr�r��s���%�#�N�!&��$(�F�!�(�4�37��0�7�)�EI�G�
A�H�	�
���FJ�O�B�I�)-�M�&�-��G�T��659�660����K� �661��j�662�j��
j�663�j���jrZr�c
�B^�\rSrSr%SrSrSrSrSrSr	S\664S'SrS	\665S666'S667\R4S\R4S\R4S
\R 4S\R"4S\R4S\R4S\R$4S\R&4S\R4S\R$4S\R4/\R*-\R.-\R2-\R6-rS$U4Sjjr\S%Sj5r\S&S'Sjj5r \!(a�\"SS.S(Sjj5r#\"SS.S)Sjj5r#\"SS.S*Sjj5r#\"SS.S+Sjj5r#\"SS.S,Sjj5r#\"SS.S-Sjj5r#\"SS.S.Sjj5r#\"SS.S/S jj5r#\"SS.S0S!jj5r#SS.S0S"jjr#S#r$U=r%$S#r$U=r%$)1r�i�z�Represent an INSERT construct.668 669The :class:`_expression.Insert` object is created using the670:func:`_expression.insert()` function.671 672r�TNFr�r>r4rurxr�r�r�rvrwrrr9rc�$>�[TU]U5 grS��superrq�rnru�	__class__s  �rWrq�Insert.__init__�����
����rZc��SUlU$)a;Make this :class:`_expression.Insert` construct "inline" .673 674When set, no attempt will be made to retrieve the675SQL-generated default values to be provided within the statement;676in particular,677this allows SQL expressions to be rendered 'inline' within the678statement without the need to pre-execute them beforehand; for679backends that support "returning", this turns off the "implicit680returning" feature for the statement.681 682 683.. versionchanged:: 1.4 the :paramref:`_expression.Insert.inline`684   parameter685   is now superseded by the :meth:`_expression.Insert.inline` method.686 687T�rxr�s rW�inline�
Insert.inline�s��$����rZc	�@�UR(a[R"S5eUVs/sH'n[R"[688RUSS9PM) snUlSUlX0l	[R"[689RU5UlU$s snf)aSReturn a new :class:`_expression.Insert` construct which represents690an ``INSERT...FROM SELECT`` statement.691 692e.g.::693 694    sel = select(table1.c.a, table1.c.b).where(table1.c.c > 5)695    ins = table2.insert().from_select(["a", "b"], sel)696 697:param names: a sequence of string column names or698 :class:`_schema.Column`699 objects representing the target columns.700:param select: a :func:`_expression.select` construct,701 :class:`_expression.FromClause`702 or other construct which resolves into a703 :class:`_expression.FromClause`,704 such as an ORM :class:`_query.Query` object, etc.  The order of705 columns returned from this FROM clause should correspond to the706 order of columns sent as the ``names`` parameter;  while this707 is not checked before passing along to the database, the database708 would normally raise an exception if these column lists don't709 correspond.710:param include_defaults: if True, non-server default values and711 SQL expressions as specified on :class:`_schema.Column` objects712 (as documented in :ref:`metadata_defaults_toplevel`) not713 otherwise specified in the list of names will be rendered714 into the INSERT and SELECT statements, so that these values are also715 included in the data to be inserted.716 717 .. note:: A Python-side default that uses a Python callable function718    will only be invoked **once** for the whole statement, and **not719    per row**.720 721z0This construct already inserts value expressionsTr�)r�r9r�rr�rr�r�rx�#include_insert_from_select_defaults�
DMLSelectRolerv)rn�namesrv�include_defaultsrts     rW�from_select�Insert.from_select�s���R�<�<��)�)�B��
��722���
���U�0�0�$�t�D��723������3C�0��&�&�u�':�':�F�C������724s�.BrGc��grSrT)rn�
_Insert__ent0r-s   rWrL�Insert.returning7���+.rZc��grSrT)rnr��
_Insert__ent1r-s    rWrLr�<s��03rZc��grSrT)rnr�r��
_Insert__ent2r-s     rWrLr�Es��58rZc��grSrT)rnr�r�r��
_Insert__ent3r-s      rWrLr�Os��:=rZc��grSrT)rnr�r�r�r��
_Insert__ent4r-s       rWrLr�Zs��?BrZc��grSrT)rnr�r�r�r�r��
_Insert__ent5r-s        rWrLr�fs	��DGrZc��grSrT)	rnr�r�r�r�r�r��
_Insert__ent6r-s	         rWrLr�ss	��ILrZc	��grSrT)725rnr�r�r�r�r�r�r��
_Insert__ent7r-s726          rWrLr��s��rZc��grSrT�rnr-r@�_Insert__kws    rWrLr��s��$'rZc��grSrTr�s    rWrLr��s��727$'rZ)rxr�r�rvr��r�r:)T)r�zSequence[_DMLColumnArgument]rvrPr�r�r�r:)r��728_TCCA[_T0]r-r�r�zReturningInsert[Tuple[_T0]])r�r�r��729_TCCA[_T1]r-r�r�z ReturningInsert[Tuple[_T0, _T1]])730r�r�r�r�r��731_TCCA[_T2]r-r�r�z%ReturningInsert[Tuple[_T0, _T1, _T2]])r�r�r�r�r�r�r��732_TCCA[_T3]r-r�r�z*ReturningInsert[Tuple[_T0, _T1, _T2, _T3]])r�r�r�r�r�r�r�r�r��733_TCCA[_T4]r-r�r�z/ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4]])r�r�r�r�r�r�r�r�r�r�r��734_TCCA[_T5]r-r�r�z4ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]])r�r�r�r�r�r�r�r�r�r�r�r�r��735_TCCA[_T6]r-r�r�z9ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]])r�r�r�r�r�r�r�r�r�r�r�r�r�r�r��736_TCCA[_T7]r-r�r�z>ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]])r@rjr-r�r�rr�zReturningInsert[Any])&r�r�r�r�rnr�r�rvr�r>r�r<r7�dp_clauseelement�737dp_boolean�dp_string_list�
dp_dml_values�dp_dml_multi_values�dp_clauseelement_tuple�dp_table_hint_listr1� _has_prefixes_traverse_internalsr$�"_dialect_kwargs_traverse_internalsr%�_executable_traverse_internalsr0�_has_ctes_traverse_internals�_traverse_internalsrqrr�r�rrrLr��
__classcell__�r�s@rWr�r��s������N�!%��
�F�*/�'�%*��d�*��I����'�8�8�9�
�)�4�4�5�
�/�>�>�?�
�)�7�7�8�
�/�C�C�D�
�(�9�9�:�
"�$5�$F�$F�G�
�,�C�C�D�
�(�;�;�<�
�!2�!=�!=�>�*�!�8�8�
�(�):�)E�)E�F�	738�"�7396�7406�#	7�$�741:�742:�%	;�&�7433�7443�'	4�(�745-�746-�)	.��0 �����(�747"&�	4�+�4��4��	4�748749�4��4�l�750�IN�	.�$�	.�BF�	.�
(�	.�751�	.�752�-2�	3��	3��	3�753&*�	3�.�
	3�754�	3�755�-2�
	8��	8��	8��		8�&*�
	8�3�	8�756�	8�757�-2�	=��	=��	=��		=�758�	=�&*�	=�8�	=�759�	=�760�-2�		B��		B��		B��			B�761�		B��
		B�&*�		B�=�		B�762�		B�763�-2�764	G��765	G��766	G��	767	G�768�769	G��
770	G��771	G�&*�772	G�B�773	G�774�775	G�776�-2�	L��	L��	L��		L�777�	L��
	L��	L��	L�&*�	L�G�	L�778�	L�779�-2�	��	��	��		�780�	��
	��	��	��	�&*�	�781�	�782�	�$783�-2�	'�.�	'�&*�	'��		'�784"�	'�785�	'�-2�	'�.�	'�&*�	'��		'�786"�	'�	'�WrZr�c��\rSrSrSrSrg)�ReturningInserti�z�Typing-only class that establishes a generic type form of787:class:`.Insert` which tracks returned column types.788 789This datatype is delivered when calling the790:meth:`.Insert.returning` method.791 792.. versionadded:: 2.0793 794rTN�r�r�r�r�rnr�rTrZrWr�r�����rZr�c�t�\rSrSr%S\S'SrS\S'\S
Sj5rSSjrSS	jr	SS795jr796\SSj5rSr
g)r�i�r�rurTzTuple[ColumnElement[Any], ...]r�c��UH<n[R"[RX S9nU=RU4-
slM> U$)apReturn a new construct with the given expression(s) added to797its WHERE clause, joined to the existing clause via AND, if any.798 799Both :meth:`_dml.Update.where` and :meth:`_dml.Delete.where`800support multiple-table forms, including database-specific801``UPDATE...FROM`` as well as ``DELETE..USING``.  For backends that802don't have multiple-table support, a backend agnostic approach803to using multiple tables is to make use of correlated subqueries.804See the linked tutorial sections below for examples.805 806.. seealso::807 808    :ref:`tutorial_correlated_updates`809 810    :ref:`tutorial_update_from`811 812    :ref:`tutorial_multi_table_deletes`813 814r{)rr�r�WhereHavingRoler�)rn�whereclause�	criterion�where_criterias    rW�where�DMLWhereBase.where�sF��,%�I�1:�1A�1A��%�%�y�2�N�
� � �^�$5�5� �	%�815�rZc� �UR"U6$)zRA synonym for the :meth:`_dml.DMLWhereBase.where` method.816 817.. versionadded:: 1.4818 819)r�)rn�criterias  rW�filter�DMLWhereBase.filter�s���z�z�8�$�$rZc��UR$rS�rur�s rW�_filter_by_zero�DMLWhereBase._filter_by_zero�s���z�z�rZc��UR5nUR5VVs/sHup4[X#5U:HPM nnnUR"U6$s snnf)zGapply the given filtering criterion as a WHERE clause820to this select.821 822)r�r�rr�)rnr��from_entityr~r��clausess      rW�	filter_by�DMLWhereBase.filter_by�s\��823�*�*�,��%�l�l�n�824�,�825��
"�+�3�u�<�,�	�826��{�{�G�$�$��	827s�Ac�B�[R"UR5$)z�Return the completed WHERE clause for this :class:`.DMLWhereBase`828statement.829 830This assembles the current collection of WHERE criteria831into a single :class:`_expression.BooleanClauseList` construct.832 833 834.. versionadded:: 1.4835 836)r(�_construct_for_whereclauser�r�s rWr��DMLWhereBase.whereclause�s ��!�;�;�� � �837�	838rZN)r�z_ColumnExpressionArgument[bool]r�r:)r�z roles.ExpressionElementRole[Any]r�r:r�)r�rr�r:)r�rk)r�r�r�r�r�r�rr�r�r�r�r�r�r�rTrZrWr�r��sH����68�O�3�8�����8%��%��839��840rZr�c841�V^�\rSrSrSrSrSrS\R4S\R4S\R4S\R4S	\R4S842\R4S\R4S\R4S
\R4/	\R-\R"-\R&-\R*-rSU4Sjjr\SSj5r\SSj5r\(a�\SSj5r\S Sj5r\S!Sj5r\S"Sj5r\S#Sj5r\S$Sj5r\S%Sj5r\S&Sj5r\S'Sj5rS'SjrSrU=r$SrU=r$)(ri�z�Represent an Update construct.843 844The :class:`_expression.Update` object is created using the845:func:`_expression.update()` function.846 847r�Trur�rxrfr�rrr9rc�$>�[TU]U5 grSr�r�s  �rWrq�Update.__init__r�rZc���UR(a[R"S5eUR(a[R"S5e[RU5RnU"XS5UlU$)aUSpecify the VALUES clause of this UPDATE statement with an explicit848parameter ordering that will be maintained in the SET clause of the849resulting UPDATE statement.850 851E.g.::852 853    stmt = table.update().ordered_values(("name", "ed"), ("ident", "foo"))854 855.. seealso::856 857   :ref:`tutorial_parameter_ordered_updates` - full example of the858   :meth:`_expression.Update.ordered_values` method.859 860.. versionchanged:: 1.4 The :meth:`_expression.Update.ordered_values`861   method862   supersedes the863   :paramref:`_expression.update.preserve_parameter_order`864   parameter, which will be removed in SQLAlchemy 2.0.865 866z)This statement already has values presentr�T)r�r9r=rfrQr�r�)rnr�r�s   rW�ordered_values�Update.ordered_values sn��,�<�<��#�#�;��
��
!�
!��#�#�C��
� �0�0��6�I�I��+�D��=����rZc��SUlU$)a�Make this :class:`_expression.Update` construct "inline" .867 868When set, SQL defaults present on :class:`_schema.Column`869objects via the870``default`` keyword will be compiled 'inline' into the statement and871not pre-executed.  This means that their values will not be available872in the dictionary returned from873:meth:`_engine.CursorResult.last_updated_params`.874 875.. versionchanged:: 1.4 the :paramref:`_expression.update.inline`876   parameter877   is now superseded by the :meth:`_expression.Update.inline` method.878 879Tr�r�s rWr��
Update.inlineCs�� ����rZc��grSrT)rn�
_Update__ent0s  rWrL�Update.returning\r�rZc��grSrT)rnr��
_Update__ent1s   rWrLr�a���03rZc��grSrT)rnr�r��
_Update__ent2s    rWrLr�f���58rZc��grSrT)rnr�r�r��
_Update__ent3s     rWrLr�k���:=rZc��grSrT)rnr�r�r�r��
_Update__ent4s      rWrLr�t���?BrZc��grSrT)rnr�r�r�r�r��
_Update__ent5s       rWrLr�~�	��DGrZc��grSrT)rnr�r�r�r�r�r�
_Update__ent6s        rWrLr���	��ILrZc	��grSrT)	rnr�r�r�r�r�rr�
_Update__ent7s	         rWrLr�����rZc��grSrT�rnr@�_Update__kws   rWrLr�����$'rZc��grSrTrs   rWrLr�����#&rZ)rxrfr�)r�zTuple[_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]])880r�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�rr�r�z4ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]])r�r�r�r�r�r�r�r�r�r�rr�rr�r�z9ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]])r�r�r�r�r�r�r�r�r�r�rr�rr�rr�r�z>ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]])r@rjrrr�zReturningUpdate[Any]) r�r�r�r�rnr��	is_updater7r�r�r��dp_dml_ordered_valuesr�r�r1r�r$r�r%r�r0r�r�rqrr�r�rrrLr�r�r�s@rWrr�s������N��I��'�8�8�9�
� 1� H� H�I�
�)�4�4�5�
� 1� G� G�H�
�)�7�7�8�
�,�C�C�D�
�(�;�;�<�
�!2�!=�!=�>�*�!�8�8�
�
	881��8826�8836�	7��884:�885:�	;� �8863�8873�!	4�"�888-�889-�#	.��* �� �� �D����$�890�	.�$�	.�
(�	.�891�	.�892�	3�$�	3�.8�	3�
-�	3�893�	3�894�	8�$�	8�.8�	8�BL�	8�
2�	8�895�	8�896�	=��	=��	=��		=�897�	=�8�
	=�898�	=�899�	B��	B��	B��		B�900�	B��
	B�=�	B�901�	B�902�	G��	G��	G��		G�903�	G��
	G��	G�B�	G�904�	G�905�		L��		L��		L��			L�906�		L��
		L��		L��		L�G�		L�907�		L�908�	��	��	��		�909�	��
	��	��	��	�910�	�911�	� 912�	'�4�	'�>A�	'�
!�	'�913�	'�	'�4�	'�>A�	'�
!�	'�	'�krZrc��\rSrSrSrSrg)�ReturningUpdatei�z�Typing-only class that establishes a generic type form of914:class:`.Update` which tracks returned column types.915 916This datatype is delivered when calling the917:meth:`.Update.returning` method.918 919.. versionadded:: 2.0920 921rTNr�rTrZrWrr�r�rZrc��\rSrSrSrSrSrS\R4S\R4S\R4S\R4/\R-\
R-\R -\R$-rSS	jr\(a�\SS922j5r\SSj5r\SSj5r\SS
j5r\SSj5r\SSj5r\SSj5r\SSj5r\SSj5rSSjrSrgSrg) ri�z�Represent a DELETE construct.923 924The :class:`_expression.Delete` object is created using the925:func:`_expression.delete()` function.926 927rTrur�rrc�T�[R"[RXS9Ulgrzr}r~s  rWrq�Delete.__init__�r�rZc��grSrT)rn�
_Delete__ent0s  rWrL�Delete.returning�r�rZc��grSrT)rnr�
_Delete__ent1s   rWrLr�r�rZc��grSrT)rnrr�
_Delete__ent2s    rWrLr�r�rZc��grSrT)rnrrr�
_Delete__ent3s     rWrLr�r�rZc��grSrT)rnrrrr�
_Delete__ent4s      rWrLr�rrZc��grSrT)rnrrrrr!�
_Delete__ent5s       rWrLrrrZc��grSrT)rnrrrrr!r#�
_Delete__ent6s        rWrLr
rrZc	��grSrT)	rnrrrrr!r#r%�
_Delete__ent7s	         rWrLrr	rZc��grSrT�rnr@�_Delete__kws   rWrLr*r
rZc��grSrTr)s   rWrLr/rrZr�Nr�)rr�r�zReturningDelete[Tuple[_T0]])rr�rr�r�z ReturningDelete[Tuple[_T0, _T1]])rr�rr�rr�r�z%ReturningDelete[Tuple[_T0, _T1, _T2]])928rr�rr�rr�rr�r�z*ReturningDelete[Tuple[_T0, _T1, _T2, _T3]])rr�rr�rr�rr�r!r�r�z/ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4]])rr�rr�rr�rr�r!r�r#r�r�z4ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]])rr�rr�rr�rr�r!r�r#r�r%r�r�z9ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]])rr�rr�rr�rr�r!r�r#r�r%r�r'r�r�z>ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]])r@rjr*rr�zReturningDelete[Any])r�r�r�r�rnr��	is_deleter7r�r�r�r1r�r$r�r%r�r0r�r�rqrrrLr�rTrZrWrr�sM����N��I��'�8�8�9�
� 1� H� H�I�
�,�C�C�D�
�(�;�;�<�		929��9306�9316�
	7��932:�933:�	;��9343�9353�	4��936-�937-�		.��938�939�940�	.�$�	.�
(�	.�941�	.�942�	3�$�	3�.8�	3�
-�	3�943�	3�944�	8�$�	8�.8�	8�BL�	8�
2�	8�945�	8�946�	=��	=��	=��		=�947�	=�8�
	=�948�	=�949�	B��	B��	B��		B�950�	B��
	B�=�	B�951�	B�952�	G��	G��	G��		G�953�	G��
	G��	G�B�	G�954�	G�955�		L��		L��		L��			L�956�		L��
		L��		L��		L�G�		L�957�		L�958�	��	��	��		�959�	��
	��	��	��	�960�	�961�	� 962�	'�4�	'�>A�	'�
!�	'�963�	'�	'�4�	'�>A�	'�
!�	'�krZrc��\rSrSrSrSrg)�ReturningDeletei4z�Typing-only class that establishes a generic type form of964:class:`.Delete` which tracks returned column types.965 966This datatype is delivered when calling the967:meth:`.Delete.returning` method.968 969.. versionadded:: 2.0970 971rTNr�rTrZrWr.r.4r�rZr.)rVrQr�zTypeGuard[UpdateDMLState])rVrQr�zTypeGuard[DeleteDMLState])rVrQr�zTypeGuard[InsertDMLState])urn�972__future__r�collections.abc�abcr��operator�typingrrrrrr	r973rrr
rrrrrr�rrrr��_typingrrrr�baserrrrr r!r"r#r$r%r&r'�elementsr(r)r*r+r,r^r-r.r/r0r1r2r3r4r5�sqltypesr6�visitorsr7r9�util.typingr:r;r<r=r>r?r@rArBrCrDrErFrGrHrI�_TCCArJrorKrLrMrNrOrPrXr\r^�974attrgetterr_rm�_DMLColumnElementr�rQ�975plugin_forr�r�r�DMLRolerir�r�r�r�rrrr.rTrZrW�<module>r@s����976#�)�������!�������� �������#�&�)�'�$���#�"������!�'�#�"�#���-�"��#��(�#�(��'����#��2�/�+�-�*���������<�.�%�,�1�+�"�&�A�A�A��"�"�:�.�H��"�"�:�.�H��"�"�:�.�H�
�T�����#�|�C�0�0�1����e�T�1�2��R977�|�R978�j����H�-�C@�X�C@�.�C@�L����H�-�%�X�%�.�%�P����H�-�979 �X�980 �.�981 �T	�	�M�M�982�������T	�nV��V�rl'�Z�l'�^	�f�.�s�3�	�I983�I984�Xq'�\�:�q'�h	�f�.�s�3�	�u'�\�:�u'�p	�f�.�s�3�	rZ
codekingpro/portable-devtools · Team Ai