1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
U
¸ý°dã @s8dZddlmZddlmZddlZddlmZddlm    Z    ddlm
Z
ddlm Z ddlm Z dd    lm Z dd
lmZdd lmZdd lmZdd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddl!m"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+l3m4Z4dd,l3m5Z5dd-l3m6Z6dd.l3m7Z7dd/l3m8Z8dd0l3m9Z9dd1l3m:Z:dd2l3m;Z;dd3l3m<Z<dd4l=m>Z>dd5l?m@Z@d6d7lmAZAd6dlmZd6d8lBmCZCd6d9lBmDZDerÔdd:lmEZEdd;lmFZFdd<lmGZGdd=lmHZHdd>lmIZIdd?lmJZJdd@lmKZKddAlmLZLddBlmMZMddClmNZNddDlmOZOddElmPZPddFlmQZQddGlmRZSddHl!mTZTddIlUmVZVddJl-mWZWddKl3mXZXddLl3mYZYddMl3mZZZddNl3m[Z[dOdPdQœdRdS„Z\dOdTdQœdUdV„Z]dOdWdQœdXdY„Z^ne _dS¡Z\e _dV¡Z]e _dY¡Z^edZed[Z`eeae0efZbee;e4e9fZcGd\dO„dOe(ƒZde( ed]d^¡Gd_d`„d`edƒƒZfe( ed]da¡Gdbdc„dcedƒƒZge( ed]dd¡Gdedf„dfedƒƒZhGdgdh„dhejie7e,e)e8e+e5e/ƒ
ZjGdidj„djejƒZkGdkdl„dlekƒZlGdmdn„dnele<eƒZmGdodp„dpƒZnGdqdr„drenekƒZoGdsdt„dteoe<eƒZpGdudv„dvenejƒZqGdwdx„dxeoe<eƒZrdS)yzd
Provide :class:`_expression.Insert`, :class:`_expression.Update` and
:class:`_expression.Delete`.
 
