zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
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
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
U
¸ý°dT¨ã@s
dZddlmZddlmZddlmZddlZddlZddl    Z    ddl
Z
ddl
m Z ddl
m Z ddl
m Z dd    l
mZdd
l
mZdd l
mZdd l
mZdd l
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl
mZddl 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.m0Z0dd(l.m1Z1dd)l.m2Z2dd*l.m3Z3dd+l.m4Z4dd,l.m5Z5dd-l.m6Z6dd.l.m7Z7dd/l.m8Z8dd0l9m:Z:dd1l9m;Z;dd2l!m<Z<dd3l"m=Z=dd4l$m>Z>dd5l?m@Z@dd6l?mAZAdd7l?mBZBdd8l?mCZCdd9l?mDZDd:d;l mEZEd:d<l mFZFd:d=l mGZGd:d>lGmHZHd:d?lGmIZId:d@lJmKZKd:dAlJmLZLe
jrˆddBl&mMZMddCl&mNZNddDl&mOZOddEl&mPZPddFl&mQZQddGl9mRZRddHl9mSZSddIlTmUZUddJlTmVZVddKlWmXZXddLl"mYZYddMlZm[Z[ddNlZm\Z\ddOlZm]Z]ddPlZm^Z^ddQl_m`Z`ddRl_maZaddSl_mbZbddTl_mcZcddUldmeZeddVl%mfZfddWl?mgZgddXl?mhZhd:dYlimjZjd:dZlimkZkd:d[limlZld:d\lmmnZnd:d]lmmoZod:d^lmmpZpd:d_lmmqZqd:d`lmmrZrd:dalsmtZteeuefZveeuewefZxedbdcddZyededcddZzedfdgddZ{edhdiddZ|dçdcdkdldmdnœdodp„Z}dèdqdkdrdsœdtdu„Z~Gdvdw„dweDƒZeFj€Gdxdy„dye-e:e>eAeƒƒZGdzd{„d{eƒZ‚Gd|d}„d}e#jƒe#j„e#j…eƒZ†Gd~d„deeye=eIƒZ‡Gd€d„de‡eye#jˆeyeIƒZ‰e‡ZŠGd‚dƒ„dƒe#j‹e#jŒe#je#jŽeye#je#j…e#je#jƒe#j„e#j‘e‰eye‚ƒZ’Gd„d…„d…e’eyƒZ“Gd†d‡„d‡e’eyƒZ”Gdˆd‰„d‰e#j•e“eyƒZ–GdŠd‹„d‹e‚ƒZ—GdŒd„de#j„e#j‘e#jŒe#je#je#j˜e#j™e#j•e4e3e‚e#jŽe eFjšdƒZ›GdŽd„de8e#jœde’dƒZe ž¡Gdd‘„d‘e8e#jœeŸe’eŸƒZ e  ž¡Gd’d“„d“e8e#jœeŸe’eŸƒZ¡e¡ ž¡Gd”d•„d•e#j•e#je#j…e#jƒe‚ƒZ¢Gd–d—„d—e’eyƒZ£Gd˜d™„d™e£eyƒZ¤Gdšd›„d›e¤eŸƒZ¥e¥j¦Z¦e¥j§Z§Gdœd„de¢e’ee džfƒZGdŸd „d e’eyƒZ¨Gd¡d¢„d¢e”eyƒZ©Gd£d¤„d¤e”eyƒZªGd¥d¦„d¦e’ewƒZ«Gd§d¨„d¨e’eyƒZ¬Gd©dª„dªe’e ƒZ­Gd«d¬„d¬e’eyƒZ®Gd­d®„d®e®eyƒZ¯Gd¯d°„d°e”eŸe®eŸƒZ°Gd±d²„d²e£eyƒZ±Gd³d´„d´e’e ƒZ²Gdµd¶„d¶e±e ƒZ³Gd·d¸„d¸e‚ƒZ´Gd¹dº„dºe´e’eyƒZµGd»d¼„d¼eƒZ¶e¶j·Z·e¶j¸Z¸Gd½d¾„d¾e’eyƒZ¹Gd¿dÀ„dÀe’eyƒZºGdÁd„dÂe’eyƒZ»GdÃdĄdÄe“eyƒZ¼GdÅdƄdÆe#j½eye¼eyƒZ¾GdÇdȄdÈe#j¿e#j½eye#jÀe6e¼eyƒZÁGdÉdʄdÊe¼eyƒZÂGdËd̄dÌe’eÃZÄGdÍd΄dÎe3eƒZÅGdÏdЄdÐeŃZÆGdÑd҄dÒeŃZÇGdÓdԄdÔeŃZÈGdÕdքdÖeGjÉeÃZÊdyd×d؜dÙdڄZËdÛd܄ZÌdédÝdބZÍGdßdà„dàe,ƒZÎGdádâ„dâeʃZÏGdãdä„däeσZÐeÏZÑGdådæ„dæeσZÒdS)êz†Core SQL expression elements, including :class:`_expression.ClauseElement`,
:class:`_expression.ColumnElement`, and derived classes.
 
é)Ú annotations)ÚDecimal)ÚIntEnumN)Ú AbstractSet)ÚAny)ÚCallable)Úcast)ÚDict)Ú    FrozenSet)ÚGeneric)ÚIterable)ÚIterator)ÚList)ÚMapping)ÚOptional)Úoverload)ÚSequence)ÚSet)ÚTuple)ÚType)Ú TYPE_CHECKING)ÚTypeVar)ÚUnioné)Ú    coercions)Ú    operators)Úroles)Ú
traversals)Útype_api)Úhas_schema_attr)Úis_named_from_clause)Úis_quoted_name)Ú is_tuple_type)Ú    Annotated)ÚSupportsWrappingAnnotations)Ú_clone)Ú_expand_cloned)Ú _generative)Ú_NoArg)Ú
Executable)Ú
Generative)Ú HasMemoized)Ú    Immutable)ÚNO_ARG)ÚSingletonConstant)ÚMemoizedHasCacheKey)ÚNO_CACHE)Ú_document_text_coercion)ÚColumnOperators)ÚHasCopyInternals)Úcloned_traverse)ÚExternallyTraversible)ÚInternalTraversal)Útraverse)Ú    Visitableé)Úexc)Ú
inspection)Úutil)Ú!HasMemoized_ro_memoized_attribute)Ú
TypingOnly)ÚLiteral)ÚSelf)Ú_ColumnExpressionArgument)Ú#_ColumnExpressionOrStrLabelArgument)Ú    _InfoType)Ú_PropagateAttrsType)Ú_TypeEngineArgument)Ú_CacheKeyTraversalType)ÚCacheKey)ÚCompiled)Ú SQLCompiler)ÚFunctionElement)Ú OperatorType)ÚColumn)ÚDefaultGenerator)Ú FetchedValue)Ú
ForeignKey)Ú_SelectIterable)Ú
FromClause)ÚNamedFromClause)Ú TextualSelect)Ú    TupleType)Ú
TypeEngine)Ú_CloneCallableType)Ú_TraverseInternalsType)Ú
Connection)ÚDialect)ÚEngine)Ú_CoreMultiExecuteParams)Ú
CacheStats)ÚCompiledCacheType)ÚCoreExecuteOptionsParameter)ÚSchemaTranslateMapType)ÚResultÚ_Tr)ÚboundÚ_OPTÚ_NTÚ_NUMERICÚ_NMTÚ_NUMBERFú!Optional[_TypeEngineArgument[_T]]ÚboolúBindParameter[_T])ÚvalueÚtype_Úliteral_executeÚreturncCstjtj|||dS)aReturn a literal clause, bound to a bind parameter.
 
    Literal clauses are created automatically when non-
    :class:`_expression.ClauseElement` objects (such as strings, ints, dates,
    etc.) are
    used in a comparison operation with a :class:`_expression.ColumnElement`
    subclass,
    such as a :class:`~sqlalchemy.schema.Column` object.  Use this function
    to force the generation of a literal clause, which will be created as a
    :class:`BindParameter` with a bound value.
 
    :param value: the value to be bound. Can be any Python object supported by
     the underlying DB-API, or is translatable via the given type argument.
 
    :param type\_: an optional :class:`~sqlalchemy.types.TypeEngine` which will
     provide bind-parameter translation for this literal.
 
    :param literal_execute: optional bool, when True, the SQL engine will
     attempt to render the bound value directly in the SQL statement at
     execution time rather than providing as a parameter value.
 
     .. versionadded:: 2.0
 
    )rlrm)rÚexpectrZLiteralValueRole)rkrlrm©rpúNd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\sqlalchemy/sql/elements.pyÚliteral~s ürrÚstrzColumnClause[_T])ÚtextrlrncCst||ddS)aœProduce a :class:`.ColumnClause` object that has the
    :paramref:`_expression.column.is_literal` flag set to True.
 
    :func:`_expression.literal_column` is similar to
    :func:`_expression.column`, except that
    it is more often used as a "standalone" column expression that renders
    exactly as stated; while :func:`_expression.column`
    stores a string name that
    will be assumed to be part of a table and may be quoted as such,
    :func:`_expression.literal_column` can be that,
    or any other arbitrary column-oriented
    expression.
 
    :param text: the text of the expression; can be any SQL expression.
      Quoting rules will not be applied. To specify a column-name expression
      which should be subject to quoting rules, use the :func:`column`
      function.
 
    :param type\_: an optional :class:`~sqlalchemy.types.TypeEngine`
      object which will
      provide result-set translation and additional expression semantics for
      this column. If left as ``None`` the type will be :class:`.NullType`.
 
    .. seealso::
 
        :func:`_expression.column`
 
        :func:`_expression.text`
 
        :ref:`tutorial_select_arbitrary_text`
 
    T)rlÚ
is_literal©Ú ColumnClause)rtrlrprprqÚliteral_column£s#rxc@sjeZdZdZdZdZdZdZe     d¡e     d¡dd    d
d d d œdd„ƒƒZ
dd d dœdd„Z ddœdd„Z dS)ÚCompilerElementznbase class for SQL elements that can be compiled to produce a
    SQL string.
 
    .. versionadded:: 2.0
 
    rpZcompiler_elementFÚdefaultzsqlalchemy.engine.defaultzsqlalchemy.engine.urlNú#Optional[Union[Engine, Connection]]úOptional[Dialect]rrH©ÚbindÚdialectÚkwrncKsZ|dkrL|r|j}n8|jdkr0tjj}| ¡}ntjj}|j |j¡     ¡ƒ}|j
|f|ŽS)aþCompile this SQL expression.
 
        The return value is a :class:`~.Compiled` object.
        Calling ``str()`` or ``unicode()`` on the returned value will yield a
        string representation of the result. The
        :class:`~.Compiled` object also can return a
        dictionary of bind parameter names and values
        using the ``params`` accessor.
 
        :param bind: An :class:`.Connection` or :class:`.Engine` which
           can provide a :class:`.Dialect` in order to generate a
           :class:`.Compiled` object.  If the ``bind`` and
           ``dialect`` parameters are both omitted, a default SQL compiler
           is used.
 
        :param column_keys: Used for INSERT and UPDATE statements, a list of
            column names which should be present in the VALUES clause of the
            compiled statement. If ``None``, all columns from the target table
            object are rendered.
 
        :param dialect: A :class:`.Dialect` instance which can generate
            a :class:`.Compiled` object.  This argument takes precedence over
            the ``bind`` argument.
 
        :param compile_kwargs: optional dictionary of additional parameters
            that will be passed through to the compiler within all "visit"
            methods.  This allows any custom flag to be passed through to
            a custom compilation construct, for example.  It is also used
            for the case of passing the ``literal_binds`` flag through::
 
                from sqlalchemy.sql import table, column, select
 
                t = table('t', column('x'))
 
                s = select(t).where(t.c.x == 5)
 
                print(s.compile(compile_kwargs={"literal_binds": True}))
 
        .. seealso::
 
            :ref:`faq_sql_expression_string`
 
        Nrz) rÚstringify_dialectr<Ú    preloadedZengine_defaultZStrCompileDialectZ
engine_urlÚURLÚcreateÚ get_dialectÚ    _compiler)Úselfr~rr€rzÚurlrprprqÚcompileØs4
 
ÿ
zCompilerElement.compilerY©rr€rncKs"trt|tƒst‚|j||f|ŽS)zNReturn a compiler appropriate for this ClauseElement, given a
        Dialect.)rÚ
isinstanceÚ ClauseElementÚAssertionErrorZstatement_compiler©r‡rr€rprprqr†szCompilerElement._compilerrs©rncCs t| ¡ƒS©N)rsr‰©r‡rprprqÚ__str__"szCompilerElement.__str__)NN) Ú__name__Ú
__module__Ú __qualname__Ú__doc__Ú    __slots__Ú__visit_name__Úsupports_executionrr<Úpreload_moduler‰r†r’rprprprqryÉsý@ryc    @sLeZdZUdZdZer,ejddœdd„ƒZnej    Zej
ddœdd    „ƒZ d
Z d e d <d ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"e#ddœdd„ƒZ$d
Z%de d<de d<e&jrêddœddddœdd„Z'ej(ddœdd „ƒZ)d!d"d#œd$d%„Z*dd"d&œd'd(„Z+d)d*„Z,d+d,„Z-e#d-d.„ƒZ.e/j0d/d0„ƒZ1e#d1d2„ƒZ2d3d4„Z3d5d6d7d8d9œd:d;„Z4d5d6d7dd9œd<d=„Z5d>dœd?d@„Z6dgdAdd"dBœdCdD„Z7dhdEdd"dBœdFdG„Z8dHdEdId"dJœdKdL„Z9dddHdMœdNdO„Z:didPddQœdRdS„Z;ddœdTdU„Z<dd
dVœdWdXdYdHdZdd[d\œd]d^„Z=d_d`„Z>ddœdadb„Z?dcdd„Z@dedf„ZAd
S)jrŒzSBase class for elements of a programmatically constructed SQL
    expression.
 
    ÚclauserDrcCsdS)z˜like annotations, however these propagate outwards liberally
            as SQL constructs are built, and are set up at construction time.
 
            Nrpr‘rprprqÚ_propagate_attrs7szClauseElement._propagate_attrsú Optional[str]cCsdSrrpr‘rprprqÚ descriptionBszClauseElement.descriptionNzOptional[ClauseElement]Ú _is_clone_ofTFúOptional[Label[Any]]cCsdSrrpr‘rprprqÚ_order_by_label_element^sz%ClauseElement._order_by_label_elementrFÚ_cache_key_traversalúColumnElement[bool]Únegation_clause.)Ú
omit_attrsztyping_Tuple[str, ...]rzIterable[ClauseElement])r¥r€rncKsdSrrp)r‡r¥r€rprprqÚ get_childrenhszClauseElement.get_childrenúList[FromClause]cCsgSrrpr‘rprprqÚ _from_objectsmszClauseElement._from_objectsúMapping[str, Any]r@)ÚvaluesrncCst |¡|_|Sr)r<Z immutabledictrœ)r‡rªrprprqÚ_set_propagate_attrsqs z"ClauseElement._set_propagate_attrs)r€rnc s`|j‰|j |j¡}ˆr8‡fdd„|j ¡ ¡Dƒ|_n |j ¡|_|j}|dk    rV|n||_|S)zêCreate a shallow copy of this ClauseElement.
 
        This method may be used by a generative API.  Its also used as
        part of the "deep" copy afforded by a traversal that combines
        the _copy_internals() method.
 
        csi|]\}}|ˆkr||“qSrprp)Ú.0ÚkÚv©ÚskiprprqÚ
<dictcomp>‰sz(ClauseElement._clone.<locals>.<dictcomp>N)Z_memoized_keysÚ    __class__Ú__new__Ú__dict__ÚcopyÚitemsrŸ)r‡r€ÚcÚccrpr¯rqr%{s    
 ÿ
 zClauseElement._clonecCs|S)zÂa hook to allow the right side of a binary expression to respond
        to a negation of the binary expression.
 
        Used for the special case of expanding bind parameter with IN.
 
        rp)r‡Ú
negated_opÚ original_oprprprqÚ_negate_in_binary˜szClauseElement._negate_in_binarycCs|S)z­in the context of binary expression, convert the type of this
        object to the one given.
 
        applies only to :class:`_expression.ColumnElement` classes.
 
        rp©r‡rlrprprqÚ_with_binary_element_type¡sz'ClauseElement._with_binary_element_typecCs|jS)a.return the 'constructor' for this ClauseElement.
 
        This is for the purposes for creating a new object of
        this type.   Usually, its just the element's __class__.
        However, the "Annotated" version of the object overrides
        to return the class of its proxied element.
 
        ©r²r‘rprprqÚ _constructorªs
zClauseElement._constructorcCs*t ¡}|}|dk    r&| |¡|j}q |S)aReturn the set consisting all cloned ancestors of this
        ClauseElement.
 
        Includes this ClauseElement.  This accessor tends to be used for
        FromClause objects to identify 'equivalent' FROM clauses, regardless
        of transformative operations.
 
        N)r<Z
column_setÚaddrŸ)r‡ÚsÚfrprprqÚ _cloned_set¶s
 
zClauseElement._cloned_setcCs tdƒ‚dS)NzFThis SQL expression has no entity namespace with which to filter from.)ÚAttributeErrorr‘rprprqÚentity_namespaceÍsÿzClauseElement.entity_namespacecCs&|j ¡}| dd¡| dd¡|S)NrŸÚ_generate_cache_key)r´rµÚpop)r‡ÚdrprprqÚ __getstate__Ôs
  zClauseElement.__getstate__rXr[r^z Result[Any])Ú
connectionÚdistilled_paramsÚexecution_optionsrncCs4|jr&trt|tƒst‚| |||¡St |¡‚dSr)r™rr‹r)rZ_execute_clauseelementr:ZObjectNotExecutableError©r‡rÊrËrÌrprprqÚ_execute_on_connectionÚsÿz$ClauseElement._execute_on_connectioncCs| |||¡ ¡S)zªan additional hook for subclasses to provide a different
        implementation for connection.scalar() vs. connection.execute().
 
        .. versionadded:: 2.0
 
        )rÎZscalarrÍrprprqÚ_execute_on_scalarés
