L i  XdZddlmZddlmZddlZddlmZddlm Z ddlm 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;dd3l5mZ>dd6l?m@Z@dd7lAmBZBd8d9lmCZCd8dlmZd8d:lDmEZEd8d;lDmFZFerddlmIZIdd?lmJZJdd@lmKZKddAlmLZLddBlmMZMddClmNZNddDlmOZOddElmPZPddFlmQZQddGlmRZRddHlmSZSddIlmTZUddJl"mVZVddKlWmXZXddLl/mYZYddMl5mZZZddNl5m[Z[ddOl5m\Z\ddPl5m]Z]dwdRZ^dxdSZ_dydTZ`n6ejdUZ^ejdVZ_ejdWZ`edXeYZbeece2efZdee=e6e;fZeGdZdQe*Zfe*jd[d\Gd]d^efZhe*jd[d_Gd`daefZie*jd[dbGdcddefZjGdedfeje9e.e+e:e-e7e1 ZlGdgdhelZmGdidjemZnGdkdlene>eZoGdmdnZpGdodpepemZqGdqdreqe>eZrGdsdtepelZsGdudveqe>eZty)zzd Provide :class:`_expression.Insert`, :class:`_expression.Update` and :class:`_expression.Delete`. ) 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) Executable) Generative)HasCompileState)BooleanClauseList) ClauseElement) ColumnClause) ColumnElement)Null)Alias)ExecutableReturnsRows) FromClause)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) SelectableDMLStatecyNdmls X/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/sqlalchemy/sql/dml.pyisupdaterX`cyrSrTrUs rWisdeleter\brYrZcyrSrTrUs rWisinsertr^drYrZrXr\r^_T)boundcFeZdZUdZdZded<dZded<dZded<dZd ed <d ed <dZ d Z d Z d Z ded< ddZ eddZe ddZeddZer ed dZe d!dZe d"dZ d#dZd$dZd$dZd%dZd&dZy)'rQTNz0Optional[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 UpdateBase statementc trSNotImplementedError)selfricompilerkws rW__init__zDMLState.__init__s "##rZcvt|jr|jjnd|jdS)N)nametable)rrsrrclsris rWget_entity_descriptionzDMLState.get_entity_descriptions3 ( 8$$__   rZcp|jDcgc]}|j|j|dc}Scc}w)N)rrtypeexpr)_all_selected_columnskeyrx)rurics rW!get_returning_column_descriptionsz*DMLState.get_returning_column_descriptionss?44       s!3c.|jjSrS)rirsrms rW dml_tablezDMLState.dml_tables~~###rZcyrSrTrts rWget_plugin_classzDMLState.get_plugin_classsLOrZc |Dcgc]H}|jDcic]*\}}tjtj||,c}}Jc}}}Scc}}wcc}}}wrS)itemsrexpectr DMLColumnRole)rurimulti_kv_iteratormappingkvs rW_get_multi_crud_kv_pairsz!DMLState._get_multi_crud_kv_pairsse-   $MMO Aq  !4!4a8!;     sA/AAAc |Dcgc]\\}}tjtj||s|n.tjtj|t df^c}}Scc}}w)NT)type_is_crud)rrrrExpressionElementRoler6)ruri kv_iteratorneeds_to_be_cacheablerrs rW_get_crud_kv_pairszDMLState._get_crud_kv_pairssn*$ 1  !4!4a81"))33&j $     sA!A+cg}ttj|j}|d}|h}|j}|j r&|t |j jz }|D]Y}t|D]I}|j|js|j||j|jK[|j|dd||fS)Nrr)listsql_utiltables_from_leftmostrs_where_criteriarbtuplevaluesr intersection _cloned_setappendupdateextend) rmrifroms all_tables primary_tableseenconsidercrititems rW_make_extra_fromszDMLState._make_extra_fromss#%(77 HI "1 ,,  d33::<= =H .D%d+ .(()9)9:LL& D,,- . .  Z^$e##rZcN|jr|j|_d|_yyNF)_no_parameters_valuesrbrmris rW_process_valueszDMLState._process_valuess&   $-$5$5D !"'D  rZc|jJ|jDcic] }|t}}|jrd|_||_yJdcc}w)NFz%This statement already has parameters) _select_namesr,rrb)rmrirr parameterss rW_process_select_valueszDMLState._process_select_valuessh&&222%.%<%<> !D$&L> >    "'D $.D ! BA A5> sAcbtjd|jjz)Nz6%s construct does not support multiple parameter sets.)r9InvalidRequestError__visit_name__upperrs rW_no_multi_values_supportedz#DMLState._no_multi_values_supporteds2%% ')2)A)A)G)G)I J  rZc,tjd)NzCan'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.)r9rrs rW_cant_mix_formats_errorz DMLState._cant_mix_formats_errors%%   rZ)rirhrnrKror)rirhreturnDict[str, Any])rirhrList[Dict[str, Any]]r_DMLTableElement)rir%rzType[DMLState])rirhrz'Iterable[Dict[_DMLColumnArgument, Any]]rz"List[Dict[_DMLColumnElement, Any]])rirhrz(Iterable[Tuple[_DMLColumnArgument, Any]]rboolrz#List[Tuple[_DMLColumnElement, Any]])ri DMLWhereBaserz#Tuple[FromClause, List[FromClause]]ri ValuesBaserNone)rirrr )rr )__name__ __module__ __qualname__rrb__annotations__rcrerf_supports_implicit_returningrXr\r^rp classmethodrvr}propertyrrrrrrrrrrrTrZrWrQrQrsrNIMFM  FJOBI=A:A#' HHH$#$/:$BE$     "      $$ O O    C   ,      >  $  -   .$%$ ,$,( B  rZdefaultinsertcheZdZdZdZdZ d d dZejd dZ d dZ d dZ y) InsertDMLStateTFc ||_|j|_|rd|_d|_|j r|j ||j|j||jr|j|yy)NFT) rirsrgrr^rrrr _multi_values_process_multi_values)rmrirndisable_implicit_returningros rWrpzInsertDMLState.__init__sv#'oo %05D -  " "  ' ' 2    (   +  " "  & &y 1 #rZc|jxsdDcgc](}tjtj|d*c}Scc}w)NrTTas_key)rbrrrr)rmcols rW_insert_col_keyszInsertDMLState._insert_col_keys$sD ,,2    U00#d C   s-Ac|jr d|_|j|_d|_y|jr|j yyr)r_has_multi_parametersrrbrrs rWrzInsertDMLState._process_values,sC   ).D &$-$5$5D !"'D   ' '  ( ( *(rZc |jD]}|Dcgc]\}t|tjr>t |j j |Dcic]\}}|j|c}}n|^}}}}|jr*d|_d|_ ||_ |jd|_ |js|j|jsJ|jj|ycc}}wcc}}}w)NFTr)r isinstancecollections_abcr ziprsr|r{rrrcrbrr)rmrir parameter_setr|valuemulti_parameterss rWrz$InsertDMLState._process_multi_values4s #11 @J&0 N N""-1I1IJ),IOO,=,=}(M$Auu  ' ' N  N""&+#-1*)9&(,(>(>q(A%//,,.----&&--.>?- @ NsAD C:/D :D NF)riInsertrnrKrrror)rz List[str]r) rrrr^include_table_with_column_exprsrrprmemoized_propertyrrrrTrZrWrrshH&+#! ,1 222%) 2  2*   +@rZrrc$eZdZdZdZddZddZy)UpdateDMLStateTFc d||_d|_|j|j|n;|j|j |n|j r|j||j|\}}||_ ||_ |x|_ }t|xr |j|_yNT)rirXre_process_ordered_valuesrrrrrrg _extra_froms is_multitabler'render_table_with_column_in_update_fromr)rmrirnrotefmts rWrpzUpdateDMLState.__init__Ts"  $ $ 0  ( ( 3    *   +  $ $  + +I 6&&y12"$$R/3  C8CC0 ,rZc|j}|jr=d|_|Jt||_||_|Dcgc]\}}| c}}|_yt j dcc}}w)NFzQCan only invoke ordered_values() once, and not mixed with any other values() call)rerdictrbrfr9r)rmrirr{rs rWrz&UpdateDMLState._process_ordered_valuesgst..   "'D ) ))$($4D !#-D >H'I U'ID $))/ (Js A+N)riUpdaternrKrorr)rrrrXrrprrTrZrWrrNsH&+# & rZrdeleteceZdZdZddZy)DeleteDMLStateTc r||_d|_|j|\}}||_||_||_yr)rir\rrgrr)rmrirnrorrs rWrpzDeleteDMLState.__init__{s<" &&y12rZN)riDeleternrKror)rrrr\rprTrZrWrrws H rZrceZdZUdZdZej Zded<dZ e jZ ded<ded <dZ d Zd ed <d Zd ed <dZded<dZ d dZd!dZed"dZed dd d#dZd$dZedd d%dZ d& d'dZej4d(dZej4 d)dZe d* d+dZed,dZed-dZ y ).rhzDForm the base for ``INSERT``, ``UPDATE``, and ``DELETE`` statements. update_basez5util.immutabledict[Tuple[_DMLTableElement, str], str]_hintsFr3 _label_stylerrsNz+Optional[Tuple[_ColumnsClauseElement, ...]]_return_defaults_columns_supplemental_returningrTz!Tuple[_ColumnsClauseElement, ...] _returningTc|jdD cgc]*\}}}}} t|r|j|||d||,} }}}}} |j| ycc} }}}}w)NFT)r{rrname_is_truncatable primary_key foreign_keys)_generate_columns_plus_namesr _make_proxy_populate_separate_keys) rm fromclausecolumnsrrrequired_label_name proxy_keyfallback_label_namer|repeatedproxs rW#_generate_fromclause_column_proxiesz.UpdateBase._generate_fromclause_column_proxiess,33E:  ## # MM($(')    & ''-' s/A ctd)zSet 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. zparams() is not supported for INSERT/UPDATE/DELETE statements. To set the values for an INSERT or UPDATE statement, use stmt.values(**parameters).rk)rmargros rWparamszUpdateBase.paramss" *  rZc (|j||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. )_validate_dialect_kwargs)rmopts rWwith_dialect_optionszUpdateBase.with_dialect_optionss %%c* rZ)supplemental_colssort_by_parameter_ordercL|jrZ|jrF|rDttj|jj d|D|_nd|_ntd|D|_d|_|r(|j stjdd|_ |rsd|D}|j%ttj||_ |Sttj|jt|z|_ |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 `, 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 ` 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` c3dK|](}tjtj|*ywrSrrrColumnsClauseRole.0r|s rW z-UpdateBase.return_defaults..s-I"(()@)@!DI.0rTc3dK|](}tjtj|*ywrSrrs rWrz-UpdateBase.return_defaults..s(2AB   !8!8!<2rTz]The 'sort_by_parameter_order' argument to return_defaults() only applies to INSERT statementsc3dK|](}tjtj|*ywrSrrs rWrz-UpdateBase.return_defaults..s+$  !8!8!<$r) _return_defaultsrrr OrderedSetunion is_insertr9 ArgumentError_sort_by_parameter_orderr unique_list)rmrrcolssupplemental_col_tups rWreturn_defaultszUpdateBase.return_defaultss.n  ,,05OOD$A$ABHHI!%I1-13-,12FJ2-D )!% ">>''J-1D ) $*$ ++3/4$$%9:0, 05$$44 4560, rZcy)zReturn ``True`` if this :class:`.ReturnsRows` is 'derived' from the given :class:`.FromClause`. Since these are DMLs, we dont want such statements ever being adapted so we return False for derives. FrT)rmrs rWis_derived_fromzUpdateBase.is_derived_fromsrZrc|r td||jrtjd|xjt d|Dz c_|r(|j stjdd|_|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 statementc3dK|](}tjtj|*ywrSrrs rWrz'UpdateBase.returning..6s(! =>I  U44a 8! rzWThe 'sort_by_parameter_order' argument to returning() only applies to INSERT statementsT) rrr9rrrr"r#r$)rmrr&_UpdateBase__kws rW returningzUpdateBase.returnings~  !94@ @  ))K  5! BF!    #>>''8-1D ) rZc<|jj||S)N)require_embedded)exported_columnscorresponding_column)rmcolumnr1s rWr3zUpdateBase.corresponding_columnBs($$99 %5:  rZcRt|jDcgc]}|c}Scc}wrS)r r)rmr|s rWrzz UpdateBase._all_selected_columnsIs,T__=>a>>>s $cVtd|jDjS)zxReturn the RETURNING columns as a column collection for this statement. .. versionadded:: 1.4 c3NK|]}t|r|j|fywrS)rr{rs rWrz.UpdateBase.exported_columns..Ws(  #UUAJ s#%)r!rz as_readonlyrs rWr2zUpdateBase.exported_columnsMs-  //   +-  rZc| |j}n$tjtj|}|j j ||f|i|_|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. )rsrrr DMLTableRolerr!)rmtext selectable dialect_names rW with_hintzUpdateBase.with_hint]sQH  J"))%*<*>> 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 )rQrrvrmmeths rWentity_descriptionzUpdateBase.entity_descriptions%B((.EEDzrZcPtj|j}||S)aReturn 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=, ...) }, { "name": "name", "type": String(), "expr": Column("name", String(), table=, ...) }, ] .. 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 )rQrr}r@s rWreturning_column_descriptionsz(UpdateBase.returning_column_descriptionss-T((  + + DzrZ) rr/rz.ColumnCollection[str, KeyedColumnElement[Any]]rr"rzSet[KeyedColumnElement[Any]]rr)r rrorrr )rrrr:)r&r>rz&Optional[Iterable[_DMLColumnArgument]]rrrr:)rzOptional[FromClause]rr)r&_ColumnsClauseArgument[Any]rrr.rrrhr)r4zKeyedColumnElement[Any]r1rrOptional[ColumnElement[Any]])rrN)rz;ReadOnlyColumnCollection[Optional[str], ColumnElement[Any]])N*)r;strr<zOptional[_DMLTableArgument]r=rHrr:)rr)rr)!rrr__doc__rr EMPTY_DICTrrnamed_with_columnr3LABEL_STYLE_DISAMBIGUATE_ONLYrrrrris_dmlr rrrr(r*r/r3ro_memoized_propertyrzr2r>rrBrDrTrZrWrhrhs3O"N  A 66"  ILPHO46J16 F..@. . 3 .  .8    EI(- d!dBd"& d  ddL).n*n"&n n  nnbIN - AE %  ??   D  37 ((0( (  ((T!!F,,rZrhceZdZUdZdZdZdZded< dZded< dZ d ed <d Z d ed <dZ ded<dZ ded<dZ ded<ddZeeddddd ddZy)rzTSupplies support for :meth:`.ValuesBase.values` to INSERT and UPDATE constructs. values_baseFNzOptional[Select[Any]]selectzOptional[ClauseElement]_post_values_clausez4Optional[util.immutabledict[_DMLColumnElement, Any]]rrTzRTuple[Union[Sequence[Dict[_DMLColumnElement, Any]], Sequence[Sequence[Any]]], ...]rrdrezOptional[List[str]]rr_inlinecZtjtj|||_yNapply_propagate_attrsrrrr:rsrmrss rWrpzValuesBase.__init__!%%   T  rZz,This construct already inserts from a SELECT1This statement already has ordered values present)rre)msgsc|r5|d}|rtjdt|dkDrtjdt|tj r|rQt|dt r>tj|j}|xj|||fz c_ |S|r1t|dttfr|xj|fz c_ |Strt|tsJt|j j"|Dcic]\}}|j$|}}}n#t'd|}|rtjdtj|j(}t |||j+d}|j,r"|j,j/||_|St1j2||_|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#lenrrr rrQrrrrrrrrrsr|r{rrrrr!r immutabledict) rmargskwargsr multi_kv_generatorr|r kv_generator coerced_args rWrzValuesBase.valuessh  q'C''%TQ''D C!9!9::c!fd3)1)B)B*..'&&+=dC+H*JJ&K:c!ftUm<&&3&0&K &dF33358 c4JK5quue|KK 6?C''D 006II <ciik4@A <<<<--k:DL  --k:DL 1LsG&rsr@)r`z/Union[_DMLColumnKeyMapping[Any], Sequence[Any]]rarrr:)rrrrIr_supports_multi_parametersrQrrRrrrerrSrprrrrTrZrWrrs%#N!&$(F !(43707)EIG AH  FJOBI)-M&-GT K  g g  g ggrZrc 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"fd Zed#dZe d$ d%dZe re!dd d&dZ"e!dd d'dZ"e!dd d(dZ"e!dd d)dZ"e!dd d*dZ"e!dd d+dZ"e!dd d,dZ"e!dd d-dZ"e!dd d.d Z"dd d.d!Z"xZ#SxZ#S)/rzRepresent an INSERT construct. The :class:`_expression.Insert` object is created using the :func:`_expression.insert()` function. rTNFrr$r4rsrSrrrrQrRrrrrc$t||yrSsuperrprmrs __class__s rWrpzInsert.__init__ rZcd|_|S)aMake 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. TrSrs rWinlinez Insert.inlines$  rZc2|jrtjd|Dcgc](}tjt j |d*c}|_d|_||_ tjt j||_ |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) rr9rrrrrrrS#include_insert_from_select_defaults DMLSelectRolerQ)rmnamesrQinclude_defaultsrrs rW from_selectzInsert.from_selectsR <<))B      U00$t D  3C0&&u':':FC   s-Br+cyrSrT)rm _Insert__ent0rs rWr/zInsert.returning4+.rZcyrSrT)rmrx _Insert__ent1rs rWr/zInsert.returning9s03rZcyrSrT)rmrxr{ _Insert__ent2rs rWr/zInsert.returningBs58rZcyrSrT)rmrxr{r} _Insert__ent3rs rWr/zInsert.returningLs:=rZcyrSrT)rmrxr{r}r _Insert__ent4rs rWr/zInsert.returningWs?BrZcyrSrT)rmrxr{r}rr _Insert__ent5rs rWr/zInsert.returningcs DGrZcyrSrT) rmrxr{r}rrr _Insert__ent6rs rWr/zInsert.returningps ILrZc yrSrT) rmrxr{r}rrrr _Insert__ent7rs rWr/zInsert.returning~s rZcyrSrTrmrr& _Insert__kws rWr/zInsert.returnings $'rZcyrSrTrs rWr/zInsert.returnings $'rZrerr:)T)rtzSequence[_DMLColumnArgument]rQrPrurrr:)rx _TCCA[_T0]rrrzReturningInsert[Tuple[_T0]])rxrr{ _TCCA[_T1]rrrz ReturningInsert[Tuple[_T0, _T1]]) rxrr{rr} _TCCA[_T2]rrrz%ReturningInsert[Tuple[_T0, _T1, _T2]]) rxrr{rr}rr _TCCA[_T3]rrrz*ReturningInsert[Tuple[_T0, _T1, _T2, _T3]])rxrr{rr}rrrr _TCCA[_T4]rrrz/ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4]])rxrr{rr}rrrrrr _TCCA[_T5]rrrz4ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]])rxrr{rr}rrrrrrrr _TCCA[_T6]rrrz9ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]])rxrr{rr}rrrrrrrrrr _TCCA[_T7]rrrz>ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]])r&rErrrrrzReturningInsert[Any])$rrrrIrrfrQrrr$rr"r7dp_clauseelement dp_booleandp_string_list dp_dml_valuesdp_dml_multi_valuesdp_clauseelement_tupledp_table_hint_listr1 _has_prefixes_traverse_internalsr$"_dialect_kwargs_traverse_internalsr%_executable_traverse_internalsr0_has_ctes_traverse_internals_traverse_internalsrprrprvrr r/ __classcell__rls@rWrrsN!% F*/'%*d*I '88 9 )44 5 />> ? )77 8 /CC D (99 : "$5$F$F G ,CC D (;; < !2!=!= >*!88 ():)E)E F "  6 6# 7$  : :% ;&  3 3' 4(  - -) .0 ( "& 4+44 4  44l IN .$ .BF . ( .  .  -2  3 3 3 &*  3 .  3  3 -2  8 8 8  8 &*  83 8  8 -2 = = =  =   =&* =8 =  = -2 B B B B  B  B&* B= B  B -2 G G G G  G  G G&* GB G  G -2 L L L L  L  L L L&* LG L  L -2              &*     $ -2 '. '&* '  ' "  '  '-2 '. '&* '  ' "  'WrZrceZdZdZy)ReturningInsertzTyping-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 NrrrrIrTrZrWrrrZrcbeZdZUded<dZded<ed dZd dZddZdd Z e dd Z y )rrrsrTzTuple[ColumnElement[Any], ...]rc|D]>}tjtj||}|xj|fz c_@|S)aReturn 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` rV)rrrWhereHavingRoler)rm whereclause criterionwhere_criterias rWwherezDMLWhereBase.wheresM,% 6I1:1A1A%%y2N  ^$5 5  6  rZc |j|S)zbA synonym for the :meth:`_dml.DMLWhereBase.where` method. .. versionadded:: 1.4 )r)rmcriterias rWfilterzDMLWhereBase.filterstzz8$$rZc|jSrS)rsrs rW_filter_by_zerozDMLWhereBase._filter_by_zeros zzrZc |j}|jDcgc]\}}t|||k(}}}|j|Scc}}w)zWapply the given filtering criterion as a WHERE clause to this select. )rrrr)rmra from_entityr{rclausess rW filter_byzDMLWhereBase.filter_bys_ **, %lln U "+s 3u <  t{{G$$  sAc@tj|jS)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(_construct_for_whereclauserrs rWrzDMLWhereBase.whereclauses !;;    rZN)rz_ColumnExpressionArgument[bool]rr:)rz roles.ExpressionElementRole[Any]rr:r)rarrr:)rrF) rrrrrrrrrrrrrTrZrWrrsH 68O388% %  rZrc $eZdZdZdZdZdejfdejfdejfdejfdejfd ejfd ejfd ejfd ejfg e jzej zej$zej(zZdfd ZeddZeddZere ddZe ddZe ddZe d dZe d!dZe d"dZe d#dZe d$dZe d%dZ d%dZxZSxZS)&rzRepresent an Update construct. The :class:`_expression.Update` object is created using the :func:`_expression.update()` function. rTrsrrSrerrrrrc$t||yrSrirks rWrpzUpdate.__init__rmrZc|jrtjd|jrtjdtj |j }|||d|_|S)aSpecify 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 presentr[T)rr9r#rerQrr)rmr`rcs rWordered_valueszUpdate.ordered_valuessp, <<##;  ! !##C  006II +D$= rZcd|_|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. Trors rWrpz Update.inline@s   rZcyrSrT)rm _Update__ent0s rWr/zUpdate.returningYryrZcyrSrT)rmr _Update__ent1s rWr/zUpdate.returning^03rZcyrSrT)rmrr _Update__ent2s rWr/zUpdate.returningc58rZcyrSrT)rmrrr _Update__ent3s rWr/zUpdate.returningh:=rZcyrSrT)rmrrrr _Update__ent4s rWr/zUpdate.returningq?BrZcyrSrT)rmrrrrr _Update__ent5s rWr/zUpdate.returning{ DGrZcyrSrT)rmrrrrrr _Update__ent6s rWr/zUpdate.returning ILrZc yrSrT) rmrrrrrrr _Update__ent7s rWr/zUpdate.returning rZcyrSrTrmr& _Update__kws rWr/zUpdate.returning$'rZcyrSrTrs rWr/zUpdate.returning#&rZre)r`zTuple[_DMLColumnArgument, Any]rr:r)rrrzReturningUpdate[Tuple[_T0]])rrrrrz ReturningUpdate[Tuple[_T0, _T1]])rrrrrrrz%ReturningUpdate[Tuple[_T0, _T1, _T2]]) rrrrrrrrrz*ReturningUpdate[Tuple[_T0, _T1, _T2, _T3]]) rrrrrrrrrrrz/ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4]])rrrrrrrrrrrrrz4ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]])rrrrrrrrrrrrrrrz9ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]])rrrrrrrrrrrrrrrrrz>ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]])r&rErrrzReturningUpdate[Any])rrrrIr is_updater7rrrdp_dml_ordered_valuesrrr1rr$rr%rr0rrrprrrprr r/rrs@rWrrsNI'88 9  1 H H I )44 5  1 G G H )77 8 ,CC D (;; < !2!=!= >*!88    6 6 7  : : ;  3 3! 4"  - -# .*   D$  .$ . ( .  .  3$ 3.8 3 - 3  3  8$ 8.8 8BL 8 2 8  8  = = =  =   = 8  =  =  B B B  B   B   B= B  B  G G G  G   G   G GB G  G  L L L L  L  L L LG L  L                  '4 '>A ' ! '  ' '4 '>A ' ! 'krZrceZdZdZy)ReturningUpdatezTyping-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 NrrTrZrWrrrrZrcleZdZdZdZdZdejfdejfdejfdejfge jze jzejzej"zZddZere dd Ze dd Ze dd Ze dd Ze dd Ze ddZe ddZe ddZe ddZ ddZyy)rzRepresent a DELETE construct. The :class:`_expression.Delete` object is created using the :func:`_expression.delete()` function. rTrsrrrcZtjtj|||_yrUrXrYs rWrpzDelete.__init__rZrZcyrSrT)rm _Delete__ent0s rWr/zDelete.returningryrZcyrSrT)rmr _Delete__ent1s rWr/zDelete.returningrrZcyrSrT)rmrr _Delete__ent2s rWr/zDelete.returningrrZcyrSrT)rmrrr _Delete__ent3s rWr/zDelete.returningrrZcyrSrT)rmrrrr _Delete__ent4s rWr/zDelete.returningrrZcyrSrT)rmrrrrr _Delete__ent5s rWr/zDelete.returningrrZcyrSrT)rmrrrrrr _Delete__ent6s rWr/zDelete.returning rrZc yrSrT) rmrrrrrrr _Delete__ent7s rWr/zDelete.returningrrZcyrSrTrmr& _Delete__kws rWr/zDelete.returning'rrZcyrSrTrs rWr/zDelete.returning,rrZNre)rrrzReturningDelete[Tuple[_T0]])rrrrrz ReturningDelete[Tuple[_T0, _T1]])rrrrrrrz%ReturningDelete[Tuple[_T0, _T1, _T2]]) rrrrrrrrrz*ReturningDelete[Tuple[_T0, _T1, _T2, _T3]]) rrrrrrrrrrrz/ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4]])rrrrrrrrrrrrrz4ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]])rrrrrrrrrrrrrrrz9ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]])rrrrrrrrrrrrrrrrrz>ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]])r&rErrrzReturningDelete[Any])rrrrIr is_deleter7rrrr1rr$rr%rr0rrrprr r/rTrZrWrrsMNI'88 9  1 H H I ,CC D (;; <   6 6  7  : : ;  3 3 4  - - .   .$ . ( .  .  3$ 3.8 3 - 3  3  8$ 8.8 8BL 8 2 8  8  = = =  =   = 8  =  =  B B B  B   B   B= B  B  G G G  G   G   G GB G  G  L L L L  L  L L LG L  L                  '4 '>A ' ! '  ' '4 '>A ' ! 'krZrceZdZdZy)ReturningDeletezTyping-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 NrrTrZrWrr1rrZr)rVrQrzTypeGuard[UpdateDMLState])rVrQrzTypeGuard[DeleteDMLState])rVrQrzTypeGuard[InsertDMLState])urI __future__rcollections.abcabcroperatortypingrrrrrr r r r r rrrrrrrrrr_typingrrrrbaserrrrr r!r"r#r$r%r&r'elementsr(r)r*r+r,r<r-r.r/r0r1r2r3r4r5sqltypesr6visitorsr7r9 util.typingr:r;r<r=r>r?r@rArBrCrDrErFrGrHrI_TCCArJrnrKrLrMrNrOrPrXr\r^ attrgetterr_rH_DMLColumnElementrrQ plugin_forrrrDMLRolerhrrrrrrrrrTrZrWr s #)! #&)'$#"!'#"#-"#(#('#2/+-*<.%,1+"&AAA#x"":.H"x"":.H"x"":.H T#|C001eT12R |R jH-C@XC@.C@LH-%X%.%PH-  X  .  T  MM T nSSll'Zl'^ f.s3 I I Xq'\:q'h f.s3 u'\:u'p f.s3 rZ