é)Ú annotationsN)ÚAny)Úcast)ÚDict)ÚIterable)ÚList)ÚMutableMapping)ÚNoReturn)ÚOptional)Úoverload)ÚSequence)Ú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)Ú 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)Ú
SelectableÚDMLStatezTypeGuard[UpdateDMLState])ÚdmlÚreturncCsdS©N©©rQrTrTúId:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\sqlalchemy/sql/dml.pyÚisupdate^srWzTypeGuard[DeleteDMLState]cCsdSrSrTrUrTrTrVÚisdeleteasrXzTypeGuard[InsertDMLState]cCsdSrSrTrUrTrTrVÚisinsertdsrYÚ_T)Úboundc@sBeZdZUdZdZded<dZded<dZded<dZd    ed
<d ed <dZ    d Z
d Z d Z ded<ddddœdd„Z edddœdd„ƒZedddœdd„ƒZeddœdd„ƒZerÂed d!dœd"d#„ƒZedd$d%d&œd'd(„ƒZedd)d*d+d,œd-d.„ƒZd/d0dœd1d2„Zd3d4dœd5d6„Zd3d4dœd7d8„Zd3d9dœd:d;„Zd9dœd<d=„ZdS)>rPTNz0Optional[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Ú    statementrJr©rcÚcompilerÚkwcKs
tƒ‚dSrS©ÚNotImplementedError)ÚselfrcrerfrTrTrVÚ__init__„szDMLState.__init__úDict[str, Any]©rcrRcCst|jƒr|jjnd|jdœS)N)ÚnameÚtable)rrnrm©ÚclsrcrTrTrVÚget_entity_description‰s
ÿ
üzDMLState.get_entity_descriptionúList[Dict[str, Any]]cCsdd„|jDƒS)NcSsg|]}|j|j|dœ‘qS))rmÚtypeÚexpr)Úkeyrs©Ú.0ÚcrTrTrVÚ
<listcomp>–s
üýz>DMLState.get_returning_column_descriptions.<locals>.<listcomp>)Ú_all_selected_columnsrorTrTrVÚ!get_returning_column_descriptions’súz*DMLState.get_returning_column_descriptionsÚ_DMLTableElement©rRcCs|jjSrS)rcrn©rirTrTrVÚ    dml_tableŸszDMLState.dml_tabler#zType[DMLState]cCsdSrSrTrorTrTrVÚget_plugin_class¥szDMLState.get_plugin_classz'Iterable[Dict[_DMLColumnArgument, Any]]z"List[Dict[_DMLColumnElement, Any]])rcÚmulti_kv_iteratorrRcCsdd„|DƒS)NcSsg|]}dd„| ¡Dƒ‘qS)cSs i|]\}}t tj|¡|“qSrT©rÚexpectrÚ DMLColumnRole©rwÚkÚvrTrTrVÚ
<dictcomp>°sÿ z@DMLState._get_multi_crud_kv_pairs.<locals>.<listcomp>.<dictcomp>)Úitems)rwÚmappingrTrTrVry¯süþz5DMLState._get_multi_crud_kv_pairs.<locals>.<listcomp>rT)rprcrrTrTrVÚ_get_multi_crud_kv_pairs©sûz!DMLState._get_multi_crud_kv_pairsz(Iterable[Tuple[_DMLColumnArgument, Any]]Úboolz#List[Tuple[_DMLColumnElement, Any]])rcÚ kv_iteratorÚneeds_to_be_cacheablerRcs‡fdd„|DƒS)Nc    s<g|]4\}}t tj|¡ˆs |ntjtj|tƒddf‘qS)T)Útype_Zis_crud)rrƒrr„ZExpressionElementRoler5r…©rŽrTrVry¾s ö ÿüüz/DMLState._get_crud_kv_pairs.<locals>.<listcomp>rT)rprcrrŽrTrrVÚ_get_crud_kv_pairs·s
ôzDMLState._get_crud_kv_pairsÚ DMLWhereBasez#Tuple[FromClause, List[FromClause]]cCsxg}tt |j¡ƒ}|d}|h}|jD]4}t|ƒD]&}| |j¡sN| |¡|     |j¡q4q(| 
|dd…¡||fS)Nrr) ÚlistÚsql_utilZtables_from_leftmostrnÚ_where_criteriarÚ intersectionZ _cloned_setÚappendÚupdateÚextend)rircZfromsZ
all_tablesZ primary_tableÚseenÚcritÚitemrTrTrVÚ_make_extra_fromsÍs
 