ÿz ClauseElement._execute_on_scalarzSequence[BindParameter[Any]]cCs4| ¡}|dkr*g}t|id|jiƒ|S|jSdS)a‹Return the list of :class:`.BindParameter` objects embedded in the
        object.
 
        This accomplishes the same purpose as ``visitors.traverse()`` or
        similar would provide, however by making use of the cache key
        it takes advantage of memoization of the key to result in fewer
        net method calls, assuming the statement is also going to be
        executed.
 
        NÚ    bindparam)rÆr7ÚappendÚ
bindparams)r‡ÚkeyrÒrprprqÚ_get_embedded_bindparamsùs z&ClauseElement._get_embedded_bindparamszOptional[Dict[str, Any]])Ú_ClauseElement__optionaldictÚkwargsrncKs| d||¡S)aReturn a copy with :func:`_expression.bindparam` elements
        replaced.
 
        Same functionality as :meth:`_expression.ClauseElement.params`,
        except adds `unique=True`
        to affected bind parameters so that multiple statements can be
        used.
 
        T©Ú_replace_params©r‡rÕrÖrprprqÚ unique_paramsszClauseElement.unique_paramsúOptional[Mapping[str, Any]]cKs| d||¡S)aÄReturn a copy with :func:`_expression.bindparam` elements
        replaced.
 
        Returns a copy of this ClauseElement with
        :func:`_expression.bindparam`
        elements replaced with values taken from the given dictionary::
 
          >>> clause = column('x') + bindparam('foo')
          >>> print(clause.compile().params)
          {'foo':None}
          >>> print(clause.params({'foo':7}).compile().params)
          {'foo':7}
 
        Fr×rÙrprprqÚparamsszClauseElement.paramsrizDict[str, Any])ÚuniqueÚ optionaldictrÖrncs:|rˆ |¡dddœ‡‡fdd„ }t|dddœd|iƒS)    NúBindParameter[Any]ÚNone)r~rncs,|jˆkrˆ|j|_d|_ˆr(| ¡dS)NF)rÓrkÚrequiredÚ_convert_to_unique)r~©rÖrÝrprqÚvisit_bindparam=s
 
 z6ClauseElement._replace_params.<locals>.visit_bindparamT)Ú maintain_keyÚdetect_subquery_colsrÐ)Úupdater4)r‡rÝrÞrÖrärprãrqrØ4s
ýzClauseElement._replace_params©Úotherr€rncKstj||f|ŽS)a•Compare this :class:`_expression.ClauseElement` to
        the given :class:`_expression.ClauseElement`.
 
        Subclasses should override the default behavior, which is a
        straight identity comparison.
 
        \**kw are arguments consumed by subclass ``compare()`` methods and
        may be used to modify the criteria for comparison
        (see :class:`_expression.ColumnElement`).
 
        )rÚcompare©r‡rér€rprprqrêJs zClauseElement.compareúOptional[OperatorType]©ÚagainstrncCs|S)a Apply a 'grouping' to this :class:`_expression.ClauseElement`.
 
        This method is overridden by subclasses to return a "grouping"
        construct, i.e. parenthesis.   In particular it's used by "binary"
        expressions to provide a grouping around themselves when placed into a
        larger expression, as well as by :func:`_expression.select`
        constructs when placed into the FROM clause of another
        :func:`_expression.select`.  (Note that subqueries should be
        normally created using the :meth:`_expression.Select.alias` method,
        as many
        platforms require nested SELECT statements to be named).
 
        As expressions are composed together, the application of
        :meth:`self_group` is automatic - end-user code should never
        need to use this method directly.  Note that SQLAlchemy's
        clause constructs take operator precedence into account -
        so parenthesis might not be needed, for example, in
        an expression like ``x OR (y AND z)`` - AND takes precedence
        over OR.
 
        The base :meth:`self_group` method of
        :class:`_expression.ClauseElement`
        just returns self.
        rp©r‡rîrprprqÚ
self_groupXszClauseElement.self_groupcCs|S)zVReturn this :class:`_expression.ClauseElement`
        without any groupings.
        rpr‘rprprqÚ_ungroupuszClauseElement._ungroup)Úfor_executemanyÚschema_translate_maprYzOptional[CompiledCacheType]z    List[str]z Optional[SchemaTranslateMapType]zJtyping_Tuple[Compiled, Optional[Sequence[BindParameter[Any]]], CacheStats])rÚcompiled_cacheÚ column_keysròrór€rnc Ksæ|dk    r|jr| ¡}nd}|dk    r˜tr4|dk    s4t‚|\}}    ||t|ƒt|ƒ|f}
| |
¡} | dkr|j} |j|f||||dœ|—Ž} | ||
<qÜ|j    } nDd}    |j|f||||dœ|—Ž} |jsÆ|j
} n|dkrÖ|j } n|j } | |    | fS)N)Ú    cache_keyrõròró) Z_supports_statement_cacherÆrrÚtupleriÚgetZ
CACHE_MISSr†Z    CACHE_HITZNO_DIALECT_SUPPORTZCACHING_DISABLEDZ NO_CACHE_KEY) r‡rrôrõròrór€Zelem_cache_keyröZextracted_paramsrÓZ compiled_sqlZ    cache_hitrprprqÚ_compile_w_cache|sZ
 û
ÿûú
ÿûú    zClauseElement._compile_w_cachecCst|dƒr|jS| ¡SdS)Nr¤)Úhasattrr¤Ú_negater‘rprprqÚ
__invert__¾s
zClauseElement.__invert__cCs*|jtjd}t|tƒst‚t|tjdS)N©rî©Úoperator©rðrÚinvr‹Ú ColumnElementrÚUnaryExpression©r‡ÚgroupedrprprqrûÆszClauseElement._negatecCs tdƒ‚dS)Nú+Boolean value of this clause is not defined)Ú    TypeErrorr‘rprprqÚ__bool__ËszClauseElement.__bool__cCs6|j}|dkrt |¡Sd|j|jjt|ƒ|fSdS)Nz<%s.%s at 0x%x; %s>)ržÚobjectÚ__repr__r”r²r“Úid)r‡Zfriendlyrprprqr
Îs
üzClauseElement.__repr__)N)N)N)Br“r”r•r–r˜rr<Úmemoized_propertyrœÚ
EMPTY_DICTÚro_memoized_propertyržrŸÚ__annotations__Zis_clause_elementZ is_selectableZis_dmlÚ_is_column_elementÚ_is_keyed_column_elementZ    _is_tableZ!_gen_static_annotations_cache_keyÚ _is_textualZ_is_from_clauseZ_is_returns_rowsÚ_is_text_clauseZ_is_from_containerZ_is_select_containerZ_is_select_baseZ_is_select_statementÚ_is_bind_parameterÚ_is_clause_listZ_is_lambda_elementZ_is_singleton_constantZ _is_immutableÚ_is_starÚpropertyr¡r¢Útypingr¦Úro_non_memoized_propertyr¨r«r%r»r½r¿r+Úmemoized_attributerÃrÅrÉrÎrÏrÔrÚrÜrØrêrðrñrùrürûrr
rprprprqrŒ&sŠ
  ÿ
        
 
 
þþÿ ùBrŒc@s>eZdZdZejr:ddddœdd„Zdd    d
ddd œd d „ZdS)ÚDQLDMLClauseElementz|represents a :class:`.ClauseElement` that compiles to a DQL or DML
    expression, not DDL.
 
    .. versionadded:: 2.0
 
    rYrrIrŠcKsdS)zRReturn a compiler appropriate for this ClauseElement, given a
            Dialect.NrprŽrprprqr†åszDQLDMLClauseElement._compilerNr{r|r}cKsdSrrp)r‡r~rr€rprprqr‰êszDQLDMLClauseElement.compile)NN)r“r”r•r–rrr†r‰rprprprqrÛs ýrc@seZdZdZdZejZdS)ÚCompilerColumnElementzdA compiler-only column element used for ad-hoc string compilations.
 
    .. versionadded:: 2.0
 
    rpN)r“r”r•r–r—r<r rœrprprprqrósrc@s6eZdZdZejr2ejddœdd„ƒZddddd    œd
d „Z    ddddd    œd d „Z
dàdddddddœdd„Z dádddddœdd„Z dddœd d!„Z dddœd"d#„Zd$dœd%d&„Zdd'dœd(d)„Zdd'dœd*d+„Zdd'dœd,d-„Zdd'dœd.d/„Zdd'dœd0d1„Zdd'dœd2d3„Zdd'dœd4d5„Zdd'dœd6d7„Zd8dœd9d:„Zdd'dœd;d<„Zddd=œd>d?„Zdddœd@dA„ZdddœdBdC„ZedDddEdFœdGdH„ƒZedddœdIdH„ƒZdddœdJdH„ZdâddKdLdMœdNdO„ZdãddKdLdMœdPdQ„Z ddRdœdSdT„Z!ddRdœdUdV„Z"ddRdœdWdX„Z#d8dœdYdZ„Z$ddRdœd[d\„Z%ddRdœd]d^„Z&d_dLdœd`da„Z'd_dLdœdbdc„Z(d_dLdœddde„Z)däddKdLdMœdfdg„Z*dåddKdLdMœdhdi„Z+dæddKdLdMœdjdk„Z,dçddKdLdMœdldm„Z-ddLdœdndo„Z.ddLdœdpdq„Z/ddLdœdrds„Z0dèddKdd'dtœdudv„Z1déddKdd'dtœdwdx„Z2dêddKdd'dtœdydz„Z3dëddKdd'dtœd{d|„Z4ddd'd}œd~d„Z5ddd'd}œd€d„Z6ddd'd‚œdƒd„„Z7dìddKd'd…œd†d‡„Z8dídddKdEdˆœd‰dŠ„Z9d8dœd‹dŒ„Z:d8dœddŽ„Z;d8dœdd„Z<d8dœd‘d’„Z=d8dœd“d”„Z>d8dœd•d–„Z?dd—d˜œd™dš„Z@dîddddLd›œdœd„ZAdžd8dŸœd d¡„ZBd¢dœd£d¤„ZCd¢dœd¥d¦„ZDed§dd¨dFœd©dª„ƒZEedDddEdFœd«dª„ƒZEdddœd¬dª„ZEed­dd®dFœd¯d°„ƒZFed±dd²dFœd³d°„ƒZFedDddEdFœd´d°„ƒZFdddœdµd°„ZFed§dd¨dFœd¶d·„ƒZGedddœd¸d·„ƒZGdddœd¹d·„ZGed§dd¨dFœdºd»„ƒZHedddœd¼d»„ƒZHdddœd½d»„ZHed§dd¨dFœd¾d¿„ƒZIedddœdÀd¿„ƒZIdddœdÁd¿„ZIed§dd¨dFœdÂdăZJedddœdÄdăZJdddœdÅdÄZJed§dd¨dFœdÆdDŽƒZKedddœdÈdDŽƒZKdddœdÉdDŽZKed§dd¨dFœdÊd˄ƒZLedddœdÌd˄ƒZLdddœdÍd˄ZLed±ddÎdFœdÏdЄƒZMed­dd®dFœdÑdЄƒZMedddœdÒdЄƒZMdddœdÓdЄZMed§ddÎdFœdÔdՄƒZNedddœdÖdՄƒZNdddœd×dՄZNed§dd¨dFœdØdلƒZOedddœdÚdلƒZOdddœdÛdلZOed§dd¨dFœdÜd݄ƒZPedddœdÞd݄ƒZPdddœdßd݄ZPdS)ïÚSQLCoreOperationsrprDrcCsdSrrpr‘rprprqrœsz"SQLCoreOperations._propagate_attrsrKrúColumnElement[Any]©ÚoprérÖrncOsdSrrp©r‡r rérÖrprprqÚoperateszSQLCoreOperations.operatecKsdSrrpr!rprprqÚreverse_operatesz!SQLCoreOperations.reverse_operaterFNrsÚintriz#Optional[_TypeEngineArgument[_OPT]]zOptional[Callable[..., Any]]z'Callable[[Any], BinaryExpression[_OPT]])ÚopstringÚ
precedenceÚ is_comparisonÚ return_typeÚ python_implrncCsdSrrp)r‡r%r&r'r(r)rprprqr szSQLCoreOperations.opz'Callable[[Any], BinaryExpression[bool]])r%r&r)rncCsdSrrp)r‡r%r&r)rprprqÚbool_op'szSQLCoreOperations.bool_opÚBooleanClauseList©rérncCsdSrrp©r‡rérprprqÚ__and__/szSQLCoreOperations.__and__cCsdSrrpr-rprprqÚ__or__2szSQLCoreOperations.__or__úColumnElement[_T]cCsdSrrpr‘rprprqrü5szSQLCoreOperations.__invert__r£cCsdSrrpr-rprprqÚ__lt__8szSQLCoreOperations.__lt__cCsdSrrpr-rprprqÚ__le__;szSQLCoreOperations.__le__cCsdSrrpr-rprprqÚ__eq__>szSQLCoreOperations.__eq__cCsdSrrpr-rprprqÚ__ne__AszSQLCoreOperations.__ne__cCsdSrrpr-rprprqÚis_distinct_fromDsz"SQLCoreOperations.is_distinct_fromcCsdSrrpr-rprprqÚis_not_distinct_fromGsz&SQLCoreOperations.is_not_distinct_fromcCsdSrrpr-rprprqÚ__gt__JszSQLCoreOperations.__gt__cCsdSrrpr-rprprqÚ__ge__MszSQLCoreOperations.__ge__úUnaryExpression[_T]cCsdSrrpr‘rprprqÚ__neg__PszSQLCoreOperations.__neg__cCsdSrrpr-rprprqÚ __contains__SszSQLCoreOperations.__contains__)ÚindexrncCsdSrrp)r‡r<rprprqÚ __getitem__VszSQLCoreOperations.__getitem__cCsdSrrpr-rprprqÚ
__lshift__YszSQLCoreOperations.__lshift__cCsdSrrpr-rprprqÚ
__rshift__\szSQLCoreOperations.__rshift__z    _SQO[str]zColumnElement[str])r‡rérncCsdSrrpr-rprprqÚconcat_szSQLCoreOperations.concatcCsdSrrpr-rprprqr@cscCsdSrrpr-rprprqr@gsrzBinaryExpression[bool])réÚescaperncCsdSrrp©r‡rérArprprqÚlikejszSQLCoreOperations.likecCsdSrrprBrprprqÚilikeoszSQLCoreOperations.ilikezBinaryExpression[Any]cCsdSrrpr-rprprqÚ bitwise_xortszSQLCoreOperations.bitwise_xorcCsdSrrpr-rprprqÚ
bitwise_orwszSQLCoreOperations.bitwise_orcCsdSrrpr-rprprqÚ bitwise_andzszSQLCoreOperations.bitwise_andcCsdSrrpr‘rprprqÚ bitwise_not}szSQLCoreOperations.bitwise_notcCsdSrrpr-rprprqÚbitwise_lshift€sz SQLCoreOperations.bitwise_lshiftcCsdSrrpr-rprprqÚbitwise_rshiftƒsz SQLCoreOperations.bitwise_rshiftz=Union[Iterable[Any], BindParameter[Any], roles.InElementRole]cCsdSrrpr-rprprqÚin_†szSQLCoreOperations.in_cCsdSrrpr-rprprqÚnot_inŽszSQLCoreOperations.not_incCsdSrrpr-rprprqÚnotin_–szSQLCoreOperations.notin_cCsdSrrprBrprprqÚnot_likežszSQLCoreOperations.not_likecCsdSrrprBrprprqÚnotlike£szSQLCoreOperations.notlikecCsdSrrprBrprprqÚ    not_ilike¨szSQLCoreOperations.not_ilikecCsdSrrprBrprprqÚnotilike­szSQLCoreOperations.notilikecCsdSrrpr-rprprqÚis_²szSQLCoreOperations.is_cCsdSrrpr-rprprqÚis_notµszSQLCoreOperations.is_notcCsdSrrpr-rprprqÚisnot¸szSQLCoreOperations.isnot)rérAÚ
autoescaperncCsdSrrp©r‡rérArUrprprqÚ
startswith»szSQLCoreOperations.startswithcCsdSrrprVrprprqÚ istartswithÃszSQLCoreOperations.istartswithcCsdSrrprVrprprqÚendswithËszSQLCoreOperations.endswithcCsdSrrprVrprprqÚ    iendswithÓszSQLCoreOperations.iendswithrècKsdSrrprërprprqÚcontainsÛszSQLCoreOperations.containscKsdSrrprërprprqÚ    icontainsÞszSQLCoreOperations.icontains)rérÖrncKsdSrrp)r‡rérÖrprprqÚmatchászSQLCoreOperations.match)ÚpatternÚflagsrncCsdSrrp)r‡r^r_rprprqÚ regexp_matchäszSQLCoreOperations.regexp_match)r^Ú replacementr_rncCsdSrrp)r‡r^rar_rprprqÚregexp_replaceész SQLCoreOperations.regexp_replacecCsdSrrpr‘rprprqÚdescîszSQLCoreOperations.desccCsdSrrpr‘rprprqÚascñszSQLCoreOperations.asccCsdSrrpr‘rprprqÚ nulls_firstôszSQLCoreOperations.nulls_firstcCsdSrrpr‘rprprqÚ
nullsfirst÷szSQLCoreOperations.nullsfirstcCsdSrrpr‘rprprqÚ
nulls_lastúszSQLCoreOperations.nulls_lastcCsdSrrpr‘rprprqÚ    nullslastýszSQLCoreOperations.nullslastÚCollationClause)Ú    collationrncCsdSrrp©r‡rjrprprqÚcollateszSQLCoreOperations.collate)ÚcleftÚcrightÚ    symmetricrncCsdSrrp)r‡rmrnrorprprqÚbetweenszSQLCoreOperations.betweenz_SQO[_T]©r‡rncCsdSrrpr‘rprprqÚdistinctszSQLCoreOperations.distinctzCollectionAggregate[Any]cCsdSrrpr‘rprprqÚany_ szSQLCoreOperations.any_cCsdSrrpr‘rprprqÚall_szSQLCoreOperations.all_z
_SQO[_NMT]zColumnElement[_NMT]cCsdSrrpr-rprprqÚ__add__szSQLCoreOperations.__add__cCsdSrrpr-rprprqruscCsdSrrpr-rprprqru$sz    _SQO[_NT]zColumnElement[_NT]cCsdSrrpr-rprprqÚ__radd__'szSQLCoreOperations.__radd__z    _SQO[int]zColumnElement[int]cCsdSrrpr-rprprqrv+scCsdSrrpr-rprprqrv/scCsdSrrpr-rprprqrv3scCsdSrrpr-rprprqÚ__sub__6szSQLCoreOperations.__sub__cCsdSrrpr-rprprqrw=scCsdSrrpr-rprprqrwAscCsdSrrpr-rprprqÚ__rsub__DszSQLCoreOperations.__rsub__cCsdSrrpr-rprprqrxKscCsdSrrpr-rprprqrxOscCsdSrrpr-rprprqÚ__mul__RszSQLCoreOperations.__mul__cCsdSrrpr-rprprqryYscCsdSrrpr-rprprqry]scCsdSrrpr-rprprqÚ__rmul__`szSQLCoreOperations.__rmul__cCsdSrrpr-rprprqrzgscCsdSrrpr-rprprqrzkscCsdSrrpr-rprprqÚ__mod__nszSQLCoreOperations.__mod__cCsdSrrpr-rprprqr{rscCsdSrrpr-rprprqr{vscCsdSrrpr-rprprqÚ__rmod__yszSQLCoreOperations.__rmod__cCsdSrrpr-rprprqr|}scCsdSrrpr-rprprqr|szColumnElement[_NUMERIC]cCsdSrrpr-rprprqÚ __truediv__„szSQLCoreOperations.__truediv__cCsdSrrpr-rprprqr}ŠscCsdSrrpr-rprprqr}ŽscCsdSrrpr-rprprqr}’scCsdSrrpr-rprprqÚ __rtruediv__•szSQLCoreOperations.__rtruediv__cCsdSrrpr-rprprqr~›scCsdSrrpr-rprprqr~ŸscCsdSrrpr-rprprqÚ __floordiv__¢szSQLCoreOperations.__floordiv__cCsdSrrpr-rprprqr¦scCsdSrrpr-rprprqrªscCsdSrrpr-rprprqÚ __rfloordiv__­szSQLCoreOperations.__rfloordiv__cCsdSrrpr-rprprqr€±scCsdSrrpr-rprprqr€µs)rFNN)rN)N)N)N)N)N)N)NF)NF)NF)NF)N)N)F)Qr“r”r•r—rrr<Únon_memoized_propertyrœr"r#r r*r.r/rür1r2r3r4r5r6r7r8r:r;r=r>r?rr@rCrDrErFrGrHrIrJrKrLrMrNrOrPrQrRrSrTrWrXrYrZr[r\r]r`rbrcrdrerfrgrhrlrprrrsrtrurvrwrxryrzr{r|r}r~rr€rprprprqrs4ú üÿÿ    ÿÿÿÿü ü ü üÿÿÿrc@seZdZdZdZdS)ÚSQLColumnExpressiona­A type that may be used to indicate any SQL column element or object
    that acts in place of one.
 
    :class:`.SQLColumnExpression` is a base of
    :class:`.ColumnElement`, as well as within the bases of ORM elements
    such as :class:`.InstrumentedAttribute`, and may be used in :pep:`484`
    typing to indicate arguments or return values that should behave
    as column expressions.
 
    .. versionadded:: 2.0.0b4
 
 
    rpN©r“r”r•r–r—rprprprqr‚¹sr‚c    @sœeZdZUdZdZdZded<ded<dZdZded    <dZ    e
ƒZ d
ed <e j d d œdd„ƒZe jdd œdd„ƒZdZded<ejdd œdd„ƒZedd œdd„ƒZedd œdd„ƒZedd œdd„ƒZdZdZdZdZded<edˆd d!d d"œd#d$„ƒZed‰d%d!d%d"œd&d$„ƒZdŠd!d%d'œd(d$„Zed)d)d*œd+d,„ƒZed d d*œd-d,„ƒZd%d œd.d,„Zd/ed0<e sxe j d/d œd1d2„ƒZ!ejd3d œd4d5„ƒZ"d6d7d8œd9d:„Z#d;d7d7d%d<œd=d>„Z$d;d7d7d%d<œd?d@„Z%d‹d;d7dAddBdCœdDdE„Z&ed%d œdFdG„ƒZ'edHd œdIdJ„ƒZ(e j dKd œdLdM„ƒZ)e j dKd œdNdO„ƒZ*e j dKd œdPdQ„ƒZ+d d œdRdS„Z,d%ddTœdUdV„Z-d%ddWœdXdY„Z.ejdd œdZd[„ƒZ/ejdd œd\d]„ƒZ0ddddd^œd_dddd`d7dadbœdcdd„Z1dedfdgœdhdi„Z2ddjdkœdldm„Z3dŒddndodpœdqdr„Z4e j d6d œdsdt„ƒZ5e j dod œdudv„ƒZ6ee  7dwdx¡d6d œdydz„ƒƒZ8ee  7dwd{¡d6d œd|d}„ƒƒZ9d~d6dœd€d„Z:e j dod œd‚dƒ„ƒZ;e j dod œd„d…„ƒZ<d~dodœd†d‡„Z=dS)raRepresent a column-oriented SQL expression suitable for usage in the
    "columns" clause, WHERE clause etc. of a statement.
 
    While the most familiar kind of :class:`_expression.ColumnElement` is the
    :class:`_schema.Column` object, :class:`_expression.ColumnElement`
    serves as the basis
    for any unit that may be present in a SQL expression, including
    the expressions themselves, SQL functions, bound parameters,
    literal expressions, keywords such as ``NULL``, etc.
    :class:`_expression.ColumnElement`
    is the ultimate base class for all such elements.
 
    A wide variety of SQLAlchemy Core functions work at the SQL expression
    level, and are intended to accept instances of
    :class:`_expression.ColumnElement` as
    arguments.  These functions will typically document that they accept a
    "SQL expression" as an argument.  What this means in terms of SQLAlchemy
    usually refers to an input which is either already in the form of a
    :class:`_expression.ColumnElement` object,
    or a value which can be **coerced** into
    one.  The coercion rules followed by most, but not all, SQLAlchemy Core
    functions with regards to SQL expressions are as follows:
 
        * a literal Python value, such as a string, integer or floating
          point value, boolean, datetime, ``Decimal`` object, or virtually
          any other Python object, will be coerced into a "literal bound
          value".  This generally means that a :func:`.bindparam` will be
          produced featuring the given value embedded into the construct; the
          resulting :class:`.BindParameter` object is an instance of
          :class:`_expression.ColumnElement`.
          The Python value will ultimately be sent
          to the DBAPI at execution time as a parameterized argument to the
          ``execute()`` or ``executemany()`` methods, after SQLAlchemy
          type-specific converters (e.g. those provided by any associated
          :class:`.TypeEngine` objects) are applied to the value.
 
        * any special object value, typically ORM-level constructs, which
          feature an accessor called ``__clause_element__()``.  The Core
          expression system looks for this method when an object of otherwise
          unknown type is passed to a function that is looking to coerce the
          argument into a :class:`_expression.ColumnElement` and sometimes a
          :class:`_expression.SelectBase` expression.
          It is used within the ORM to
          convert from ORM-specific objects like mapped classes and
          mapped attributes into Core expression objects.
 
        * The Python ``None`` value is typically interpreted as ``NULL``,
          which in SQLAlchemy Core produces an instance of :func:`.null`.
 
    A :class:`_expression.ColumnElement` provides the ability to generate new
    :class:`_expression.ColumnElement`
    objects using Python expressions.  This means that Python operators
    such as ``==``, ``!=`` and ``<`` are overloaded to mimic SQL operations,
    and allow the instantiation of further :class:`_expression.ColumnElement`
    instances
    which are composed from other, more fundamental
    :class:`_expression.ColumnElement`
    objects.  For example, two :class:`.ColumnClause` objects can be added
    together with the addition operator ``+`` to produce
    a :class:`.BinaryExpression`.
    Both :class:`.ColumnClause` and :class:`.BinaryExpression` are subclasses
    of :class:`_expression.ColumnElement`:
 
    .. sourcecode:: pycon+sql
 
        >>> from sqlalchemy.sql import column
        >>> column('a') + column('b')
        <sqlalchemy.sql.expression.BinaryExpression object at 0x101029dd0>
        >>> print(column('a') + column('b'))
        {printsql}a + b
 
    .. seealso::
 
        :class:`_schema.Column`
 
        :func:`_expression.column`
 
    Zcolumn_elementFriÚ primary_keyúOptional[ColumnElement[_T]]rŸTÚ_insert_sentinelzAbstractSet[ForeignKey]Ú foreign_keysúList[ColumnElement[Any]]rcCsgSrrpr‘rprprqÚ_proxies7szColumnElement._proxiesrcCsdS)a}The named label that can be used to target
        this column in a result set in a "table qualified" context.
 
        This label is almost always the label used when
        rendering <expr> AS <label> in a SELECT statement when using
        the LABEL_STYLE_TABLENAME_PLUS_COL label style, which is what the
        legacy ORM ``Query`` object uses as well.
 
        For a regular Column bound to a Table, this is typically the label
        <tablename>_<columnname>.  For other constructs, different rules
        may apply, such as anonymized labels and others.
 
        .. versionchanged:: 1.4.21 renamed from ``._label``
 
        Nrpr‘rprprqÚ    _tq_label;szColumnElement._tq_labelNrÓcCs|jS)alA label-based version of 'key' that in some circumstances refers
        to this object in a Python namespace.
 
 
        _tq_key_label comes into play when a select() statement is constructed
        with apply_labels(); in this case, all Column objects in the ``.c``
        collection are rendered as <tablename>_<columnname> in SQL; this is
        essentially the value of ._label. But to locate those columns in the
        ``.c`` collection, the name is along the lines of <tablename>_<key>;
        that's the typical value of .key_label.
 
        .. versionchanged:: 1.4.21 renamed from ``._key_label``
 
        )Ú
_proxy_keyr‘rprprqÚ _tq_key_labelXszColumnElement._tq_key_labelcCs|jS)z legacy; renamed to _tq_key_label)rŒr‘rprprqÚ
_key_labeljszColumnElement._key_labelcCs|jS)zlegacy; renamed to _tq_label©rŠr‘rprprqÚ_labeloszColumnElement._labelcCs t|ddƒS)a:the 'name' that naturally applies this element when rendered in
        SQL.
 
        Concretely, this is the "name" of a column or a label in a
        SELECT statement; ``<columnname>`` and ``<labelname>`` below::
 
            SELECT <columnmame> FROM table
 
            SELECT column AS <labelname> FROM table
 
        Above, the two names noted will be what's present in the DBAPI
        ``cursor.description`` as the names.
 
        If this attribute returns ``None``, it means that the SQL element as
        written does not have a 100% fully predictable "name" that would appear
        in the ``cursor.description``. Examples include SQL functions, CAST
        functions, etc. While such things do return names in
        ``cursor.description``, they are only predictable on a
        database-specific basis; e.g. an expression like ``MAX(table.col)`` may
        appear as the string ``max`` on one database (like PostgreSQL) or may
        appear as the whole expression ``max(table.col)`` on SQLite.
 
        The default implementation looks for a ``.name`` attribute on the
        object, as has been the precedent established in SQLAlchemy for many
        years.  An exception is made on the ``FunctionElement`` subclass
        so that the return value is always ``None``.
 
        .. versionadded:: 1.4.21
 
 
 
        ÚnameN)Úgetattrr‘rprprqÚ_non_anon_labelts"zColumnElement._non_anon_labelrpz Sequence[str]Ú
_alt_namesr0rì)r‡rîrncCsdSrrprïrprprqrð®szColumnElement.self_grouprcCsdSrrprïrprprqrð´srícCsT|tjtjtjfkr4|jjtjjkr4t|tj    tj
ƒS|tj tj fkrLt |ƒS|SdSr)rÚand_Úor_Ú_asboolÚtypeÚ_type_affinityrÚ BOOLEANTYPEÚ    AsBooleanÚis_trueÚis_falseÚany_opÚall_opÚGroupingrïrprprqrðºsÿþr£rqcCsdSrrpr‘rprprqrûÇszColumnElement._negatecCsdSrrpr‘rprprqrûËscCsP|jjtjjkr t|tjtjƒS|jtj    d}t
|t ƒs<t ‚t |tj    ddSdS©NrýT)rÿÚwraps_column_expression)r—r˜rr™ršrrœr›rðrr‹rrrrrprprqrûÏsÿúTypeEngine[_T]r—cCstjSr©rÚNULLTYPEr‘rprprqr—ÝszColumnElement.typezTypeEngine.Comparator[_T]c
CsLz |jj}Wn2tk
r>}ztd|jƒ|‚W5d}~XYn
X||ƒSdS)NzOObject %r associated with '.type' attribute is not a TypeEngine class or object)r—Úcomparator_factoryrÄr)r‡r¥ÚerrrprprqÚ
comparatorãs ÿÿýzColumnElement.comparatorrsr)rÓrnc
CsXzt|j|ƒWStk
rR}z&tdt|ƒjt|jƒj|fƒ|‚W5d}~XYnXdS)Nz3Neither %r object nor %r object has an attribute %r)r‘r§rÄr—r“)r‡rÓr¦rprprqÚ __getattr__ïs
ýÿÿùzColumnElement.__getattr__zoperators.OperatorTypercOs||jf|ž|ŽSr©r§r!rprprqr"üszColumnElement.operatecKs|||jf|ŽSrr©r!rprprqr#szColumnElement.reverse_operateúOptional[TypeEngine[_T]]rj©rÿÚobjrlÚ    expandingrnc    Cstd||||jd|dS©NT)Ú_compared_to_operatorrlÚ_compared_to_typerÝr­©Ú BindParameterr—©r‡rÿr¬rlr­rprprqÚ _bind_param    sùzColumnElement._bind_paramcCs|S)z^Return a column expression.
 
        Part of the inspection interface; returns self.
 
        rpr‘rprprqÚ
expressionszColumnElement.expressionrPcCs|fSrrpr‘rprprqÚ_select_iterable#szColumnElement._select_iterablezFrozenSet[ColumnElement[Any]]cCstdd„|jDƒƒS)Ncss|]}|js|VqdSr)r‰©r¬r·rprprqÚ    <genexpr>)sz-ColumnElement.base_columns.<locals>.<genexpr>)Ú    frozensetÚ    proxy_setr‘rprprqÚ base_columns'szColumnElement.base_columnscCs&t| ¡gƒ tjdd„|jDƒŽ¡S)aFset of all columns we are proxying
 
        as of 2.0 this is explicitly deannotated columns.  previously it was
        effectively deannotated columns but wasn't enforced.  annotated
        columns should basically not go into sets if at all possible because
        their hashing behavior is very non-performant.
 
        cSsg|]
}|j‘qSrp)rºr·rprprqÚ
<listcomp>6sz+ColumnElement.proxy_set.<locals>.<listcomp>)r¹Z _deannotateÚunionÚ    itertoolsÚchainr‰r‘rprprqrº+s
ÿzColumnElement.proxy_setcCstt|jƒƒSr)r¹r&rºr‘rprprqÚ_expanded_proxy_set9sz!ColumnElement._expanded_proxy_setcCs |gttjdd„|jDƒŽƒS)zAn 'uncached' version of proxy set.
 
        This list includes annotated columns which perform very poorly in
        set operations.
 
        cSsg|] }| ¡‘qSrp)Ú_uncached_proxy_listr·rprprqr¼Fsz6ColumnElement._uncached_proxy_list.<locals>.<listcomp>)Úlistr¾r¿r‰r‘rprprqrÁ=sÿz"ColumnElement._uncached_proxy_list)Ú othercolumnrncCst|j |j¡ƒS)z…Return True if the given :class:`_expression.ColumnElement`
        has a common ancestor to this :class:`_expression.ColumnElement`.)rirºÚ intersection)r‡rÃrprprqÚshares_lineageIszColumnElement.shares_lineager,cCs t|dƒot|dƒo|j|jkS)zhReturn True if the given column element compares to this one
        when targeting within a result row.r)rúrr-rprprqÚ_compare_name_for_resultOs
 
ÿ
ýz&ColumnElement._compare_name_for_resultcCsF|jr d|jkr tt|jdƒS|j}|s0|j}t|tƒr>dS|SdS)NÚ    proxy_key)Ú _annotationsrrsrÓr’r‹Ú_anonymous_label©r‡rrprprqr‹Ys
zColumnElement._proxy_keycCs<t|ddƒdk    rdS|jr4d|jkr4tt|jdƒSdSdS)a\a suggested label to use in the case that the column has no name,
        which should be used if possible as the explicit 'AS <label>'
        where this expression would normally have an anon label.
 
        this is essentially mostly what _proxy_key does except it returns
        None if the column has a normal name that can be used.
 
        rNrÇ)r‘rÈrrsr‘rprprqÚ_expression_labelks
zColumnElement._expression_label)rrÓÚname_is_truncatableÚcompound_select_colsrQú&Optional[Sequence[ColumnElement[Any]]]ú#typing_Tuple[str, ColumnClause[_T]])Ú
selectablerrÓrÌrÍr€rncKs˜|dkr|j}|dkr"|j}n|}|dk    s.t‚t|rBt tj|¡n|t|ddƒ|d}|j    |_    |rnt
|ƒ|_ n|g|_ |j dk    r|j j  |¡|_ ||fS)z»Create a new :class:`_expression.ColumnElement` representing this
        :class:`_expression.ColumnElement` as it appears in the select list of
        a descending selectable.
 
        Nr—)rlÚ _selectable)Ú_anon_name_labelr‹rrwrrorÚTruncatedLabelRoler‘rœrÂr‰rŸÚcolumnsrø)r‡rÐrrÓrÌrÍr€ÚcorprprqÚ _make_proxy}s( ÿ
û 
zColumnElement._make_proxyz_TypeEngineArgument[_OPT]z
Cast[_OPT])rlrncCs
t||ƒS)aProduce a type cast, i.e. ``CAST(<expression> AS <type>)``.
 
        This is a shortcut to the :func:`_expression.cast` function.
 
        .. seealso::
 
            :ref:`tutorial_casts`
 
            :func:`_expression.cast`
 
            :func:`_expression.type_coerce`
 
        )ÚCastr¼rprprqr¦szColumnElement.castz    Label[_T])rrncCst|||jƒS)zÔProduce a column label, i.e. ``<columnname> AS <name>``.
 
        This is a shortcut to the :func:`_expression.label` function.
 
        If 'name' is ``None``, an anonymous label name will be generated.
 
        )ÚLabelr—rÊrprprqÚlabel¶szColumnElement.labelz Optional[int]rÉ)ÚseedÚadd_hashrncCsp|jdk    r|j}qt|ƒ}|rF|dks*t‚|s2t‚|d>|B}|d}t|tƒr`tj|d|dSt ||pld¡S)NiéÚ_Ú)Úenclosing_labelÚanon)rŸÚhashrr‹rÉÚsafe_construct)r‡rÚrÛZ