zDMLState._make_extra_fromsÚ
ValuesBaseÚNonecCs|jr|j|_d|_dS©NF)Ú_no_parametersÚ_valuesr\©rircrTrTrVÚ_process_valuesßszDMLState._process_valuescCsB|jdk    st‚dd„|jDƒ}|jr2d|_||_n ds>tdƒ‚dS)NcSsi|] }|tƒ“qSrTr*©rwrmrTrTrVrˆæsz3DMLState._process_select_values.<locals>.<dictcomp>Fz%This statement already has parameters)Ú _select_namesÚAssertionErrorr¡r\©rircÚ
parametersrTrTrVÚ_process_select_valuesäsÿzDMLState._process_select_valuesr    cCst d|j ¡¡‚dS)Nz6%s construct does not support multiple parameter sets.)r8ÚInvalidRequestErrorÚ__visit_name__Úupperr£rTrTrVÚ_no_multi_values_supportedòs
ÿÿz#DMLState._no_multi_values_supportedcCst d¡‚dS)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.)r8r«r~rTrTrVÚ_cant_mix_formats_errorøsÿz DMLState._cant_mix_formats_error)Ú__name__Ú
__module__Ú __qualname__r¡r\Ú__annotations__r]r_r`Ú_supports_implicit_returningrWrXrYrjÚ classmethodrqr{Úpropertyrrr€r‹r‘rr¤rªr®r¯rTrTrTrVrPss>
 þ
    ÚdefaultÚinsertc@sbeZdZdZdZdZddddddœdd    „Zejd
d œd d „ƒZ    dddœdd„Z
dddœdd„Z dS)ÚInsertDMLStateTFÚInsertrJrŒr)rcreÚdisable_implicit_returningrfcKsV||_|j|_|rd|_d|_|jr.| |¡|jdk    rB| |¡|j    rR| 
|¡dS)NFT) rcrnrar´rYr¦rªr¢r¤Ú _multi_valuesÚ_process_multi_values)rircrer»rfrTrTrVrj    s
 
 
zInsertDMLState.__init__z    List[str]r}cCsdd„|jpdDƒS)NcSsg|]}tjtj|dd‘qS©T)Zas_keyr‚©rwÚcolrTrTrVry!sÿz3InsertDMLState._insert_col_keys.<locals>.<listcomp>rT)r\r~rTrTrVÚ_insert_col_keyssþzInsertDMLState._insert_col_keysržrŸrlcCs.|jrd|_|j|_d|_n|jr*| ¡dSr )r¡Ú_has_multi_parametersr¢r\r¯r£rTrTrVr¤&s zInsertDMLState._process_valuescsnˆjD]b}‡fdd„|Dƒ}|jrBd|_d|_||_|jd|_q|jsR| ¡q|js\t‚|j |¡qdS)Ncs4g|],}t|tjƒr,dd„tˆjj|ƒDƒn|‘qS)cSsi|]\}}|j|“qSrT©ru©rwrxÚvaluerTrTrVrˆ1sÿzCInsertDMLState._process_multi_values.<locals>.<listcomp>.<dictcomp>)Ú
isinstanceÚcollections_abcr Úziprnrx)rwZ parameter_set©rcrTrVry0s þ
ü þz8InsertDMLState._process_multi_values.<locals>.<listcomp>FTr)r¼r¡rÂr]r\r¯r§r™)rircr©Zmulti_parametersrTrÉrVr½.s
 
ù
 
 
z$InsertDMLState._process_multi_valuesN)F) r°r±r²rYÚinclude_table_with_column_exprsrÂrjrZmemoized_propertyrÁr¤r½rTrTrTrVr¹sür¹r˜c@s6eZdZdZdZddddœdd„Zd    d
d œd d „ZdS)ÚUpdateDMLStateTFÚUpdaterJrrdcKs€||_d|_|jdk    r"| |¡n&|jdk    r8| |¡n|jrH| |¡| |¡\}}||_    ||_
||_ }t |ov|j ƒ|_dS©NT)rcrWr_Ú_process_ordered_valuesr¢r¤r¼r®rraÚ _extra_fromsÚ is_multitablerŒZ'render_table_with_column_in_update_fromrÊ)rircrerfÚtÚefÚmtrTrTrVrjLs
 
 
 
ÿzUpdateDMLState.__init__ržrŸrlcCsN|j}|jr@d|_|dk    st‚t|ƒ|_||_dd„|Dƒ|_n
t d¡‚dS)NFcSsg|] \}}|‘qSrTrT©rwrurÅrTrTrVrygsz:UpdateDMLState._process_ordered_values.<locals>.<listcomp>zQCan only invoke ordered_values() once, and not mixed with any other values() call)r_r¡r§Údictr\r`r8r«r¨rTrTrVrÎ_s 
ÿz&UpdateDMLState._process_ordered_valuesN)r°r±r²rWrÊrjrÎrTrTrTrVrËFsrËÚdeletec@s"eZdZdZddddœdd„ZdS)    ÚDeleteDMLStateTÚDeleterJrrdcKs0||_d|_| |¡\}}||_||_||_dSrÍ)rcrXrrarÏrÐ)rircrerfrÑrÒrTrTrVrjss zDeleteDMLState.__init__N)r°r±r²rXrjrTrTrTrVr×osr×c@sXeZdZUdZdZejZded<dZ    e
j Z ded<ded    <dZ d
Zd ed <d
Zd ed <dZded<dZdddœdd„Zddddœdd„Zedddœdd„ƒZed
dd œd!d"d#dd$œd%d&„ƒZedd'œd(d#ddd)œd*d+„ƒZdDd,d#d-d.œd/d0„Zejd1d2œd3d4„ƒZejd5d2œd6d7„ƒZedEd9d:d9dd;œd<d=„ƒZed>d2œd?d@„ƒZedAd2œdBdC„ƒZd
S)FrbzDForm the base for ``INSERT``, ``UPDATE``, and ``DELETE`` statements.Z update_basez5util.immutabledict[Tuple[_DMLTableElement, str], str]Ú_hintsFr2Ú _label_styler|rnNz+Optional[Tuple[_ColumnsClauseElement, ...]]Ú_return_defaults_columnsÚ_supplemental_returningrTz!Tuple[_ColumnsClauseElement, ...]Ú
_returningTr.rŸ)Ú
fromclauserRcs ˆj ‡fdd„|jDƒ¡dS)Nc3s |]}t|ƒr| ˆ¡VqdSrS)rZ _make_proxyr¿©rÞrTrVÚ    <genexpr>¡sþzAUpdateBase._generate_fromclause_column_proxies.<locals>.<genexpr>)Z_columnsZ_populate_separate_keysrz)rirÞrTrßrVÚ#_generate_fromclause_column_proxiesžsþz.UpdateBase._generate_fromclause_column_proxiesrr    )ÚargrfrRcOs tdƒ‚dS)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).Nrg)rirârfrTrTrVÚparams§sÿzUpdateBase.paramsr9)ÚoptrRcKs| |¡|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.
 
 
        )Z_validate_dialect_kwargs)rirärTrTrVÚwith_dialect_optionsµs
zUpdateBase.with_dialect_options)Úsupplemental_colsÚsort_by_parameter_orderr=z&Optional[Iterable[_DMLColumnArgument]]rŒ)ÚcolsrærçrRcGs¼|jr<|jr4|r4tt |j¡ dd„|Dƒ¡ƒ|_qPd|_ntdd„|Dƒƒ|_d|_|rp|jsjt d¡‚d|_    |r¸dd„|Dƒ}|j
dkržtt  |¡ƒ|_
ntt  |j
t|ƒ¡ƒ|_
|S)    a $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. 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`
 
        css|]}t tj|¡VqdSrS©rrƒrZColumnsClauseRolervrTrTrVràsÿz-UpdateBase.return_defaults.<locals>.<genexpr>rTcss|]}t tj|¡VqdSrSrérvrTrTrVràŠsTz]The 'sort_by_parameter_order' argument to return_defaults() only applies to INSERT statementscss|]}t tj|¡VqdSrSrérvrTrTrVrà˜sÿN) Ú_return_defaultsrÛÚtuplerZ
OrderedSetÚunionÚ    is_insertr8Ú ArgumentErrorÚ_sort_by_parameter_orderrÜZ unique_list)rirærçrèZsupplemental_col_tuprTrTrVÚreturn_defaultsÅsF7
þÿÿ
ÿþ
ÿÿÿÿzUpdateBase.return_defaults©rçú_ColumnsClauseArgument[Any])rèrçÚ_UpdateBase__kwrRcOsX|rtd|ƒ‚|jrt d¡‚|jtdd„|Dƒƒ7_|rT|jsNt d¡‚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 statementcss|]}t tj|¡VqdSrSrérvrTrTrVràsz'UpdateBase.returning.<locals>.<genexpr>zWThe 'sort_by_parameter_order' argument to returning() only applies to INSERT statementsT)    rrêr8r«rÝrërírîrï)rirçrèrórTrTrVÚ    returning«s _
ÿÿ ÿzUpdateBase.returningzKeyedColumnElement[Any]úOptional[ColumnElement[Any]])ÚcolumnÚrequire_embeddedrRcCs|jj||dS)N)r÷)Úexported_columnsÚcorresponding_column)rirör÷rTrTrVrùsÿzUpdateBase.corresponding_columnrMr}cCsdd„t|jƒDƒS)NcSsg|]}|‘qSrTrTrvrTrTrVry%sz4UpdateBase._all_selected_columns.<locals>.<listcomp>)rrÝr~rTrTrVrz#sz UpdateBase._all_selected_columnsz;ReadOnlyColumnCollection[Optional[str], ColumnElement[Any]]cCstdd„|jDƒƒ ¡S)zxReturn the RETURNING columns as a column collection for this
        statement.
 
        .. versionadded:: 1.4
 
        css |]}t|ƒr|j|fVqdSrS)rrurvrTrTrVrà1sþz.UpdateBase.exported_columns.<locals>.<genexpr>)r rzZ as_readonlyr~rTrTrVrø's
þzUpdateBase.exported_columnsÚ*ÚstrzOptional[_DMLTableArgument])ÚtextÚ
selectableÚ dialect_namerRcCs8|dkr|j}nt tj|¡}|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.
        N)rnrrƒrÚ DMLTableRolerÙrì)rirürýrþrTrTrVÚ    with_hint7s
$zUpdateBase.with_hintrkcCst |¡j}||ƒ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
 
        )rPr€rq©riÚmethrTrTrVÚentity_descriptionbs! zUpdateBase.entity_descriptionrrcCst |¡j}||ƒ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
 
        )rPr€r{rrTrTrVÚreturning_column_descriptions†s*ÿz(UpdateBase.returning_column_descriptions)F)Nrú) r°r±r²Ú__doc__r¬rÚ
EMPTY_DICTrÙr³Znamed_with_columnr2ZLABEL_STYLE_DISAMBIGUATE_ONLYrÚrêrÛrÜrÝZis_dmlrárãrrårðrôrùZro_memoized_propertyrzrørr¶rrrTrTrTrVrb}sP
 
þ
ÿ
þ
      üfýqÿü*#rbc@s¦eZdZUdZdZdZdZded<dZded<dZ    d    ed
<d Z
d ed <dZ ded<dZ ded<dZ ded<ddœdd„Zeedddddœdddddœd d!„ƒƒZdS)"ržzTSupplies support for :meth:`.ValuesBase.values` to
    INSERT and UPDATE constructs.Z values_baseFNzOptional[Select[Any]]ÚselectzOptional[ClauseElement]Ú_post_values_clausez4Optional[util.immutabledict[_DMLColumnElement, Any]]r¢rTzRTuple[Union[Sequence[Dict[_DMLColumnElement, Any]], Sequence[Sequence[Any]]], ...]r¼r^r_zOptional[List[str]]r¦rŒÚ_inliner?©rncCstjtj||d|_dS©N)Zapply_propagate_attrs©rrƒrrÿrn©rirnrTrTrVrjÓs
ÿzValuesBase.__init__z,This construct already inserts from a SELECTú1This statement already has ordered values present)r¦r_)Zmsgsz/Union[_DMLColumnKeyMapping[Any], Sequence[Any]]rr9)ÚargsÚkwargsrRcOs.|rÎ|d}|rt d¡‚qæt|ƒdkr4t d¡‚qæt|tjƒræ|rxt|dtƒrxt |¡j    }|j
|||ƒf7_
|S|r¢t|dt t fƒr¢|j
|f7_
|St r´t|tƒs´t‚dd„t|jj|ƒDƒ}ntd|ƒ}|ræt d¡‚t |¡j}t||| ¡dƒƒ}|jr|j |¡|_n t |¡|_|S)    aLSpecify 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::
 
                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.cSsi|]\}}|j|“qSrTrÃrÄrTrTrVrˆnsz%ValuesBase.values.<locals>.<dictcomp>zDict[_DMLColumnArgument, Any]T)r8rîÚlenrÆrÇr rÕrPr€r‹r¼r“rërrºr§rÈrnrxrr‘r‰r¢rìrZ immutabledict)rirrrâZmulti_kv_generatorÚ kv_generatorZ coerced_argrTrTrVÚvaluesØsDpÿ ÿ ÿ
ÿ  zValuesBase.values)r°r±r²rr¬Ú_supports_multi_parametersrr³rr¢r¼r_r¦r    rjrrrrTrTrTrVrž¶s*
   ú
   þý    ržc sNeZdZUdZdZdZdZdZdZde    d<dZ
de    d    <d    e j fd
e j fd e jfd e jfd e jfde j fde j fde jfde jfde j fde jfde j fg ejejejejZddœ‡fdd„ Zeddœdd„ƒZedIdddddœdd „ƒZe rFe!dd!œd"dd#d$œd%d&„ƒZ"e!dd!œd"d'dd(d)œd*d&„ƒZ"e!dd!œd"d'd+dd,d-œd.d&„ƒZ"e!dd!œd"d'd+d/dd0d1œd2d&„ƒZ"e!dd!œd"d'd+d/d3dd4d5œd6d&„ƒZ"e!dd!œd"d'd+d/d3d7dd8d9œd:d&„ƒZ"e!dd!œd"d'd+d/d3d7d;dd<d=œ    d>d&„ƒZ"e!dd!œd"d'd+d/d3d7d;d?dd@dAœ
dBd&„ƒZ"e!dd!œdCddDdEdFœdGd&„ƒZ"dd!œdCddDdEdFœdHd&„Z"‡Z#S)JrºzRepresent an INSERT construct.
 
    The :class:`_expression.Insert` object is created using the
    :func:`_expression.insert()` function.
 
    r¸TNFrŒrïr3rnr    r¦r¢r¼rrrÝrÙrêrÛr?r
cstƒ |¡dSrS©Úsuperrjr ©Ú    __class__rTrVrj¶szInsert.__init__r9r}cCs
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©r    r~rTrTrVÚinline¹sz Insert.inlinezSequence[_DMLColumnArgument]rO)ÚnamesrÚinclude_defaultsrRcCs@|jrt d¡‚dd„|Dƒ|_d|_||_t tj    |¡|_
|S)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 expressionscSsg|]}tjtj|dd‘qSr¾r‚r¥rTrTrVryüsÿz&Insert.from_select.<locals>.<listcomp>T) r¢r8r«r¦r    Ú#include_insert_from_select_defaultsrrƒrZ DMLSelectRoler)rirrrrTrTrVÚ from_selectÎs)ÿþzInsert.from_selectrñú
_TCCA[_T0]zReturningInsert[Tuple[_T0]])Ú _Insert__ent0rçrRcCsdSrSrT)rir rçrTrTrVrô szInsert.returningú
_TCCA[_T1]z ReturningInsert[Tuple[_T0, _T1]])r Ú _Insert__ent1rçrRcCsdSrSrT)rir r"rçrTrTrVrôsú
_TCCA[_T2]z%ReturningInsert[Tuple[_T0, _T1, _T2]])r r"Ú _Insert__ent2rçrRcCsdSrSrT)rir r"r$rçrTrTrVrôs    ú
_TCCA[_T3]z*ReturningInsert[Tuple[_T0, _T1, _T2, _T3]])r r"r$Ú _Insert__ent3rçrRcCsdSrSrT)rir r"r$r&rçrTrTrVrô's
ú
_TCCA[_T4]z/ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4]])r r"r$r&Ú _Insert__ent4rçrRcCsdSrSrT)rir r"r$r&r(rçrTrTrVrô3s ú
_TCCA[_T5]z4ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]])r r"r$r&r(Ú _Insert__ent5rçrRcCsdSrSrT)rir r"r$r&r(r*rçrTrTrVrô@s ú
_TCCA[_T6]z9ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]])    r r"r$r&r(r*Ú _Insert__ent6rçrRc    CsdSrSrT)    rir r"r$r&r(r*r,rçrTrTrVrôNs ú
_TCCA[_T7]z>ReturningInsert[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]])
r r"r$r&r(r*r,Ú _Insert__ent7rçrRc    
CsdSrSrT)
rir r"r$r&r(r*r,r.rçrTrTrVrô]sròrzReturningInsert[Any])rèrçÚ _Insert__kwrRcOsdSrSrT©rirçrèr/rTrTrVrôoscOsdSrSrTr0rTrTrVrôxs)T)$r°r±r²rr¬rrrrïr³rír6Údp_clauseelementÚ
dp_booleanZdp_string_listÚ dp_dml_valuesZdp_dml_multi_valuesÚdp_clauseelement_tupleÚdp_table_hint_listr0Ú _has_prefixes_traverse_internalsr"Ú"_dialect_kwargs_traverse_internalsr#Ú_executable_traverse_internalsr/Ú_has_ctes_traverse_internalsÚ_traverse_internalsrjrrrrr rôÚ __classcell__rTrTrrVrº‰sˆ
 þñïîíìÿü6ÿû    ú
ù     ø  
÷"  ö$ õ&ý ýrºc@seZdZdZdS)ÚReturningInsertzê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²rrTrTrTrVr<sr<c@sveZdZUded<dZded<edddœd    d
„ƒZd dd œd d„Zddœdd„Zdddœdd„Z    e
ddœdd„ƒZ dS)r’r|rnrTzTuple[ColumnElement[Any], ...]r•z_ColumnExpressionArgument[bool]r9)Ú whereclauserRcGs,|D]"}t tj|¡}|j|f7_q|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`
 
        )rrƒrZWhereHavingRoler•)rir>Z    criterionZwhere_criteriarTrTrVÚwhere‘sÿzDMLWhereBase.wherez roles.ExpressionElementRole[Any])ÚcriteriarRcGs