hash_valuerprprqÚ _anon_labelÀs
 
ÿzColumnElement._anon_labelcCst|ddƒ}| |¡S)a¿Provides a constant 'anonymous label' for this ColumnElement.
 
        This is a label() expression which will be named at compile time.
        The same label() is returned each time ``anon_label`` is called so
        that expressions can reference ``anon_label`` multiple times,
        producing the same label name at compile time.
 
        The compiler uses this function automatically at compile time
        for expressions that are known to be 'unnamed' like binary
        expressions and function calls.
 
        .. versionchanged:: 1.4.9 - this attribute was not intended to be
           public and is renamed to _anon_name_label.  anon_name exists
           for backwards compat
 
        rN©r‘rãrÊrprprqrÒäs zColumnElement._anon_name_labelcCs | |j¡S)aîProvides a constant 'anonymous key label' for this ColumnElement.
 
        Compare to ``anon_label``, except that the "key" of the column,
        if available, is used to generate the label.
 
        This is used when a deduplicating key is placed into the columns
        collection of a selectable.
 
        .. versionchanged:: 1.4.9 - this attribute was not intended to be
           public and is renamed to _anon_key_label.  anon_key_label exists
           for backwards compat
 
        )rãr‹r‘rprprqÚ_anon_key_labelùszColumnElement._anon_key_labelú1.4zqThe :attr:`_expression.ColumnElement.anon_label` attribute is now private, and the public accessor is deprecated.cCs|jSr)rÒr‘rprprqÚ
anon_label
szColumnElement.anon_labelzuThe :attr:`_expression.ColumnElement.anon_key_label` attribute is now private, and the public accessor is deprecated.cCs|jSr)rår‘rprprqÚanon_key_labelszColumnElement.anon_key_labelr$©ÚidxrncCs0t|ddƒ}|dkr| |¡S|j||dSdS)a)label to apply to a column that is anon labeled, but repeated
        in the SELECT, so that we have to make an "extra anon" label that
        disambiguates it from the previous appearance.
 
        these labels come out like "foo_bar_id__1" and have double underscores
        in them.
 
        rN©rÛ)r‘Ú_dedupe_anon_tq_label_idxrã©r‡rêrÙrprprqÚ_dedupe_anon_label_idxs         
z$ColumnElement._dedupe_anon_label_idxcCs| t|ddƒ¡S©NrŠ©rãr‘r‘rprprqÚ_anon_tq_label3szColumnElement._anon_tq_labelcCs| t|ddƒ¡S)NrŒrðr‘rprprqÚ_anon_tq_key_label7sz ColumnElement._anon_tq_key_labelcCst|ddƒpd}|j||dS)NrŠràrërärírprprqrì;sz'ColumnElement._dedupe_anon_tq_label_idx)N)N)N)NF)N)>r“r”r•r–r˜r„rrr†Ú_omit_from_statementsr¹r‡r<r r‰rrŠrÓr+rrŒrrrr’Ú_render_label_in_columns_clauseÚ_allow_label_resolveÚ_is_implicitly_booleanr“rrðrûrr—r§r¨r"r#r´rµr¶r»rºrÀrÁrÅrÆr‹rËrÖrrÙrãrÒråÚ
deprecatedrçrèrîrñròrìrprprprqrÐsÄ
O  
#
 ÿÿÿ 
      û  
ù) ÿ$þþrc@seZdZUdZdZded<dS)ÚKeyedColumnElementz)ColumnElement where ``.key`` is non-None.TrsrÓN)r“r”r•r–rrrprprprqrøAs
røcs–eZdZdZeddœdd„ƒZejddœdd„ƒZeddœd    d
„ƒZ    eddœd d „ƒZ
ejd dœ‡fdd„ ƒZ dd dœdd„Z e‡fdd„ƒZ ‡ZS)ÚWrapsColumnExpressionzæMixin that defines a :class:`_expression.ColumnElement`
    as a wrapper with special
    labeling behavior for an expression that already has a name.
 
    .. versionadded:: 1.4
 
    .. seealso::
 
        :ref:`change_4449`
 
 
    r0rcCs
tƒ‚dSr©ÚNotImplementedErrorr‘rprprqÚwrapped_column_expressionWsz/WrapsColumnExpression.wrapped_column_expressionrcCs|j}t|dƒr|jSdSdSrï)rürúrŠ©r‡ÚwcerprprqrŠ[s
zWrapsColumnExpression._tq_labelcCs|jSrrŽr‘rprprqrcszWrapsColumnExpression._labelcCsdSrrpr‘rprprqr’gsz%WrapsColumnExpression._non_anon_labelrscs2|j}|js*|j}|r|St|dƒr*|jStƒjS)NrÒ)rürr’rúrÒÚsuper)r‡rþÚnalr¾rprqrÒks
z&WrapsColumnExpression._anon_name_labelr$récCs,|j}|j}|r| |d¡S| |¡SdS)NrÝ)rür’rãrì)r‡rêrþrrprprqrîzs
z,WrapsColumnExpression._dedupe_anon_label_idxcs|j}|js|jStƒjSr)rürr‹rÿrýr¾rprqr‹‚sz WrapsColumnExpression._proxy_key)r“r”r•r–rrür<rrŠrr’rÒrîr‹Ú __classcell__rprpr¾rqrùIs rùc@s0eZdZUdZdZdejfdejfdejfdej    fdej
fgZ de d    <d
e d<d e d<d e d<d Z dZd ZdZejdd ejddd d d ddd f ddddddddddddddœ dd„Zd efdd„Zed dœdd „ƒZd!dœd"d#„Zd$d%„Zd&d'„Zd6ddd(d)œd*d+„Zd,d-„Zd.d/„Zd0d1„Zd2d3„Zd4d5„ZdS)7r²a®Represent a "bound expression".
 
    :class:`.BindParameter` is invoked explicitly using the
    :func:`.bindparam` function, as in::
 
        from sqlalchemy import bindparam
 
        stmt = select(users_table).\
                    where(users_table.c.name == bindparam('username'))
 
    Detailed discussion of how :class:`.BindParameter` is used is
    at :func:`.bindparam`.
 
    .. seealso::
 
        :func:`.bindparam`
 
    rÐrÓr—ÚcallablerkrmrWÚ_traverse_internalsrsr¢z Optional[_T]FTNrrrhriz#Union[bool, Literal[_NoArg.NO_ARG]]úOptional[bool]zOptional[Callable[[], Any]]rìzOptional[TypeEngine[Any]]) rÓrkrlrÝráÚquoteÚ    callable_r­Ú
isoutparamrmr¯r°Ú_is_crudcCs |tjkr|tjko|dk}|tjkr*d}|dk    r>t ||¡}|rvtjt|ƒ|dk    rbt|tƒsb|nddd|_d|_    n$|r‚||_nt t|ƒd¡|_d|_    |j|_
|p¨d|_ ||_ ||_ ||_|    |_||_||_d|_|
|_| ræd|_|dkr:|r|r|d}ntj}n|}| dk    r,|  | |¡|_n t |¡|_nbt|tƒrP|ƒ|_nLt|ƒr–|rˆ|rp|d}n|}| |¡td|ƒ_n |td|ƒ_n||_dS)NÚparamT©Ú sanitize_keyrz%BindParameter[typing_Tuple[Any, ...]])r(r-Ú quoted_nameÚ    constructrÉrâr r‹rÓÚ _key_is_anonZ_identifying_keyÚ    _orig_keyrÝrkrrrár­Ú    expand_oprmrrZ_NO_VALUE_IN_LISTZcoerce_compared_valuer—Ú_resolve_value_to_typer"Z_resolve_values_to_typesr)r‡rÓrkrlrÝrárrr­rrmr¯r°rÚ check_valuerprprqÚ__init__µs~
 
 ÿÿû
 
 
 
ÿ 
 
 
þÿþÿzBindParameter.__init__cCsH|j|d}||_d|_|tk    r$|n|j|_|jtjkrDt |¡|_|S)zXReturn a copy of this :class:`.BindParameter` with the given value
        set.
        )råN)    r%rkrr-rár—rr¤r)r‡rkråráZclonedrprprqÚ _with_values   zBindParameter._with_valuercCs|jr| ¡S|jSdS)záReturn the value of this bound parameter,
        taking into account if the ``callable`` parameter
        was set.
 
        The ``callable`` value will be evaluated
        and returned if present, else ``value``.
 
        N)rrkr‘rprprqÚeffective_value%s
zBindParameter.effective_valuerjcCst |¡}d|_|S)ahProduce a copy of this bound parameter that will enable the
        :paramref:`_sql.BindParameter.literal_execute` flag.
 
        The :paramref:`_sql.BindParameter.literal_execute` flag will
        have the effect of the parameter rendered in the compiled SQL
        string using ``[POSTCOMPILE]`` form, which is a special form that
        is converted to be a rendering of the literal value of the parameter
        at SQL execution time.    The rationale is to support caching
        of SQL statement strings that can embed per-statement literal values,
        such as LIMIT and OFFSET parameters, in the final SQL string that
        is passed to the DBAPI.   Dialects in particular may want to use
        this method within custom compilation schemes.
 
        .. versionadded:: 1.4.5
 
        .. seealso::
 
            :ref:`engine_thirdparty_caching`
 
        T)rŒr%rm)r‡r·rprprqÚrender_literal_execute5s
z$BindParameter.render_literal_executecCs$|j|kr| ¡}||_|S|SdSr)rr%)r‡r¹rºr~rprprqr»Ns
 
zBindParameter._negate_in_binarycCst |¡}||_|Sr)rŒr%r—)r‡rlr·rprprqr½Vs
z'BindParameter._with_binary_element_typer@)rår€rncKsFtj|f|Ž}|j |j¡|sB|jrBtjt|ƒ|jp8ddd|_    |S)Nr    Tr
)
rŒr%rÃrçrÝrÉrâr rrÓ)r‡rår€r·rprprqr%[s    
ÿzBindParameter._clonecCs~|jj dd¡}|s(|dk    r$d|t<dS| |¡\}}|rD||jfS|dk    rV| |¡||j|jj|jrr|j    |n|j    |j
fS)NÚ inherit_cacheFT) r²r´rør0Zget_anonrÑr—Z_static_cache_keyrrÓrm)r‡Zanon_maprÒZ _gen_cache_okZid_ÚfoundrprprqÚ_gen_cache_keyls 
 
ûzBindParameter._gen_cache_keycCs,|js(d|_tjt|ƒ|jpddd|_dS)NTr    r
)rÝrÉrâr rrÓr‘rprprqrâƒsÿz BindParameter._convert_to_uniquecCs2|j ¡}|j}|jr&| ¡}d|d<||d<|S)z4execute a deferred value for serialization purposes.Nrrk)r´rµrkr)r‡rÈr®rprprqrɊs
zBindParameter.__getstate__cCs<| dd¡r,tjt|ƒ| dd¡dd|d<|j |¡dS)NrÝFrr    Tr
rÓ)rørÉrâr r´rç©r‡ÚstaterprprqÚ __setstate__•s 
ÿ
zBindParameter.__setstate__cCsd|jj|j|j|jfS)Nz%s(%r, %r, type_=%r))r²r“rÓrkr—r‘rprprqr
œs üzBindParameter.__repr__)F) r“r”r•r–r˜r6Ú dp_anon_nameÚdp_typeÚ dp_plain_dictÚ dp_plain_objÚ
dp_booleanrrrrrrr(r-rrrrrr»r½r%rrârÉrr
rprprprqr²‹sP
û ò(d  r²c@s2eZdZUdZdZdejfgZded<dd„Z    dS)    Ú
TypeClausezTHandle a type keyword in a SQL statement.
 
    Used by the ``Case`` statement.
 
    Ú
typeclauser—rWrcCs
||_dSr©r—r¼rprprqr²szTypeClause.__init__N)
r“r”r•r–r˜r6rrrrrprprprqr"¥s
 
ÿ r"c@seZdZUdZdZdejfdejfgZde    d<dZ
dZ e   de j¡Zd    Zd    Zd    Zed
d œd d „ƒZdd„Zedd œdd„ƒZdZde    d<dZde    d<d    Zedd„ƒZddœdd„Zedddd œd!d"„ƒZe d#¡d$d%d&d'œd(d)„ƒZ ed%d œd*d+„ƒZ!ed,d-„ƒZ"d0d.d/„Z#dS)1Ú
TextClausea€Represent a literal SQL text fragment.
 
    E.g.::
 
        from sqlalchemy import text
 
        t = text("SELECT * FROM users")
        result = connection.execute(t)
 
 
    The :class:`_expression.TextClause` construct is produced using the
    :func:`_expression.text`
    function; see that function for full documentation.
 
    .. seealso::
 
        :func:`_expression.text`
 
    Z
textclauseÚ _bindparamsrtrWrTz(?<![:\w\x5c]):(\w+)(?!:)FzIterable[FromClause]rcCsdS©Nrprpr‘rprprqÚ _hide_fromsëszTextClause._hide_fromscCs
t||ƒSr)r”r-rprprqr.ïszTextClause.__and__rPcCs|fSrrpr‘rprprqr¶ószTextClause._select_iterableNrrÓrcCs
|jdkS©NÚ*©rtr‘rprprqrþszTextClause._is_starrsr+cs&iˆ_‡fdd„}ˆj ||¡ˆ_dS)Ncs(t| d¡ƒˆj| d¡<d| d¡S)Nrz:%s)r²Úgroupr&)Úmr‘rprqÚrepl    sz!TextClause.__init__.<locals>.repl)r&Ú_bind_params_regexÚsubrt)r‡rtr.rpr‘rqr    s zTextClause.__init__rßrr@)ÚbindsÚnames_to_valuesrnc     OsÐ|j ¡|_}|D]R}z||j}Wn4tk
rZ}zt d|j¡|‚W5d}~XYqX|||j<q| ¡D]Z\}}z ||}Wn2tk
r¶}zt d|¡|‚W5d}~XYqpX|j|dd||<qp|S)aéEstablish the values and/or types of bound parameters within
        this :class:`_expression.TextClause` construct.
 
        Given a text construct such as::
 
            from sqlalchemy import text
            stmt = text("SELECT id, name FROM user WHERE name=:name "
                        "AND timestamp=:timestamp")
 
        the :meth:`_expression.TextClause.bindparams`
        method can be used to establish
        the initial value of ``:name`` and ``:timestamp``,
        using simple keyword arguments::
 
            stmt = stmt.bindparams(name='jack',
                        timestamp=datetime.datetime(2012, 10, 8, 15, 12, 5))
 
        Where above, new :class:`.BindParameter` objects
        will be generated with the names ``name`` and ``timestamp``, and
        values of ``jack`` and ``datetime.datetime(2012, 10, 8, 15, 12, 5)``,
        respectively.  The types will be
        inferred from the values given, in this case :class:`.String` and
        :class:`.DateTime`.
 
        When specific typing behavior is needed, the positional ``*binds``
        argument can be used in which to specify :func:`.bindparam` constructs
        directly.  These constructs must include at least the ``key``
        argument, then an optional value and type::
 
            from sqlalchemy import bindparam
            stmt = stmt.bindparams(
                            bindparam('name', value='jack', type_=String),
                            bindparam('timestamp', type_=DateTime)
                        )
 
        Above, we specified the type of :class:`.DateTime` for the
        ``timestamp`` bind, and the type of :class:`.String` for the ``name``
        bind.  In the case of ``name`` we also set the default value of
        ``"jack"``.
 
        Additional bound parameters can be supplied at statement execution
        time, e.g.::
 
            result = connection.execute(stmt,
                        timestamp=datetime.datetime(2012, 10, 8, 15, 12, 5))
 
        The :meth:`_expression.TextClause.bindparams`
        method can be called repeatedly,
        where it will re-use existing :class:`.BindParameter` objects to add
        new information.  For example, we can call
        :meth:`_expression.TextClause.bindparams`
        first with typing information, and a
        second time with value information, and it will be combined::
 
            stmt = text("SELECT id, name FROM user WHERE name=:name "
                        "AND timestamp=:timestamp")
            stmt = stmt.bindparams(
                bindparam('name', type_=String),
                bindparam('timestamp', type_=DateTime)
            )
            stmt = stmt.bindparams(
                name='jack',
                timestamp=datetime.datetime(2012, 10, 8, 15, 12, 5)
            )
 
        The :meth:`_expression.TextClause.bindparams`
        method also supports the concept of
        **unique** bound parameters.  These are parameters that are
        "uniquified" on name at statement compilation time, so that  multiple
        :func:`_expression.text`
        constructs may be combined together without the names
        conflicting.  To use this feature, specify the
        :paramref:`.BindParameter.unique` flag on each :func:`.bindparam`
        object::
 
            stmt1 = text("select id from table where name=:name").bindparams(
                bindparam("name", value='name1', unique=True)
            )
            stmt2 = text("select id from table where name=:name").bindparams(
                bindparam("name", value='name2', unique=True)
            )
 
            union = union_all(
                stmt1.columns(column("id")),
                stmt2.columns(column("id"))
            )
 
        The above statement will render as::
 
            select id from table where name=:name_1
            UNION ALL select id from table where name=:name_2
 
        .. versionadded:: 1.3.11  Added support for the
           :paramref:`.BindParameter.unique` flag to work with
           :func:`_expression.text`
           constructs.
 
        z?This text() construct doesn't define a bound parameter named %rNF)rá)r&rµrÚKeyErrorr:Ú ArgumentErrorr¶r)    r‡r1r2Ú
new_paramsr~Úexistingr¦rÓrkrprprqrÒ     s4hÿÿý  ÿÿýzTextClause.bindparamszsqlalchemy.sql.selectableú_ColumnExpressionArgument[Any]zTypeEngine[Any]rS)ÚcolsÚtypesrncsjtjj}dd„|Dƒ}‡fdd„|Dƒ}dd„ˆ ¡Dƒ}|j |j¡}|j|||t|ƒo`| d|S)a"Turn this :class:`_expression.TextClause` object into a
        :class:`_expression.TextualSelect`
        object that serves the same role as a SELECT
        statement.
 
        The :class:`_expression.TextualSelect` is part of the
        :class:`_expression.SelectBase`
        hierarchy and can be embedded into another statement by using the
        :meth:`_expression.TextualSelect.subquery` method to produce a
        :class:`.Subquery`
        object, which can then be SELECTed from.
 
        This function essentially bridges the gap between an entirely
        textual SELECT statement and the SQL expression language concept
        of a "selectable"::
 
            from sqlalchemy.sql import column, text
 
            stmt = text("SELECT id, name FROM some_table")
            stmt = stmt.columns(column('id'), column('name')).subquery('st')
 
            stmt = select(mytable).\
                    select_from(
                        mytable.join(stmt, mytable.c.name == stmt.c.name)
                    ).where(stmt.c.id > 5)
 
        Above, we pass a series of :func:`_expression.column` elements to the
        :meth:`_expression.TextClause.columns` method positionally.  These
        :func:`_expression.column`
        elements now become first class elements upon the
        :attr:`_expression.TextualSelect.selected_columns` column collection,
        which then
        become part of the :attr:`.Subquery.c` collection after
        :meth:`_expression.TextualSelect.subquery` is invoked.
 
        The column expressions we pass to
        :meth:`_expression.TextClause.columns` may
        also be typed; when we do so, these :class:`.TypeEngine` objects become
        the effective return type of the column, so that SQLAlchemy's
        result-set-processing systems may be used on the return values.
        This is often needed for types such as date or boolean types, as well
        as for unicode processing on some dialect configurations::
 
            stmt = text("SELECT id, name, timestamp FROM some_table")
            stmt = stmt.columns(
                        column('id', Integer),
                        column('name', Unicode),
                        column('timestamp', DateTime)
                    )
 
            for id, name, timestamp in connection.execute(stmt):
                print(id, name, timestamp)
 
        As a shortcut to the above syntax, keyword arguments referring to
        types alone may be used, if only type conversion is needed::
 
            stmt = text("SELECT id, name, timestamp FROM some_table")
            stmt = stmt.columns(
                        id=Integer,
                        name=Unicode,
                        timestamp=DateTime
                    )
 
            for id, name, timestamp in connection.execute(stmt):
                print(id, name, timestamp)
 
        The positional form of :meth:`_expression.TextClause.columns`
        also provides the
        unique feature of **positional column targeting**, which is
        particularly useful when using the ORM with complex textual queries. If
        we specify the columns from our model to
        :meth:`_expression.TextClause.columns`,
        the result set will match to those columns positionally, meaning the
        name or origin of the column in the textual SQL doesn't matter::
 
            stmt = text("SELECT users.id, addresses.id, users.id, "
                 "users.name, addresses.email_address AS email "
                 "FROM users JOIN addresses ON users.id=addresses.user_id "
                 "WHERE users.id = 1").columns(
                    User.id,
                    Address.id,
                    Address.user_id,
                    User.name,
                    Address.email_address
                 )
 
            query = session.query(User).from_statement(stmt).options(
                contains_eager(User.addresses))
 
        The :meth:`_expression.TextClause.columns` method provides a direct
        route to calling :meth:`_expression.FromClause.subquery` as well as
        :meth:`_expression.SelectBase.cte`
        against a textual SELECT statement::
 
            stmt = stmt.columns(id=Integer, name=String).cte('st')
 
            stmt = select(sometable).where(sometable.c.id == stmt.c.id)
 
        :param \*cols: A series of :class:`_expression.ColumnElement` objects,
         typically
         :class:`_schema.Column` objects from a :class:`_schema.Table`
         or ORM level
         column-mapped attributes, representing a set of columns that this
         textual string will SELECT from.
 
        :param \**types: A mapping of string names to :class:`.TypeEngine`
         type objects indicating the datatypes to use for names that are
         SELECTed from the textual string.  Prefer to use the ``*cols``
         argument as it also indicates positional ordering.
 
        cSsg|]}t tj|¡‘qSrp)rrorÚLabeledColumnExprRole©r¬Úcolrprprqr¼
sz&TextClause.columns.<locals>.<listcomp>cs.g|]&}|jˆkr&t|jˆ |j¡ƒn|‘qSrp)rÓrwrÇr;©r9rprqr¼
 
sþÿcSsg|]\}}t||ƒ‘qSrprv)r¬rÓrlrprprqr¼
s)Ú
positional)r<r‚Zsql_selectabler¶rSr³Ú_initri)r‡r8r9rÐZ
input_colsZpositional_input_colsZkeyed_input_colsÚelemrpr=rqrÔ‘    s"sÿ
üÿ ýzTextClause.columnscCstjSrr£r‘rprprqr—
szTextClause.typecCs |j |¡Sr)r—r¥r‘rprprqr§ 
szTextClause.comparatorcCs|tjkrt|ƒS|SdSr)rZin_oprŸrïrprprqrð&
s
zTextClause.self_group)N)$r“r”r•r–r˜r6Zdp_string_clauseelement_dictÚ    dp_stringrrrrÚrer‰ÚUNICODEr/rörôrórr(r.r¶rÓrrõrrr'rÒr<ršrÔr—r§rðrprprprqr%¶sB
þ   
  
r%c@sJeZdZUdZdZgZded<ded<ejdd„ƒZ    e
ddœd    d
„ƒZ d S) ÚNullz†Represent the NULL keyword in a SQL statement.
 
    :class:`.Null` is accessed as a constant via the
    :func:`.null` function.
 
    ÚnullrWrÚ
_singletoncCstjSrr£r‘rprprqr—:
sz    Null.typercCstjS)z+Return a constant :class:`.Null` construct.)rDrF©ÚclsrprprqÚ    _instance>
szNull._instanceN) r“r”r•r–r˜rrr<r r—Ú classmethodrIrprprprqrD-
s
 
rDc@sXeZdZUdZdZgZded<ded<ejdd„ƒZ    dd    œd
d „Z
e dd    œd d „ƒZ dS)ÚFalse_zžRepresent the ``false`` keyword, or equivalent, in a SQL statement.
 
    :class:`.False_` is accessed as a constant via the
    :func:`.false` function.
 
    ÚfalserWrrFcCstjSr©rr™r‘rprprqr—V
sz False_.typeÚTrue_rcCstjSr©rNrFr‘rprprqrûZ
szFalse_._negatecCstjSr©rKrFrGrprprqrI]
szFalse_._instanceN) r“r”r•r–r˜rrr<r r—rûrJrIrprprprqrKH
s
 
rKc@sleZdZUdZdZgZded<ded<ejdd„ƒZ    dd    œd
d „Z
e d d dœdd„ƒZ e dd    œdd„ƒZ dS)rNz›Represent the ``true`` keyword, or equivalent, in a SQL statement.
 
    :class:`.True_` is accessed as a constant via the
    :func:`.true` function.
 
    ÚtruerWrrFcCstjSrrMr‘rprprqr—r
sz
True_.typerKrcCstjSrrPr‘rprprqrûv
sz True_._negateúOptional[ColumnElement[Any]]rr,cCs|dkr| ¡S|SdSr)rI)rHrérprprqÚ_ifnoney
sz True_._ifnonecCstjSrrOrGrprprqrI‚
szTrue_._instanceN)r“r”r•r–r˜rrr<r r—rûrJrSrIrprprprqrNe
s
 
rNc@sÐeZdZUdZdZdZdejfdejfgZ    de
d<de
d<e j dde jd    œd
d d d d dœdd„Zed'd dddœdd„ƒZddœdd„Zddœdd„Zeddœdd„ƒZd d!„Zejd"dœd#d$„ƒZd(d%d&„ZdS))Ú
ClauseListzzDescribe a list of clauses, separated by an operator.
 
    By default, is comma-separated, such as a column listing.
 
    Z
clauselistTÚclausesrÿrWrrˆ)rÿr,Úgroup_contentsÚ_literal_as_text_roler7rKrizType[roles.SQLRole])rUrÿr,rVrWcsf|ˆ_|ˆ_|ˆ_|}|‰ˆˆ_ˆjr>‡‡fdd„|Dƒˆ_n‡‡fdd„|Dƒˆ_t ˆj¡ˆ_dS)Ncs&g|]}tjˆ|ˆdjˆjd‘qS)©Úapply_propagate_attrsrý)rrorðrÿ©r¬r›©r‡Ztext_converter_rolerprqr¼´
sýÿþz'ClauseList.__init__.<locals>.<listcomp>csg|]}tjˆ|ˆd‘qS©rX)rrorZr[rprqr¼»
s ýÿ)rÿr,rVÚ_text_converter_rolerUrÚ
is_booleanrö)r‡rÿr,rVrWrUZclauses_iteratorrpr[rqr¤
s ü
 üzClauseList.__init__NrΩrÿrUrncCs8| |¡}|rt|ƒng|_d|_||_d|_d|_|S)NTF)r³rÂrUr,rÿrVrö©rHrÿrUr‡rprprqÚ_construct_rawÃ
s
zClauseList._construct_rawúIterator[ColumnElement[Any]]rcCs
t|jƒSr©ÚiterrUr‘rprprqÚ__iter__Ñ
szClauseList.__iter__r$cCs
t|jƒSr©ÚlenrUr‘rprprqÚ__len__Ô
szClauseList.__len__rPcCstj dd„|jDƒ¡S)NcSsg|]
}|j‘qSrp)r¶)r¬r@rprprqr¼Ú
sz/ClauseList._select_iterable.<locals>.<listcomp>)r¾r¿Ú from_iterablerUr‘rprprqr¶×
sÿzClauseList._select_iterablecCsB|jr(|j t |j|¡j|jd¡n|j t |j|¡¡dS©Nrý)rVrUrÑrror]rðrÿ©r‡r›rprprqrÑÝ
sÿÿ ÿzClauseList.appendr§cCsttjdd„|jDƒŽƒS)NcSsg|]
}|j‘qSrp©r¨r·rprprqr¼ë
sz,ClauseList._from_objects.<locals>.<listcomp>©rÂr¾r¿rUr‘rprprqr¨é
szClauseList._from_objectscCs$|jrt |j|¡rt|ƒS|SdSr)r,rÚ is_precedentrÿrŸrïrprprqrðí
szClauseList.self_group)N)N)r“r”r•r–r˜rr6Zdp_clauseelement_listÚ dp_operatorrrrZcomma_oprÚWhereHavingRolerrJrarerhrr¶rÑr<rr¨rðrprprprqrTŠ
s.
þ úý  rTc
@s|eZdZUdZded<ded<dZded<ed    d
„ƒZdd d „Zeddœdd„ƒZ    e
d d dœddddddddœdd„ƒZ d S)ÚOperatorExpressionz[base for expressions that contain an operator and operands
 
    .. versionadded:: 2.0
 
    rKrÿr¢r—Trir,cCs t |j¡Sr)rr'rÿr‘rprprqr' sz OperatorExpression.is_comparisonNcCs:|jrt |j|¡s*|tjkr2t |j¡s2t|ƒS|SdSr)r,rrnrÿrr^rŸrïrprprqrð sÿ þù
ø zOperatorExpression.self_groupú%typing_Tuple[ColumnElement[Any], ...]rcCs
tƒ‚dSrrúr‘rprprqÚ_flattened_operator_clauses sz.OperatorExpression._flattened_operator_clauses)ÚnegateÚ    modifiersrrìrÛzOperatorExpression[_T])ÚleftÚrightr rlrtrurnc
Cs®t |¡rš|dks td|›ƒ‚d}t|ddƒ|krL| |j¡rLd}|j}n|f}t|ddƒ|krz| |j¡rzd}|j}    n|f}    |rštj||f||    žŽSt    ||||||dS)Nz.negate not supported for associative operator FrÿT)rlrtru)
rZis_associativerr‘Z_compare_type_affinityr—rsÚExpressionClauseListÚ_construct_for_listÚBinaryExpression)
rHrvrwr rlrtruZmultiZleft_flattenedZright_flattenedrprprqÚ_construct_for_op sZ
ÿþÿþ
þÿþ
þþýÿz$OperatorExpression._construct_for_op)N) r“r”r•r–rr,rr'rðrsrJr{rprprprqrqô
s
 
 
ørqc@sìeZdZUdZdZdejfdejfgZde    d<de    d<de    d    <d
d œd d ddœdd„Z
e ddœdd„ƒZ ddœdd„Z ddœdd„Ze ddœdd„ƒZejddœdd „ƒZd!d"d#œd$d%„Zed&d'œd d(d!dd)d*œd+d,„ƒZd-dœd.d/„Zd
S)0rxa9Describe a list of clauses, separated by an operator,
    in a column expression context.
 
    :class:`.ExpressionClauseList` differs from :class:`.ClauseList` in that
    it represents a column-oriented DQL expression only, not an open ended
    list of anything comma separated.
 
    .. versionadded:: 2.0
 
    Úexpression_clauselistrUrÿrWrrrrir,N©rlrKr7rh)rÿrUrlcs<|ˆ_t‡fdd„|Dƒƒˆ_t ˆj¡ˆ_t |¡ˆ_dS)Nc3s |]}tjtj|ˆdVqdS)rXN©rrorÚExpressionElementRolerZr‘rprqr¸f s ýÿz0ExpressionClauseList.__init__.<locals>.<genexpr>)    rÿr÷rUrr^rörÚ to_instancer—)r‡rÿrlrUrpr‘rqr^ s  ü
zExpressionClauseList.__init__rcCs|jSr©rUr‘rprprqrso sz0ExpressionClauseList._flattened_operator_clausesrbcCs
t|jƒSrrcr‘rprprqreu szExpressionClauseList.__iter__r$cCs
t|jƒSrrfr‘rprprqrhx szExpressionClauseList.__len__rPcCs|fSrrpr‘rprprqr¶{ sz%ExpressionClauseList._select_iterabler§cCsttjdd„|jDƒŽƒS)NcSsg|]
}|j‘qSrprlr·rprprqr¼ sz6ExpressionClauseList._from_objects.<locals>.<listcomp>rmr‘rprprqr¨ sz"ExpressionClauseList._from_objectsrrà©r›rncCs|j|f7_dSrrrkrprprqÚ_append_inplaceƒ sz$ExpressionClauseList._append_inplaceT)r,r¢zExpressionClauseList[_T])rÿrlrUr,rncsD| |¡}||_|r.t‡fdd„|Dƒƒ|_n||_ˆ|_||_|S)Nc3s|]}|jˆdVqdS)rýN©rðr·rþrprqr¸‘ sz;ExpressionClauseList._construct_for_list.<locals>.<genexpr>)r³r,r÷rUrÿr—)rHrÿrlr,rUr‡rprþrqry† s
 ÿ z(ExpressionClauseList._construct_for_listrcCs,|jtjd}t|tƒst‚t|tjddSr rrrprprqrûš sÿzExpressionClauseList._negate)r“r”r•r–r˜r6Zdp_clauseelement_tuplerorrrrrsrerhr¶r<rr¨rƒrJryrûrprprprqrxG s,
 þ üûrxc
sâeZdZdZdZdd„Zedddddd    œd
d „ƒZeej    fddddddd d œdd„ƒZ
edddœdd„ƒZ ed(ddddœdd„ƒZ eej    fddddœdd„ƒZ eej    fddddœd d!„ƒZed"d#œd$d%„ƒZd)‡fd&d'„    Z‡ZS)*r+r|TcOs tdƒ‚dS)Nz+BooleanClauseList has a private constructorrú)r‡Úargr€rprprqr¦ sÿzBooleanClauseList.__init__rKrzIterable[ColumnElement[Any]]z+typing_Tuple[int, List[ColumnElement[Any]]])rÿÚ continue_onÚskip_onrUrnc    sŠd}g}tj‰d}|D]F}||kr(|}q||kr@|g}d}q^q|sJd}n|‰d}| |¡q|st|dk    rt|g}d}|‡fdd„|DƒfS)Nrrr9csg|]}|jˆd‘qS)rýr„r·rýrprqr¼Ô szBBooleanClauseList._process_clauses_for_boolean.<locals>.<listcomp>)rr–rÑ)    rHrÿr†r‡rUZhas_continue_onÚconvert_clausesÚlccr›rprýrqÚ_process_clauses_for_boolean« s(  z.BooleanClauseList._process_clauses_for_booleanr)rÿr†r‡Úinitial_clauserUr€rnc sÖ|tjkrjˆj}tjd|›d|›d|›d|tjkr6dnd›d|›d|tjkrPdnd    ›d
 d d | ˆ¡S| ˆ||d d„t     |f|¡Dƒ¡\}}    |dkrÂt
j   ‡fdd„|    Dƒ¡}
| ˆ|
¡S|sÊt ‚|    dSdS)Nz    Invoking z_() without arguments is deprecated, and will be disallowed in a future release.   For an empty z() construct, use 'ú(ztrue()zfalse()z, *args)' or 'ÚTrueÚFalsez
, *args)'.ræ)ÚversioncSsg|]}t tj|¡‘qSrp)rrorrprZrprprqr¼÷ sÿz0BooleanClauseList._construct.<locals>.<listcomp>rc3s4|],}t|ddƒˆkr&dd„|jDƒn|fVqdS)rÿNcss|]
}|VqdSrrpr·rprprqr¸ sz9BooleanClauseList._construct.<locals>.<genexpr>.<genexpr>)r‘rs)r¬Zto_flatrþrprqr¸ sþÿz/BooleanClauseList._construct.<locals>.<genexpr>r)r(r-r“r<Zwarn_deprecatedrNrFrarŠZcoerce_generator_argr¾r¿rir) rHrÿr†r‡r‹rUr€rr‰rˆZflattened_clausesrprþrqÚ
_constructÖ s8
 
ÿ
ÿ÷
ÿþü ü zBooleanClauseList._constructúOptional[ColumnElement[bool]])rUrncCsVtjtjtj}}}| ||||¡\}}|dkr>| ||¡S|dkrN|dSdSdS)Nrr)rr”rNrFrKrŠra)rHrUrÿr†r‡r‰rˆrprprqÚ_construct_for_whereclause sý
ü z,BooleanClauseList._construct_for_whereclauseNrÎr_cCs:| |¡}|rt|ƒnd|_d|_||_tj|_d|_|S)NrpT)    r³r÷rUr,rÿrr™r—rör`rprprqra- s
z BooleanClauseList._construct_rawz=Union[Literal[True], _ColumnExpressionArgument[bool], _NoArg]ú_ColumnExpressionArgument[bool]r£)r‹rUrncGs|jtjtjtj|f|žŽS)zwProduce a conjunction of expressions joined by ``AND``.
 
        See :func:`_sql.and_` for full documentation.
        )rrr”rNrFrK©rHr‹rUrprprqr”; s üûzBooleanClauseList.and_z>Union[Literal[False], _ColumnExpressionArgument[bool], _NoArg]cGs|jtjtjtj|f|žŽS)zuProduce a conjunction of expressions joined by ``OR``.
 
        See :func:`_sql.or_` for full documentation.
        )rrr•rKrFrNr”rprprqr•O s üûzBooleanClauseList.or_rPrcCs|fSrrpr‘rprprqr¶c sz"BooleanClauseList._select_iterablecs|js