|j|ŽS)zbA synonym for the :meth:`_dml.DMLWhereBase.where` method.
 
        .. versionadded:: 1.4
 
        )r?)rir@rTrTrVÚfilter®szDMLWhereBase.filterr}cCs|jSrSr
r~rTrTrVÚ_filter_by_zero·szDMLWhereBase._filter_by_zeror)rrRc s(| ¡‰‡fdd„| ¡Dƒ}|j|ŽS)zWapply the given filtering criterion as a WHERE clause
        to this select.
 
        csg|]\}}tˆ|ƒ|k‘qSrTrrÔ©Z from_entityrTrVryÁsÿz*DMLWhereBase.filter_by.<locals>.<listcomp>)rBr‰rA)rirZclausesrTrCrVÚ    filter_byºs
 
þzDMLWhereBase.filter_byrõcCs t |j¡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&Z_construct_for_whereclauser•r~rTrTrVr>Çs ÿzDMLWhereBase.whereclauseN) r°r±r²r³r•rr?rArBrDr¶r>rTrTrTrVr’s
      r’c s¾eZdZdZdZdZdejfdejfdej    fdej
fdej fd    ejfd
ej fd ej    fd ejfg    e jejejejZd dœ‡fdd„ Zedddœdd„ƒZeddœdd„ƒZer¶edddœdd„ƒZedddd œd!d„ƒZeddd"d#d$œd%d„ƒZeddd"d&d'd(œd)d„ƒZeddd"d&d*d+d,œd-d„ƒZeddd"d&d*d.d/d0œd1d„ƒZeddd"d&d*d.d2d3d4œd5d„ƒZeddd"d&d*d.d2d6d7d8œ    d9d„ƒZed:d;d<d=œd>d„ƒZd:d;d<d=œd?d„Z‡ZS)@rÌzRepresent an Update construct.
 
    The :class:`_expression.Update` object is created using the
    :func:`_expression.update()` function.
 
    r˜Trnr•r    r_r¢rÝrÙrêrÛr?r