|Stƒj|dSdSrj)rUrÿrðrïr¾rprqrðg szBooleanClauseList.self_group)N)N)r“r”r•r˜rrrJrŠr(r-rr’rar”r•rr¶rðrrprpr¾rqr+¢ s,*û:ý üür+cs~eZdZUdZdZejgZded<ded<e     d¡dd    œd
d d œ‡fd d„ƒZ
e ddœdd„ƒZ ddd„Z ddd„Z‡ZS)rzRepresent a SQL tuple.r÷rWrrTr—zsqlalchemy.sql.sqltypesNr=r7z,Optional[Sequence[_TypeEngineArgument[Any]]])rUr9cs€tjj}|dkr dd„|Dƒ}n:t|ƒt|ƒkrFt dt|ƒ|f¡‚dd„t||ƒDƒ}|jdd„|DƒŽ|_t    ƒj
|ŽdS)NcSsg|]}t tj|¡‘qSrpr~r·rprprqr¼† sÿz"Tuple.__init__.<locals>.<listcomp>z*Wrong number of elements for %d-tuple: %r cSs,g|]$\}}tjtj||js |ndd‘qS©Nr})rrorrÚ_isnull)r¬Útypr·rprprqr¼ s û ýcSsg|]
}|j‘qSrpr$)r¬r…rprprqr¼™ s) r<r‚Z sql_sqltypesrgr:r4ÚziprTr—rÿr)r‡r9rUÚsqltypesZ init_clausesr¾rprqr} s þ
ÿÿú    zTuple.__init__rPrcCs|fSrrpr‘rprprqr¶œ szTuple._select_iterableFc    sB|rtd|ˆddˆ|jdSt‡‡fdd„t||jjƒDƒŽSdS)NT)rkr¯rÝr­rlr°c
s$g|]\}}td|ˆ|dˆd‘qS)NT)r¯r°rÝrl)r²)r¬ÚoZcompared_to_type©rÿrlrprqr¼­ s    øúz%Tuple._bind_param.<locals>.<listcomp>)r²r—rr˜r9r³rpr›rqr´  sù
      ÷ÿzTuple._bind_paramcCs|Srrprïrprprqrðº szTuple.self_group)NF)N)r“r”r•r–r˜rTrrr<ršrrr¶r´rðrrprpr¾rqrr s
ÿ
ý
r.c@s€eZdZUdZdZdejfdejfdejfgZde    d<de    d<d    e    d<d
e    d<d d d œd dddœdd„Z
e j ddœdd„ƒZ d S)ÚCasea:Represent a ``CASE`` expression.
 
    :class:`.Case` is produced using the :func:`.case` factory function,
    as in::
 
        from sqlalchemy import case
 
        stmt = select(users_table).                    where(
                        case(
                            (users_table.c.name == 'wendy', 'W'),
                            (users_table.c.name == 'jack', 'J'),
                            else_='E'
                        )
                    )
 
    Details on :class:`.Case` usage is at :func:`.case`.
 
    .. seealso::
 
        :func:`.case`
 
    ÚcaserkÚwhensÚelse_rWrz:List[typing_Tuple[ColumnElement[bool], ColumnElement[_T]]]r…rRN)rkrŸzLUnion[typing_Tuple[_ColumnExpressionArgument[bool], Any], Mapping[Any, Any]]z Optional[Any])ržrkrŸcs²t dd|¡}zt |¡}Wntk
r0YnX‡fdd„|Dƒ}|rX|ddj}nd}|dkrldˆ_nt tj    |¡ˆ_t
t |ƒˆ_|ˆ_ |dk    r¨t tj    |¡ˆ_ ndˆ_ dS)Nržrcs4g|],\}}tjtj|ˆd ¡t tj|¡f‘qSr\)rrorrrð)r¬r·Úrr‘rprqr¼ø s    ùý úz!Case.__init__.<locals>.<listcomp>éÿÿÿÿ)rZ!_expression_collection_was_a_listr<Zdictlike_iteritemsrr—rkrorrrraržrŸ)r‡rkrŸržZ    new_whensZwhenlistrlrpr‘rqrç s.    ÿ
    ÷  z Case.__init__r§rcCsttjdd„| ¡DƒŽƒS)NcSsg|]
}|j‘qSrprl)r¬Úxrprprqr¼ sz&Case._from_objects.<locals>.<listcomp>)rÂr¾r¿r¦r‘rprprqr¨ sÿzCase._from_objects)r“r”r•r–r˜r6Údp_clauseelementZdp_clauseelement_tuplesrrrr<rr¨rprprprqrœ¿ s
ý     ù/rœc@szeZdZUdZdZdejfdejfgZde    d<de    d<de    d<d    e    d
<d d d œdd„Z
e j ddœdd„ƒZ edd„ƒZdS)r×a4Represent a ``CAST`` expression.
 
    :class:`.Cast` is produced using the :func:`.cast` factory function,
    as in::
 
        from sqlalchemy import cast, Numeric
 
        stmt = select(cast(product_table.c.unit_price, Numeric(10, 4)))
 
    Details on :class:`.Cast` usage is at :func:`.cast`.
 
    .. seealso::
 
        :ref:`tutorial_casts`
 
        :func:`.cast`
 
        :func:`.type_coerce` - an alternative to CAST that coerces the type
        on the Python side only, which is often sufficient to generate the
        correct SQL and data coercion.
 
    rr›r—rWrrr¢r"r#r7ú_TypeEngineArgument[_T]©rµrlcCs4t |¡|_tjtj||j|d|_t|jƒ|_    dS©N)rlrY)
rr€r—rrorrr›r"r#©r‡rµrlrprprqr@ s üz Cast.__init__r§rcCs|jjSr©r›r¨r‘rprprqr¨N szCast._from_objectscCs|jSr©r›r‘rprprqrüR szCast.wrapped_column_expressionN)r“r”r•r–r˜r6r£rrrrr<rr¨rrürprprprqr× s
þ r×c@sŠeZdZUdZdZdejfdejfgZde    d<de    d<de    d<d    d
d œd d „Z
e j ddœdd„ƒZ ejdd„ƒZedd„ƒZddd„ZdS)Ú
TypeCoerceaRepresent a Python-side type-coercion wrapper.
 
    :class:`.TypeCoerce` supplies the :func:`_expression.type_coerce`
    function; see that function for usage details.
 
    .. seealso::
 
        :func:`_expression.type_coerce`
 
        :func:`.cast`
 
    Z type_coercer›r—rWrrr¢r7r¤r¥cCs(t |¡|_tjtj||j|d|_dSr¦)rr€r—rrorrr›r§rprprqro s üzTypeCoerce.__init__r§rcCs|jjSrr¨r‘rprprqr¨| szTypeCoerce._from_objectscCs,t|jtƒr"|j ¡}|j|_|S|jSdSr)r‹r›r²r%r—)r‡ZbprprprqÚtyped_expression€ s
 
zTypeCoerce.typed_expressioncCs|jSrr©r‘rprprqrü‰ sz$TypeCoerce.wrapped_column_expressionNcCs,|jj|d}||jk    r$t||jƒS|SdSrj)r›rðrªr—)r‡rîrrprprqrð s
 zTypeCoerce.self_group)N)r“r”r•r–r˜r6r£rrrrr<rr¨r+rr«rrürðrprprprqrªW s
 þ  
 
rªc@sfeZdZUdZdZdejfdejfgZde    d<de    d<de    d<dd    d
œd d „Z
e j d dœdd„ƒZ dS)ÚExtractz=Represent a SQL EXTRACT clause, ``extract(field FROM expr)``.ÚextractÚexprÚfieldrWrrrsr7)r¯r®cCs"tj|_||_t tj|¡|_dSr)    rÚ INTEGERTYPEr—r¯rrorrr®)r‡r¯r®rprprqr¢ szExtract.__init__r§rcCs|jjSr)r®r¨r‘rprprqr¨§ szExtract._from_objectsN)r“r”r•r–r˜r6r£rArrrr<rr¨rprprprqr¬• s
þ r¬c@sTeZdZUdZdZdejfgZded<ded<ddœdd    „Z    e
j d
d œd d „ƒZ dS)Ú_label_referenceaÇWrap a column expression as it appears in a 'reference' context.
 
    This expression is any that includes an _order_by_label_element,
    which is a Label, or a DESC / ASC construct wrapping a Label.
 
    The production of _label_reference() should occur when an expression
    is added to this context; this includes the ORDER BY or GROUP BY of a
    SELECT statement, as well as a few other places, such as the ORDER BY
    within an OVER clause.
 
    Zlabel_referenceÚelementrWrr0©r²cCs
||_dSrr³©r‡r²rprprqrÁ sz_label_reference.__init__r§rcCsgSrrpr‘rprprqr¨Ä sz_label_reference._from_objectsN) r“r”r•r–r˜r6r£rrrr<rr¨rprprprqr±¬ s
 ÿ r±c@sHeZdZUdZdejfgZded<ddœdd„Ze    j
d    d
œd d „ƒZ d S)Ú_textual_label_referenceZtextual_label_referencer²rWrrsr³cCs
||_dSrr³r´rprprqrÐ sz!_textual_label_reference.__init__r%rcCs
t|jƒSr)r%r²r‘rprprqÚ _text_clauseÓ sz%_textual_label_reference._text_clauseN) r“r”r•r˜r6rArrrr<r r¶rprprprqrµÉ s
ÿ rµc@s
eZdZUdZdZdejfdejfdejfgZde    d<de    d<d.d d d d ddœdd„Z
e dddœdd„ƒZ e dddœdd„ƒZ e dddœdd„ƒZe dddœdd„ƒZe dddœdd „ƒZe dddœd!d"„ƒZed#d$œd%d&„ƒZejd'd$œd(d)„ƒZd*d+„Zd/d,d-„Zd    S)0raÏDefine a 'unary' expression.
 
    A unary expression has a single column expression
    and an operator.  The operator can be placed on the left
    (where it is called the 'operator') or right (where it is called the
    'modifier') of the column expression.
 
    :class:`.UnaryExpression` is the basis for several unary operators
    including those used by :func:`.desc`, :func:`.asc`, :func:`.distinct`,
    :func:`.nulls_first` and :func:`.nulls_last`.
 
    Zunaryr²rÿÚmodifierrWrrŒNFrrìrhri)r²rÿr·rlr¡cCs@||_||_|j|_|j|jp"|jd|_t |¡|_||_dSrj)    rÿr·rœrðr²rr€r—r¡)r‡r²rÿr·rlr¡rprprqrð s
ÿ zUnaryExpression.__init__ú_ColumnExpressionArgument[_T]r9)ÚcolumnrncCstt tj|¡tjddS©NF)r·r¡)rrrorÚByOfRolerZnulls_first_op©rHr¹rprprqÚ_create_nulls_firsts
 ýz#UnaryExpression._create_nulls_firstcCstt tj|¡tjddSrº)rrrorr»rZ nulls_last_opr¼rprprqÚ_create_nulls_lasts
 ýz"UnaryExpression._create_nulls_lastz'_ColumnExpressionOrStrLabelArgument[_T]cCstt tj|¡tjddSrº)rrrorr»rÚdesc_opr¼rprprqÚ _create_descs
 ýzUnaryExpression._create_desccCstt tj|¡tjddSrº)rrrorr»rÚasc_opr¼rprprqÚ _create_asc%s
 ýzUnaryExpression._create_asc©r®rncCs"t tj|¡}t|tj|jddS©NF©rÿrlr¡)rrorrrrZ distinct_opr—©rHr®Zcol_exprrprprqÚ_create_distinct0sÿüz UnaryExpression._create_distinctcCs"t tj|¡}t|tj|jddSrÄ)rrorrrrZbitwise_not_opr—rÆrprprqÚ_create_bitwise_not?sÿüz#UnaryExpression._create_bitwise_notr rcCs"|jtjtjfkr|jjSdSdSr)r·rr¿rÁr²r¡r‘rprprqr¡Nsz'UnaryExpression._order_by_label_elementr§cCs|jjSr©r²r¨r‘rprprqr¨UszUnaryExpression._from_objectscCs>|jjtjjkr0t|jtjdtjtj|jdSt     
|¡SdS)NrýrÅ) r—r˜rr™rrðrrr¡rŒrûr‘rprprqrûYs üzUnaryExpression._negatecCs$|jrt |j|¡rt|ƒS|SdSr)rÿrrnrŸrïrprprqrðdszUnaryExpression.self_group)NNNF)N)r“r”r•r–r˜r6r£rorrrrJr½r¾rÀrÂrÇrÈrr¡r<rr¨rûrðrprprprqrØ s<
 ý ú
 
    
 rc@sLeZdZdZdZedddœdd„ƒZedddœdd    „ƒZd
d „Zd d „Z    dS)ÚCollectionAggregatea Forms the basis for right-hand collection operator modifiers
    ANY and ALL.
 
    The ANY and ALL keywords are available in different ways on different
    backends.  On PostgreSQL, they only work for an ARRAY type.  On
    MySQL, they only work for subqueries.
 
    Tr¸zCollectionAggregate[bool]rÃcCs*t tj|¡}| ¡}t|tjtj    ddSrÄ)
rrorrrðrÊrrrr™rÆrprprqÚ _create_anywsþüzCollectionAggregate._create_anycCs*t tj|¡}| ¡}t|tjtj    ddSrÄ)
rrorrrðrÊrržrr™rÆrprprqÚ _create_all‡sþüzCollectionAggregate._create_allcOs>t |¡st d¡‚d|d<|d<|jjt |¡f|ž|ŽS)Nú2Only comparison operators may be used with ANY/ALLTÚreverseZ _any_all_expr)rr'r:r4r§r"Zmirrorr!rprprqr"šs 
ÿzCollectionAggregate.operatecKst |¡rt‚t d¡‚dS)NrÍ)rr'rr:r4r!rprprqr#¢sÿz#CollectionAggregate.reverse_operateN)
r“r”r•r–rrJrËrÌr"r#rprprprqrÊks    rÊc@s6eZdZdZdd„Zedd„ƒZd dd„Zd    d
„ZdS) ršTcCs2||_tj|_||_||_d|_d|_|j|_dS©NT)    r²rr™r—rÿrtr·r¡rö)r‡r²rÿrtrprprqr­szAsBoolean.__init__cCs|jSrr³r‘rprprqrü¶sz#AsBoolean.wrapped_column_expressionNcCs|SrrprïrprprqrðºszAsBoolean.self_groupcCs0t|jttfƒr|j ¡St|j|j|jƒSdSr)r‹r²rNrKrûršrtrÿr‘rprprqrû½s
zAsBoolean._negate)N)    r“r”r•rrrrürðrûrprprprqršªs     
 
ršcseZdZUdZdZdejfdejfdejfdejfdejfdej    fgZ
d    e d
<dejfdejfdejfdejfdej    fgZ d Z d e d<d e d<d e d<d$d d dddd dœdd„Zeddœdd„ƒZdd„Zejràdddœdd„Zejddœd d!„ƒZ‡fd"d#„Z‡ZS)%rzaÍRepresent an expression that is ``LEFT <operator> RIGHT``.
 
    A :class:`.BinaryExpression` is generated automatically
    whenever two column expressions are used in a Python binary expression:
 
    .. sourcecode:: pycon+sql
 
        >>> from sqlalchemy.sql import column
        >>> column('a') + column('b')
        <sqlalchemy.sql.expression.BinaryExpression object at 0x101029dd0>
        >>> print(column('a') + column('b'))
        {printsql}a + b
 
    Úbinaryrvrwrÿrtrur—rWrTrÛrNrKrhrì)rvrwrÿrlrtrucCsŽt|tƒrt |¡}| ¡| ¡f|_|jp0|j|_|j|d|_|j|d|_    ||_
t   |¡|_ ||_t |¡|_|dkr„i|_n||_dSrj)r‹rsrZ    custom_opÚ__hash__Ú_origrœrðrvrwrÿrr€r—rtr^röru)r‡rvrwrÿrlrtrurprprqrús
 
  zBinaryExpression.__init__rrrcCs |j|jfSr)rvrwr‘rprprqrssz,BinaryExpression._flattened_operator_clausescCs*|jtjtjfkr|j|jŽStdƒ‚dS)aImplement Python-side "bool" for BinaryExpression as a
        simple "identity" check for the left and right attributes,
        if the operator is "eq" or "ne".  Otherwise the expression
        continues to not support "bool" like all other column expressions.
 
        The rationale here is so that ColumnElement objects can be hashable.
        What?  Well, suppose you do this::
 
            c1, c2 = column('x'), column('y')
            s1 = set([c1, c2])
 
        We do that **a lot**, columns inside of sets is an extremely basic
        thing all over the ORM for example.
 
        So what happens if we do this? ::
 
            c1 in s1
 
        Hashing means it will normally use ``__hash__()`` of the object,
        but in case of hash collision, it's going to also do ``c1 == c1``
        and/or ``c1 == c2`` inside.  Those operations need to return a
        True/False value.   But because we override ``==`` and ``!=``, they're
        going to get a BinaryExpression.  Hence we implement ``__bool__`` here
        so that these comparisons behave in this particular context mostly
        like regular object comparisons.  Thankfully Python is OK with
        that!  Otherwise we'd have to use special set classes for columns
        (which we used to do, decades ago).
 
        rN)rÿrÚeqÚnerÒrr‘rprprqrs zBinaryExpression.__bool__zBinaryExpression[_T]rqcCsdSrrpr‘rprprqrüGszBinaryExpression.__invert__r§cCs|jj|jjSr)rvr¨rwr‘rprprqr¨LszBinaryExpression._from_objectscsD|jdk    r6t|j|j |j|j¡|j|j|j|jdStƒ     ¡SdS)N)rtrlru)
rtrzrvrwr»rÿr—rurÿrûr‘r¾rprqrûPs
ú    zBinaryExpression._negate)NNN)r“r”r•r–r˜r6r£rorrrrr¢rörrrsrrrrür<rr¨rûrrprpr¾rqrzÄsF
þú þù ù&rzc@sNeZdZUdZdZdejfdejfdejfgZded<d d    d
„Z    dd d „Z
dS)ÚSlicez¯Represent SQL for a Python array-slice object.
 
    This is not a specific SQL construct at this level, but
    may be interpreted by specific dialects, e.g. PostgreSQL.
 
    ÚsliceÚstartÚstopÚsteprWrNcCsTtjtj||tjd|_tjtj||tjd|_tjtj||tjd|_tj    |_
dS)N)rrl) rrorrrr°r×rØrÙr¤r—)r‡r×rØrÙÚ_namerprprqrns&üüüzSlice.__init__cCs|tjkst‚|Sr)rÿÚgetitemrrïrprprqrðƒszSlice.self_group)N)N) r“r”r•r–r˜r6r£rrrrðrprprprqrÕ^s
ý 
rÕc@seZdZdZdZdS)ÚIndexExpressionzJRepresent the class of expressions that are like an "index"
    operation.TN)r“r”r•r–rrprprprqr܈srÜc@s0eZdZUdZdZded<d
dd„Zdd    „ZdS) ÚGroupedElementz&Represent any parenthesized expressionÚgroupingrŒr²NcCs|Srrprïrprprqrð–szGroupedElement.self_groupcCs
|j ¡Sr)r²rñr‘rprprqrñ™szGroupedElement._ungroup)N)r“r”r•r–r˜rrðrñrprprprqrݏs
 
 
rÝc@sºeZdZUdZdejfdejfgZded<dejfgZ    ded<ddœdd    „Z
d
d „Z e j d d „ƒZe jddœdd„ƒZe jddœdd„ƒZe jddœdd„ƒZdd„Zdd„Zdd„ZdS)rŸz/Represent a grouping within a column expressionr²r—rWrz0Union[TextClause, ClauseList, ColumnElement[_T]]r³cCs||_t|dtjƒ|_dS)Nr—)r²r‘rr¤r—r´rprprqr«szGrouping.__init__cCs| |j |¡¡Sr)r²r²r½r¼rprprqr½³sz"Grouping._with_binary_element_typecCs|jjSr©r²rör‘rprprqrö¶szGrouping._is_implicitly_booleanrrcCst|jddƒp|jSrï)r‘r²rÒr‘rprprqrŠºsÿzGrouping._tq_labelrˆcCst|jtƒr|jgSgSdSr)r‹r²rr‘rprprqr‰Às zGrouping._proxiesr§cCs|jjSrrÉr‘rprprqr¨ÇszGrouping._from_objectscCs t|j|ƒSr)r‘r²)r‡Úattrrprprqr¨ËszGrouping.__getattr__cCs|j|jdœS)N©r²r—rár‘rprprqrÉÎszGrouping.__getstate__cCs|d|_|d|_dS)Nr²r—rárrprprqrÑs
zGrouping.__setstate__N)r“r”r•r–r6r£rrrr¢rr½r<r rörrŠr‰rr¨r¨rÉrrprprprqrŸs(
þ ÿ
rŸc@seZdZdZdZdS)Ú
_OverRangerrN)r“r”r•ÚRANGE_UNBOUNDEDÚ RANGE_CURRENTrprprprqrâÖsrâc@sÄeZdZUdZdZdejfdejfdejfdejfdejfgZde    d    <d
Z
d e    d<d
Z d e    d<d e    d<d e    d<d d dddddœdd„Z dd„Z dddœdd„Zejdd„ƒZejddœdd„ƒZd
S)!ÚOveraRepresent an OVER clause.
 
    This is a special operator against a so-called
    "window" function, as well as any aggregate function,
    which produces results relative to the result set
    itself.  Most modern SQL backends now support window functions.
 
    Úoverr²Úorder_byÚ partition_byÚrange_ÚrowsrWrNúOptional[ClauseList]r0z Optional[typing_Tuple[int, int]]úYOptional[Union[Iterable[_ColumnExpressionArgument[Any]], _ColumnExpressionArgument[Any]]]ú4Optional[typing_Tuple[Optional[int], Optional[int]]])r²rèrçrérêcCs–||_|dk    r&tt |¡dtjiŽ|_|dk    rFtt |¡dtjiŽ|_|rn| |¡|_    |rft
  d¡‚q’d|_ n$|r†| |¡|_ d|_    n d|_ |_    dS)NrWz*'range_' and 'rows' are mutually exclusive) r²rTr<Úto_listrr»rçrèÚ_interpret_rangerér:r4rê)r‡r²rèrçrérêrprprqrüs0ÿÿÿþ ÿ z Over.__init__cCs|j|j|j|j|j|jffSr)r²r²rèrçrérêr‘rprprqÚ
__reduce__'sûzOver.__reduce__z*typing_Tuple[Optional[int], Optional[int]]ztyping_Tuple[int, int])rérnc
Csät|tƒrt|ƒdkr t d¡‚|ddkr2t}nLzt|dƒ}Wn.tk
rp}zt d¡|‚W5d}~XYnX|dkr~t}|ddkrt}nLzt|dƒ}Wn.tk
rÎ}zt d¡|‚W5d}~XYnX|dkrÜt}||fS)Nr9z2-tuple expected for range/rowsrz(Integer or None expected for range valuer)    r‹r÷rgr:r4rãr$Ú
ValueErrorrä)r‡réÚlowerr¦Úupperrprprqrï0s6
 ÿþ ÿþzOver._interpret_rangecCs|jjSrrár‘rprprqr—Usz    Over.typer§rcCs$ttjdd„|j|j|jfDƒŽƒS)NcSsg|]}|dk    r|j‘qSrrlr·rprprqr¼]sþz&Over._from_objects.<locals>.<listcomp>)rÂr¾r¿r²rèrçr‘rprprqr¨YsþÿÿzOver._from_objects)NNNN)r“r”r•r–r˜r6r£r rrrçrèrrðrïr<r r—rr¨rprprprqråßs.
    û   
ð+    %
råc@s‚eZdZUdZdZdejfdejfgZded<dZ    ded<d    d
d œd d „Z
dd„Z ddd„Z e jdd„ƒZe jddœdd„ƒZdS)Ú WithinGroupaRepresent a WITHIN GROUP (ORDER BY) clause.
 
    This is a special operator against so-called
    "ordered set aggregate" and "hypothetical
    set aggregate" functions, including ``percentile_cont()``,
    ``rank()``, ``dense_rank()``, etc.
 
    It's supported only by certain database backends, such as PostgreSQL,
    Oracle and MS SQL Server.
 
    The :class:`.WithinGroup` construct extracts its type from the
    method :meth:`.FunctionElement.within_group_type`.  If this returns
    ``None``, the function's ``.type`` is used.
 
    Z withingroupr²rçrWrNrëúFunctionElement[_T]r7)r²rçcGs*||_|dk    r&tt |¡dtjiŽ|_dS)NrW)r²rTr<rîrr»rç)r‡r²rçrprprqr€sÿÿzWithinGroup.__init__cCs&|j|jf|jdk    rt|jƒndfSr')r²r²rçr÷r‘rprprqrð‹s
ÿzWithinGroup.__reduce__cCst|||||dS)z¶Produce an OVER clause against this :class:`.WithinGroup`
        construct.
 
        This function has the same signature as that of
        :meth:`.FunctionElement.over`.
 
        ©rèrçrérê©rå©r‡rèrçrérêrprprqræsûzWithinGroup.overcCs$|j |¡}|dk    r|S|jjSdSr)r²Zwithin_group_typer—)r‡Zwgtrprprqr— s zWithinGroup.typer§rcCs ttjdd„|j|jfDƒŽƒS)NcSsg|]}|dk    r|j‘qSrrlr·rprprqr¼¬sþz-WithinGroup._from_objects.<locals>.<listcomp>)rÂr¾r¿r²rçr‘rprprqr¨¨s
þÿÿzWithinGroup._from_objects)NNNN)r“r”r•r–r˜r6r£rrrçrrðrær<r r—rr¨rprprprqrôfs
þ   
 
rôc@sšeZdZUdZdZdejfdejfgZded<dZ    ded<d    d
d œd d „Z
dd„Z dddddddœdd„Z ddd„Z ejdd„ƒZejddœdd„ƒZdS) ÚFunctionFilteraRepresent a function FILTER clause.
 
    This is a special operator against aggregate and window functions,
    which controls which rows are passed to it.
    It's supported only by certain database backends.
 
    Invocation of :class:`.FunctionFilter` is via
    :meth:`.FunctionElement.filter`::
 
        func.count(1).filter(True)
 
    .. seealso::
 
        :meth:`.FunctionElement.filter`
 
    Z
funcfilterÚfuncÚ    criterionrWrNr‘rõr“)rúrûcGs||_|j|ŽdSr)rúÚfilter)r‡rúrûrprprqrÐszFunctionFilter.__init__cGs>t|ƒD]0}t tj|¡}|jdk    r2|j|@|_q||_q|S)a Produce an additional FILTER against the function.
 
        This method adds additional criteria to the initial criteria
        set up by :meth:`.FunctionElement.filter`.
 
        Multiple criteria are joined together at SQL render time
        via ``AND``.
 
 
        N)rÂrrorrprû)r‡rûÚcritrprprqrüØs 
zFunctionFilter.filterrìrízOver[_T])rèrçrérêrncCst|||||dS)aðProduce an OVER clause against this filtered function.
 
        Used against aggregate or so-called "window" functions,
        for database backends that support window functions.
 
        The expression::
 
            func.rank().filter(MyClass.y > 5).over(order_by='x')
 
        is shorthand for::
 
            from sqlalchemy import over, funcfilter
            over(funcfilter(func.rank(), MyClass.y > 5), order_by='x')
 
        See :func:`_expression.over` for a full description.
 
        rör÷rørprprqræîs"ûzFunctionFilter.overcCst tj|¡rt|ƒS|SdSr)rrnZ    filter_oprŸrïrprprqrðszFunctionFilter.self_groupcCs|jjSr)rúr—r‘rprprqr—szFunctionFilter.typer§rcCs ttjdd„|j|jfDƒŽƒS)NcSsg|]}|dk    r|j‘qSrrlr·rprprqr¼&sþz0FunctionFilter._from_objects.<locals>.<listcomp>)rÂr¾r¿rúrûr‘rprprqr¨"s
þÿÿzFunctionFilter._from_objects)NNNN)N)r“r”r•r–r˜r6r£rrrûrrürærðr<r r—rr¨rprprprqrùµs$
þ  ñ*
 
rùc
@sÞeZdZUdZdZded<ded<ded<dd    „Zejdd
œd d „ƒZ    e
j d d„ƒZ e
j dd
œdd„ƒZ e
j dd„ƒZe
j dd„ƒZd)ddddœdd„Zd*ddddddœd d!„Zdddddd"œd#dddd$ddd%d&œd'd(„ZdS)+Ú NamedColumnFNúOptional[FromClause]ÚtablersrrÓcCs,t|dƒr|j|jkp*t|dƒo*|j|jkS)Nrr)rúrrr-rprprqrÆ5sÿz$NamedColumn._compare_name_for_resultrcCs|jSr©rr‘rprprqrž:szNamedColumn.descriptioncCs(|j}|r||jkr| |¡S|jSdS)z¾table qualified label based on column key.
 
        for table-bound columns this is <tablename>_<column key/proxy key>;
 
        all other expressions it resolves to key/proxy key.
 
        N)r‹rÚ _gen_tq_labelrŠ)r‡rÇrprprqrŒ>s    
zNamedColumn._tq_key_labelrcCs | |j¡S)z¬table qualified label based on column name.
 
        for table-bound columns this is <tablename>_<columnname>; all other
        expressions it resolves to .name.
 
        ©rrr‘rprprqrŠMszNamedColumn._tq_labelcCsdSrÏrpr‘rprprqrôWsz+NamedColumn._render_label_in_columns_clausecCs|jSrrr‘rprprqr’[szNamedColumn._non_anon_labelTri©rÚ dedupe_on_keyrncCs|Srrp)r‡rrrprprqr_szNamedColumn._gen_tq_labelrKrrªrjr«c    Cst|j|||j|d|dS)NT)r¯r°rlrÝr­)r²rÓr—r³rprprqr´dsùzNamedColumn._bind_param©rrÓrÌrÍÚdisallow_is_literalrQrÎrÏ©rÐrrÓrÌrÍrr€rnc    Ks†t|rt tj|p|j¡n|p"|j|j|dd}|j|_|dkrH|j|_|rXt    |ƒ|_
n|g|_
|j dk    r||j j   |j¡|_ |j|fS)NF©rlrÑru)rwrrorrÓrr—rœrÓrÂr‰rŸrÔrø)    r‡rÐrrÓrÌrÍrr€r·rprprqrÖus" ÿú     
zNamedColumn._make_proxy)T)NF)r“r”r•rurrrÆr<rržr+rrŒrŠrôr’rr´rÖrprprprqrþ/s4
 
    
 
ÿ    ûørþc@sNeZdZUdZdZdejfdejfdejfgZ    de
d<dejfdejfgZ de
d<d    e
d<d=d d d dœdd„Z dd„Z ejdd„ƒZd>dd„Zejdd„ƒZejdd„ƒZedd„ƒZejddœdd „ƒZd?d!d"„Zd#d$„Zd%d&„Zed'd(„ƒZed)d*„ƒZedd+œd,d-d.d/d0œd1d2„Zej d3dœd4d5„ƒZ!d
d
d6œd7d d8d.d9d:œd;d<„Z"d
S)@rØzRepresents a column label (AS).
 
    Represent a label, as typically applied to any column-level
    element using the ``AS`` sql keyword.
 
    rÙrr—Ú_elementrWrr0rsNrr¸rh)rr²rlcCs¢|}tjtj||d}t|tƒr(|j}q|r4||_n,t     t