cstƒ |¡dSrSrr rrTrVrjúszUpdate.__init__zTuple[_DMLColumnArgument, Any]r9)rrRcGs@|jrt d¡‚n|jr"t d¡‚t |¡j}|||dƒ|_|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 presentrT)r¢r8rîr_rPr€r‘)rirrrTrTrVÚordered_valuesýsÿÿ zUpdate.ordered_valuesr}cCs
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.
 
        Trr~rTrTrVr"sz Update.inlinerzReturningUpdate[Tuple[_T0]])Ú _Update__ent0rRcCsdSrSrT)rirFrTrTrVrô;szUpdate.returningr!z ReturningUpdate[Tuple[_T0, _T1]])rFÚ _Update__ent1rRcCsdSrSrT)rirFrGrTrTrVrô?sr#z%ReturningUpdate[Tuple[_T0, _T1, _T2]])rFrGÚ _Update__ent2rRcCsdSrSrT)rirFrGrHrTrTrVrôEsr%z*ReturningUpdate[Tuple[_T0, _T1, _T2, _T3]])rFrGrHÚ _Update__ent3rRcCsdSrSrT)rirFrGrHrIrTrTrVrôKsr'z/ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4]])rFrGrHrIÚ _Update__ent4rRcCsdSrSrT)rirFrGrHrIrJrTrTrVrôUs    r)z4ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]])rFrGrHrIrJÚ _Update__ent5rRcCsdSrSrT)rirFrGrHrIrJrKrTrTrVrô`s
r+z9ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]])rFrGrHrIrJrKÚ _Update__ent6rRcCsdSrSrT)rirFrGrHrIrJrKrLrTrTrVrôls r-z>ReturningUpdate[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]])    rFrGrHrIrJrKrLÚ _Update__ent7rRc        CsdSrSrT)    rirFrGrHrIrJrKrLrMrTrTrVrôys ròrzReturningUpdate[Any])rèÚ _Update__kwrRcOsdSrSrT©rirèrNrTrTrVrô‰scOsdSrSrTrOrTrTrVrôs)r°r±r²rr¬Z    is_updater6r1r4r2Zdp_dml_ordered_valuesr3r5r0r6r"r7r#r8r/r9r:rjrrErrr rôr;rTrTrrVrÌÙsbþ÷òñðïÿ$    
   rÌc@seZdZdZdS)ÚReturningUpdatezê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=rTrTrTrVrP•srPc @sheZdZdZdZdZdejfdejfdejfdej    fge
j e j ejejZdd    œd
d „Zerded d dœdd„ƒZed dddœdd„ƒZed ddddœdd„ƒZed dddddœdd„ƒZed ddddddœd d„ƒZed ddddd!d"d#œd$d„ƒZed ddddd!d%d&d'œd(d„ƒZed ddddd!d%d)d*d+œ    d,d„ƒZed-d.d/d0œd1d„ƒZd-d.d/d0œd2d„Zd3S)4rØzRepresent a DELETE construct.
 
    The :class:`_expression.Delete` object is created using the
    :func:`_expression.delete()` function.
 
    rÖTrnr•rÝrÙr?r