|ƒt |ddƒ¡|_t|tƒr`|j |_ |j|_|_|_||_|dk    rŒt |¡n|jj|_|g|_dS)NrXrrà)rrorrr‹rØr²rrÉrâr r‘rZ_resolve_labelrÓrŠrŒr
rr€r—r‰)r‡rr²rlZ orig_elementrprprqr®s.ý
 
ÿ
ÿ ýzLabel.__init__cCs|j|j|j|jffSr)r²rr
r—r‘rprprqrðÕszLabel.__reduce__cCsdSrÏrpr‘rprprqrôØsz%Label._render_label_in_columns_clauseFc    Cstd||||jd|dSr®r±r³rprprqr´ÜsùzLabel._bind_paramcCs|jjSrrßr‘rprprqröçszLabel._is_implicitly_booleancCs|jjSr)r²rõr‘rprprqrõëszLabel._allow_label_resolvecCs|Srrpr‘rprprqr¡ïszLabel._order_by_label_elementrcCs|jjtjdSrj)r
rðrZas_r‘rprprqr²ósz Label.elementcCs|j|jj|dSrj)Ú_apply_to_innerr
rðrïrprprqrð÷szLabel.self_groupcCs| |jj¡Sr)r r
rûr‘rprprqrûúsz Label._negatecOs.|||Ž}||jk    r&t|j||jdS|SdSr•)r
rØrr—)r‡Úfnr…r€Z sub_elementrprprqr ýs
 
zLabel._apply_to_innercCs|jjSr)r²r„r‘rprprqr„szLabel.primary_keycCs|jjSr)r²r‡r‘rprprqr‡szLabel.foreign_keys)ÚcloneÚanonymize_labelsrVrirrà)r rr€rncKsP| ¡||jf|Ž|_|rLt t|ƒt|jddƒ¡|_|j|_|_    |_
dS)Nrrà) Z_reset_memoizationsr
rÉrâr r‘r²rrÓrŠrŒ)r‡r rr€rprprqÚ_copy_internals s ÿzLabel._copy_internalsr§cCs|jjSrrÉr‘rprprqr¨szLabel._from_objects)rrÍrQrÎrÏ)rÐrrÍr€rncKs„|s
|jn|}|jj||dt|tƒ|d\}}||jkrTt|jtƒsTt d|j¡‚|j|_|j     
|¡|j dk    rz|j |_ |j |fS)NT)rrrÌrÍzšLabel name %s is being renamed to an anonymous label due to disambiguation which is not supported right now.  Please use unique names for explicit labels.) rr²rÖr‹Ú_truncated_labelrÉr:ÚInvalidRequestErrorrœr‰rÑr—rÓ)r‡rÐrrÍr€rÓÚerprprqrÖs&û
ýÿ 
zLabel._make_proxy)N)NF)N)#r“r”r•r–r˜r6rrr£rrr¢rrðr+rrôr´r<r rörõrr¡r²rðrûr r„r‡r%rrr¨rÖrprprprqrØ–sP
ý þü'
 
 
 
 
 
 
 
üûrØc
sJeZdZUdZded<ded<dZdejfdejfdej    fdej
fgZ d    ed
<d Z d ed <d Z d ed<d Zded<d Zded<dZedd„ƒZd8dddddœdd„Zddœdd„Ze‡fdd„ƒZd9‡fdd „    Zed!d"œd#d$„ƒZejd%d&„ƒZed'd(„ƒZd)d*„Zd:ddd,d-œd.d/„Zd d dd dd0œd1d,d,dd2dd3d4d5œd6d7„Z‡Z S);rwaÖRepresents a column expression from any textual string.
 
    The :class:`.ColumnClause`, a lightweight analogue to the
    :class:`_schema.Column` class, is typically invoked using the
    :func:`_expression.column` function, as in::
 
        from sqlalchemy import column
 
        id, name = column("id"), column("name")
        stmt = select(id, name).select_from("user")
 
    The above statement would produce SQL like::
 
        SELECT id, name FROM user
 
    :class:`.ColumnClause` is the immediate superclass of the schema-specific
    :class:`_schema.Column` object.  While the :class:`_schema.Column`
    class has all the
    same capabilities as :class:`.ColumnClause`, the :class:`.ColumnClause`
    class is usable by itself in those cases where behavioral requirements
    are limited to simple SQL expression generation.  The object has none of
    the associations with schema-level metadata or with execution-time
    behavior that :class:`_schema.Column` does,
    so in that sense is a "lightweight"
    version of :class:`_schema.Column`.
 
    Full details on :class:`.ColumnClause` usage is at
    :func:`_expression.column`.
 
    .. seealso::
 
        :func:`_expression.column`
 
        :class:`_schema.Column`
 
    rÿrrirur¹rr—rWrNzOptional[DefaultGenerator]ÚonupdaterzzOptional[FetchedValue]Úserver_defaultÚserver_onupdateFcCs|jo|jdkSr))rurr‘rprprqr‡szColumnClause._is_starrsrh)rtrlrurÑcCs(||_|_||_t |¡|_||_dSr)rÓrrrr€r—ru)r‡rtrlrurÑrprprqr‹s  zColumnClause.__init__)Ú column_tablescKsgSrrp)r‡rr€rprprqr¦›szColumnClause.get_childrencs|jdk    r|jjStƒjSdSr)rrÅrÿr‘r¾rprqrÅ¡s
zColumnClause.entity_namespacec sL|r>|jdk    r>|jjr>| d¡}||jf|Ž}|j |¡}|Stƒjf|ŽS)Nr )rZ _is_subqueryrÇr·Úcorresponding_columnrÿr%)r‡rær€r rÚnewr¾rprqr%¨sÿþý
 zColumnClause._cloner§rcCs|j}|dk    r|gSgSdSr©r)r‡Útrprprqr¨µszColumnClause._from_objectscCs
|jdk    Srrr‘rprprqrô½sz,ColumnClause._render_label_in_columns_clausecCs|j|jddS)NF)rrr‘rprprqÚ
_ddl_labelÁszColumnClause._ddl_labelcCs‚|jsD|jdksD|jjsDt|dƒrDt|tƒrp|jsD|jdksD|jjrpt|dƒrZ|j|jkpnt|dƒon|j|jkS|j     |j¡SdS)NrºrrŠ)
rurrrúr‹rwrrŠrºrÄr-rprprqrÆÅs*ÿþýüúø    ÷
ö
 
þz%ColumnClause._compare_name_for_resultTrrcCs2|j}|jrdS|dk    r*t|ƒr*t|ƒrT|jrT|j dd¡d|jd|}n trft|t    ƒsft
‚|jd|}t |ƒr¦|j dk    r¦t |ƒr˜|j |_ qØt ||j ƒ}n2t |jƒrØ|jj dk    rØt|t ƒrÊt
‚t ||jj ƒ}|r||jkr|}d}||jkr|dt|ƒ}|d7}qò|}t tj|¡S|SdS)zägenerate table-qualified label
 
        for a table-bound column this is <tablename>_<columnname>.
 
        used primarily for LABEL_STYLE_TABLENAME_PLUS_COL
        as well as the .columns collection on a Join object.
 
        NÚ.rÝr)rrur rÚschemaÚreplacerrr‹rRrr!rr r·rsrrorrÓ)r‡rrrrÙrÚcounterrprprqrÛs2 "
      
zColumnClause._gen_tq_labelrrQrÎrrÏrc
Ks¦| o|jo|dkp||jk}|j|r:t tj|p6|j¡n|pB|j|j||d}    |j|    _|dkrh|j    |    _    |rxt
|ƒ|    _ n|g|    _ |j dk    rœ|j j  |    j    ¡|    _ |    j    |    fS)Nr    )rurr¿rrorrÓr—rœrÓrÂr‰rŸrÔrø)
r‡rÐrrÓrÌrÍrr€rur·rprprqrÖs.ÿù
ÿú 
zColumnClause._make_proxy)NFN)F)T)!r“r”r•r–rr˜r6rrr£r!rrrzrrZ_is_multiparam_columnrrrr¦rÅr%r=r¨r+rrôrrÆrrÖrrprpr¾rqrwHsN
%ü     
û 
 
ÿ<ørwc@speZdZUdZdejfdejfdejfgZde    d<ddd    œd
d „Z
e fd d ddœdd„Z e jddœdd„ƒZdS)ÚTableValuedColumnZtable_valued_columnrr—Ú scalar_aliasrWrrRr¢)r!rlcCs||_|j|_|_||_dSr)r!rrÓr—)r‡r!rlrprprqrLszTableValuedColumn.__init__rVrrà)r r€rncKs$||jf|Ž|_|jj|_|_dSr)r!rrÓ)r‡r r€rprprqrQsz!TableValuedColumn._copy_internalsr§rcCs|jgSr)r!r‘rprprqr¨WszTableValuedColumn._from_objectsN)r“r”r•r˜r6rrr£rrrr%rr<rr¨rprprprqr Cs
ý ÿr c@sDeZdZUdZdejfgZded<eddddœdd    „ƒZ    d
d „Z
d S) rirjrWrz_ColumnExpressionArgument[str]rszBinaryExpression[str])rµrjrncCs*t tjt|¡}t|t|ƒtj|j    dSr•)
rrorrrsrzrirrlr—)rHrµrjr®rprprqÚ_create_collation_expressioncsüz,CollationClause._create_collation_expressioncCs
||_dSr)rjrkrprprqroszCollationClause.__init__N) r“r”r•r˜r6rArrrJr"rrprprprqri\s
ÿ  ric@seZdZdZdd„ZdS)Ú_IdentifiedClauseZ
identifiedcCs
||_dSr)Úident)r‡r$rprprqrvsz_IdentifiedClause.__init__N)r“r”r•r˜rrprprprqr#ssr#c@seZdZdZdZdS)ÚSavepointClauseZ    savepointFN©r“r”r•r˜rrprprprqr%zsr%c@seZdZdZdZdS)ÚRollbackToSavepointClauseZrollback_to_savepointFNr&rprprprqr'sr'c@seZdZdZdZdS)ÚReleaseSavepointClauseZrelease_savepointFNr&rprprprqr(„sr(csšeZdZUdZdZded<eeddddœdd„ƒƒZeed    dd    dœd
d„ƒƒZed dd dœd d„ƒZddddœ‡fdd„ Z    dd„Z
dd„Z dd„Z ‡Z S)r aÁRepresent a SQL identifier combined with quoting preferences.
 
    :class:`.quoted_name` is a Python unicode/str subclass which
    represents a particular identifier name along with a
    ``quote`` flag.  This ``quote`` flag, when set to
    ``True`` or ``False``, overrides automatic quoting behavior
    for this identifier in order to either unconditionally quote
    or to not quote the name.  If left at its default of ``None``,
    quoting behavior is applied to the identifier on a per-backend basis
    based on an examination of the token itself.
 
    A :class:`.quoted_name` object with ``quote=True`` is also
    prevented from being modified in the case of a so-called
    "name normalize" option.  Certain database backends, such as
    Oracle, Firebird, and DB2 "normalize" case-insensitive names
    as uppercase.  The SQLAlchemy dialects for these backends
    convert from SQLAlchemy's lower-case-means-insensitive convention
    to the upper-case-means-insensitive conventions of those backends.
    The ``quote=True`` flag here will prevent this conversion from occurring
    to support an identifier that's quoted as all lower case against
    such a backend.
 
    The :class:`.quoted_name` object is normally created automatically
    when specifying the name for key schema constructs such as
    :class:`_schema.Table`, :class:`_schema.Column`, and others.
    The class can also be
    passed explicitly as the name to any function that receives a name which
    can be quoted.  Such as to use the :meth:`_engine.Engine.has_table`
    method with
    an unconditionally quoted name::
 
        from sqlalchemy import create_engine
        from sqlalchemy import inspect
        from sqlalchemy.sql import quoted_name
 
        engine = create_engine("oracle+cx_oracle://some_dsn")
        print(inspect(engine).has_table(quoted_name("some_table", True)))
 
    The above logic will run the "has table" logic against the Oracle backend,
    passing the name exactly as ``"some_table"`` without converting to
    upper case.
 
    .. versionchanged:: 1.2 The :class:`.quoted_name` construct is now
       importable from ``sqlalchemy.sql``, in addition to the previous
       location of ``sqlalchemy.sql.elements``.
 
    )rròrórrrs©rkrrncCsdSrrp©rHrkrrprprqr ¾szquoted_name.constructràcCsdSrrpr*rprprqr ÃsrzOptional[quoted_name]cCs|dkr dSt||ƒSdSr)r r*rprprqr ÈscsH|dk    stdƒ‚t||ƒr0|dks,|j|kr0|Stƒ ||¡}||_|S)Nz0use quoted_name.construct() for None passthrough)rr‹rrÿr³)rHrkrr‡r¾rprqr³Ñsÿþzquoted_name.__new__cCstt|ƒ|jffSr)r rsrr‘rprprqrðÜszquoted_name.__reduce__cCs|jr
|St|ƒ ¡SdSr)rrsròr‘rprprqÚ_memoized_method_lowerßsz"quoted_name._memoized_method_lowercCs|jr
|St|ƒ ¡SdSr)rrsrór‘rprprqÚ_memoized_method_upperåsz"quoted_name._memoized_method_upper)r“r”r•r–r—rrrJr r³rðr+r,rrprpr¾rqr ‰s
0 r zSet[ColumnClause[Any]]r‚cCstƒ}t|id|jiƒ|S)z2locate Column objects within the given expression.r¹)Úsetr7rÀ)r›r8rprprqÚ _find_columnsìsr.cCs"|D]}|jjs|jSqtjSr)r—r–rr¤)ÚargsÚarprprqÚ_type_from_argsôs r1cCs8|j||d}|dkr4t d|t|ddƒ|jf¡‚|S)N)Úrequire_embeddedzbGiven column '%s', attached to table '%s', failed to locate a corresponding column from table '%s'r)rr:rr‘rž)Z
fromclauser¹r2r·rprprqÚ_corresponding_column_or_errorüsÿþÿr3cs€eZdZUded<dd„Z‡fdd„Zejdd„ƒZejd    d
„ƒZ    ejd d „ƒZ
ejd dœdd„ƒZ ejddœdd„ƒZ ‡Z S)ÚAnnotatedColumnElementrÚ_Annotated__elementcCsRt |||¡dD]}|j |d¡qdD]"}|j |d¡dkr*|j |¡q*dS)N)r§r‹rŒrŠr’)rrÓrF)r#rr´rÇrø)r‡r²rªràrprprqr s zAnnotatedColumnElement.__init__cstƒ |¡}|j dd¡|S)Nr§)rÿÚ_with_annotationsr´rÇ)r‡rªr r¾rprqr6s z(AnnotatedColumnElement._with_annotationscCs|jjS)z'pull 'name' from parent, if not present)r5rr‘rprprqrszAnnotatedColumnElement.namecCs|jjS)z(pull 'table' from parent, if not present)r5rr‘rprprqr$szAnnotatedColumnElement.tablecCs|jjS)z&pull 'key' from parent, if not present)r5rÓr‘rprprqrÓ)szAnnotatedColumnElement.keyrCrcCstrt|jtƒst‚|jjSr)rr‹r5rLrÚinfor‘rprprqr7.szAnnotatedColumnElement.inforscCs|jjSr)r5rÒr‘rprprqrÒ4sz'AnnotatedColumnElement._anon_name_label)r“r”r•rrr6r<r rrrÓr7rÒrrprpr¾rqr4    s
 
 
 
r4csNeZdZdZdZdddddœ‡fdd    „ Zdd
œd d „Zd ddœdd„Z‡ZS)rzVA unicode subclass used to identify symbolic "
    "names that may require truncation.rpNrsrrr)cst|d|ƒ}tƒ |||¡S)Nr)r‘rÿr³r*r¾rprqr³?s z_truncated_label.__new__rcCs|jt|ƒ|jffSr)r²rsrr‘rprprqrðDsz_truncated_label.__reduce__r©)Úmap_rncCs|Srrp©r‡r8rprprqÚ    apply_mapGsz_truncated_label.apply_map)N)    r“r”r•r–r—r³rðr:rrprpr¾rqr9s
rc@seZdZdZdZdS)ÚconvaçMark a string indicating that a name has already been converted
    by a naming convention.
 
    This is a string subclass that indicates a name that should not be
    subject to any further naming conventions.
 
    E.g. when we create a :class:`.Constraint` using a naming convention
    as follows::
 
        m = MetaData(naming_convention={
            "ck": "ck_%(table_name)s_%(constraint_name)s"
        })
        t = Table('t', m, Column('x', Integer),
                        CheckConstraint('x > 5', name='x5'))
 
    The name of the above constraint will be rendered as ``"ck_t_x5"``.
    That is, the existing name ``x5`` is used in the naming convention as the
    ``constraint_name`` token.
 
    In some situations, such as in migration scripts, we may be rendering
    the above :class:`.CheckConstraint` with a name that's already been
    converted.  In order to make sure the name isn't double-modified, the
    new name is applied using the :func:`_schema.conv` marker.  We can
    use this explicitly as follows::
 
 
        m = MetaData(naming_convention={
            "ck": "ck_%(table_name)s_%(constraint_name)s"
        })
        t = Table('t', m, Column('x', Integer),
                        CheckConstraint('x > 5', name=conv('ck_t_x5')))
 
    Where above, the :func:`_schema.conv` marker indicates that the constraint
    name here is final, and the name will render as ``"ck_t_x5"`` and not
    ``"ck_t_ck_t_x5"``
 
    .. seealso::
 
        :ref:`constraint_naming_conventions`
 
    rpNrƒrprprprqr;Ks*r;c@sHeZdZdZdZeddddddd    œd
d „ƒZd d „Zdd„Zdd„Z    dS)rÉzDA unicode subclass used to identify anonymously
    generated names.rpNFr$rsrri)rÚÚbodyrßr rncCsHt dd|¡}|r| d¡}d|| dd¡f}|r@d||f}t|ƒS)Nz [%\(\) \$]+rÝz
%%(%d %s)sú%ú%%z%s%s)rBr0ÚstriprrÉ)rHrÚr<rßr rÙrprprqrâ†s
 
 z_anonymous_label.safe_constructcCsDd|kr$t|tƒs$t|ƒ dd¡}nt|ƒ}ttt ||¡|jƒƒS©Nr=r>©r‹rÉrsrr rurr-rprprqruœs
þÿz_anonymous_label.__add__cCsDd|kr$t|tƒs$t|ƒ dd¡}nt|ƒ}ttt ||¡|jƒƒSr@rAr-rprprqrv©s
þÿz_anonymous_label.__radd__cCs&|jdk    rt|||jƒS||SdSr)rr r9rprprqr:¶s
z_anonymous_label.apply_map)NF)
r“r”r•r–r—rJrârurvr:rprprprqrÉ€sû  rÉ)NF)N)F)Ór–Ú
__future__rÚdecimalrÚenumrr¾rÿrBrrrrrr    r
r r r rrrrrrrZ typing_TuplerrrrrÞrrrrrÚ_typingrr r!r"Ú
annotationr#r$Úbaser%r&r'r(r)r*r+r,r-r.rör/r0r1r2r3Zvisitorsr4r5r6r7r8r:r;r<r=r>Z util.typingr?r@rArBrCrDrErFrGÚcompilerrHrIZ    functionsrJrKrrLrMrNrOrÐrPrQrRrSr™rTrUrVrWZenginerXrYrZZengine.interfacesr[r\r]r^r_Z engine.resultr`Úfloatrer$rgrarcrdrfrrrxryZ_self_inspectsrŒrZ DMLColumnRoleZDDLConstraintColumnRoleZColumnsClauseRolerrrr‚Z_SQOZColumnArgumentOrKeyRoleZStatementOptionRolerpZBinaryElementRoleZ OrderByRoleZLimitOffsetRoleZDDLExpressionRolerrørùZ InElementRoler²r"ZFromClauseRoleZSelectStatementRoleZ Inspectabler%Z ConstExprRolerDZ_create_singletonrirKrNrTrqrxr+r”r•rœr×rªr¬r±rµrrÊršrzrÕrÜrÝrŸrârãrärårôrùrþr:rØZDDLReferredColumnRoleZStrAsPlainColumnRolerwr rsrir#r%r'r(Z MemoizedSlotsr r.r1r3r4rr;Z_generated_labelrÉrprprprqÚ<module>    sø                                                                                                  ý&ÿ&]
û7
ü5
ÿ
ôuB
óy
ÿ"
ûjS[MM^:>?*9Ozg3
û|c
02