cCstjtj||d|_dSr r r rTrTrVrjºs
ÿzDelete.__init__rzReturningDelete[Tuple[_T0]])Ú _Delete__ent0rRcCsdSrSrT)rirQrTrTrVrôÆszDelete.returningr!z ReturningDelete[Tuple[_T0, _T1]])rQÚ _Delete__ent1rRcCsdSrSrT)rirQrRrTrTrVrôÊsr#z%ReturningDelete[Tuple[_T0, _T1, _T2]])rQrRÚ _Delete__ent2rRcCsdSrSrT)rirQrRrSrTrTrVrôÐsr%z*ReturningDelete[Tuple[_T0, _T1, _T2, _T3]])rQrRrSÚ _Delete__ent3rRcCsdSrSrT)rirQrRrSrTrTrTrVrôÖsr'z/ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4]])rQrRrSrTÚ _Delete__ent4rRcCsdSrSrT)rirQrRrSrTrUrTrTrVrôàs    r)z4ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]])rQrRrSrTrUÚ _Delete__ent5rRcCsdSrSrT)rirQrRrSrTrUrVrTrTrVrôës
r+z9ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]])rQrRrSrTrUrVÚ _Delete__ent6rRcCsdSrSrT)rirQrRrSrTrUrVrWrTrTrVrô÷s r-z>ReturningDelete[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]])    rQrRrSrTrUrVrWÚ _Delete__ent7rRc        CsdSrSrT)    rirQrRrSrTrUrVrWrXrTrTrVrôs ròrzReturningDelete[Any])rèÚ _Delete__kwrRcOsdSrSrT©rirèrYrTrTrVrôscOsdSrSrTrZrTrTrVrôsN)r°r±r²rr¬Z    is_deleter6r1r4r5r0r6r"r7r#r8r/r9r:rjrr rôrTrTrTrVrØ¡sLüúùø    ÷ÿ     
   rØc@seZdZdZdS)ÚReturningDeletezê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=rTrTrTrVr[ sr[)srÚ
__future__rÚcollections.abcÚabcrÇÚoperatorÚtypingrrrrrrr    r
r r r rrrrÚrrrr”Ú_typingrrrrÚbaserrrrrr r!r"r#r$r%Úelementsr&r'r(r)r+rýr,r-r.r/r0r1r2r3r4Zsqltypesr5Zvisitorsr6r8Z util.typingr9r:r;r<r=r>r?r@rArBrCrDrErFrGrHZ_TCCArIrerJrKrLrMrNrOrWrXrYÚ
attrgetterrZrûZ_DMLColumnElementr|rPZ
plugin_forr¹rËr×ZDMLRolerbržrºr<r’rÌrPrØr[rTrTrTrVÚ<module>sð                                                                            
 
 
 
D
(
 
ø=Ty L=