zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
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
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
U
¸ý°dq¥ã @sj
dZddlmZddlZddlmZddlZddlmZddlm    Z
ddlm    Z    ddlm Z ddlm Z dd    lm Z dd
lmZdd lmZdd lmZdd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#dd lm$Z$dd!l%m&Z&dd"l%m'Z'dd#l%m(Z(dd$l%m)Z)dd%l%m*Z*dd&l%m+Z+dd'l%m,Z,dd(l%m-Z-dd)l.m/Z/dd*l.m0Z0dd+l1m2Z2dd,l1m3Z3dd-l1m4Z4dd.l1m5Z5dd/l1m6Z6dd0l1m7Z7dd1l1m8Z8dd2l1m9Z9dd3l1m:Z:dd4l1m;Z;dd5l1m<Z<dd6l1m=Z=dd7l1m>Z>dd8l1m?Z?dd9l1m@Z@dd:l1mAZAdd;l1mBZBdd<l1mCZCdd=l1mDZDdd>l1mEZEdd?l1mFZFdd@lmGZGddAlHmIZIddBlHmJZJddClHmKZKddDlHmLZLddElHmMZMddFlHmNZNddGlHmOZOddHlHmPZPddIlHmQZQddJlHmRZRddKlHmSZSddLlHmTZTddMl mUZUddNlVmWZWddOl$mXZXddPl$mYZYddQl$mZZZdRdSlm[Z[dRdTlm\Z\dRdUl\m]Z]dRdVl^m_Z_dRdWl^m`Z`dRdXl^maZaeKjbZbedYe    dZZcerðdd[l%mdZddd\l%meZedd]l%mfZfdd^l%mgZgdd_l%mhZhdd`l%miZiddal%mjZjddbl%mkZkddcl%mlZldddl%mmZmddel%mnZnddfl%moZoddgl%mpZpddhl%mqZqddil%mrZrddjl%msZsddkl%mtZtddll%muZuddml%mvZwddnl%mxZxddol1myZyddpl1mzZzddql1m{Z{ddrlm|Z|ddsl}m~Z~ddtlm€Z€ddulmZddvlHm‚Z‚ddwlHmƒZƒddxlHm„Z„ddylHm…Z…ddzlHm†Z†dd{l‡mˆZˆdd|l‰mŠZŠdd}l‰m‹Z‹dd~lVmŒZŒddl#mZdd€l$mŽZŽedeOe    d‚fZe edƒgeefZ‘Gd„d…„d…e`ƒZ’ede’fZ“ed†e’fZ”eed‡edˆfZ•ee“ee”ede ee    ffZ–eedƒZ—Gd‰dŠ„dŠeJe˜ƒZ™Gd‹dŒ„dŒe!jšePƒZ›GddŽ„dŽeBe›ƒZœGdd„deœee(ƒZGd‘d’„d’e›ƒZžGd“d”„d”ƒZŸGd•d–„d–ƒZ Gd—d˜„d˜ƒZ¡Gd™d„de!j¢ežƒZ£Gdšd›„d›e£ƒZ¤Gdœd„deƒZ¥e¦e¥ƒ\Z§Z¨Z©Zªe©Z«GdždŸ„dŸe!j¬e£ƒZ­Gd d¡„d¡ƒZ®Gd¢d£„d£e¤ƒZ¯Gd¤d¥„d¥e®e¤ƒZ°Gd¦d§„d§e°ƒZ±Gd¨d©„d©e!j¬e±ƒZ²Gdªd«„d«e¯e²ƒZ³Gd¬d­„d­e±e¯ƒZ´Gd®d¯„d¯e±ƒZµGd°d±„d±e!j¬e!j¶eCeŸe e°ƒZ·Gd²d³„d³eƒZ¸Gd´dµ„dµeƒZ¹Gd¶d·„d·e›ƒZºGd¸d¹„d¹e!j»eºƒZ¼Gdºd»„d»e°ƒZ½Gd¼d½„d½eQe£ƒZ¾Gd¾d¿„d¿e¾e¤ƒZ¿GdÀdÁ„dÁe!j¬eFe¤ƒZÀedÂdeÁe ee    ffZÂGdÃd„dÂeLƒZÃGdÄdńdÅe!jÄeCe¯ƒZÅGdÆdDŽdÇe!jÄeQeOe    ƒZÆGdÈdɄdÉe!jÇe!jÈe!jÉe!jÄe¼e0ežƒ    ZÊedÊeÊdZZËGdËd̄dÌeQeÊee˃ZÌGdÍd΄dÎeÊeCƒZÍe@ ÎdÏdСGdÑd҄dÒe@ƒƒZÏGdÓdԄdÔeƒZÐGdÕdքdÖeDeÍeœƒZÑeÐD]ZÒeÓeÑeÒjÔe҃    qe@ ÎdÏdסGdØdلdÙe\jÕe@ƒƒZÖGdÚdۄdۃZ×GdÜd݄dÝejØe"jÙe$jڃZÛGdÞd߄dßeŸe e¡eDe×eÍee(ƒ    ZÜGdàdá„dáe!jÄeCeQeOecƒZÝGdâdã„dãeTeÁƒZÞGdädå„dåeÊeœeCƒZßeßZàGdædç„dçe/ƒZádS)èztThe :class:`_expression.FromClause` class of SQL expression elements,
representing
SQL tables and derived rowsets.
 
é)Ú annotationsN)ÚEnum)Ú AbstractSet)ÚAny)ÚCallable)Úcast)ÚDict)ÚGeneric)ÚIterable)ÚIterator)ÚList)Ú
NamedTuple)ÚNoReturn)ÚOptional)Úoverload)ÚSequence)ÚSet)ÚTuple)ÚType)Ú TYPE_CHECKING)ÚTypeVar)ÚUnioné)Ú    cache_key)Ú    coercions)Ú    operators)Úroles)Ú
traversals)Útype_api)Úvisitors)Ú_ColumnsClauseArgument)Ú_no_kw)Ú_TP©Úis_column_element)Úis_select_statement)Ú is_subquery)Úis_table)Úis_text_clause)Ú    Annotated)ÚSupportsCloneAnnotations)Ú_clone)Ú_cloned_difference©Ú_cloned_intersection©Ú_entity_namespace_key)Ú_EntityNamespace)Ú_expand_cloned©Ú _from_objects)Ú _generative©Ú_never_select_column)Ú_NoArg)Ú_select_iterables)ÚCacheableOptions)ÚColumnCollection)Ú    ColumnSet)Ú CompileState)ÚDedupeColumnCollection)Ú
Executable)Ú
Generative)ÚHasCompileState)Ú HasMemoized)Ú    Immutable)Ú_document_text_coercion)Ú_anonymous_label)Ú BindParameter)ÚBooleanClauseList)Ú ClauseElement)Ú
ClauseList)Ú ColumnClause)Ú ColumnElement)ÚDQLDMLClauseElement)ÚGroupedElement)Úliteral_column)ÚTableValuedColumn)ÚUnaryExpression)Ú OperatorType)ÚNULLTYPE)Ú_TraverseInternalsType)ÚInternalTraversal)Úprefix_anon_mapé)Úexc)Úutil)Ú!HasMemoized_ro_memoized_attribute)ÚLiteral)ÚProtocol)ÚSelfÚ_T)Úbound)Ú_ColumnExpressionArgument)Ú#_ColumnExpressionOrStrLabelArgument)Ú_FromClauseArgument)Ú_JoinTargetArgument)Ú_LimitOffsetType)Ú _MAYBE_ENTITY)Ú _NOT_ENTITY)Ú_OnClauseArgument)Ú#_SelectStatementForCompoundArgument)Ú_T0)Ú_T1)Ú_T2)Ú_T3)Ú_T4)Ú_T5)Ú_T6)Ú_T7)Ú_TextCoercedExpressionArgument)Ú_TypedColumnClauseArgument)Ú_TypeEngineArgument)Ú_AmbiguousTableNameMap)ÚExecutableOption)ÚReadOnlyColumnCollection)Ú_CacheKeyTraversalType)Ú SQLCompiler)ÚDelete)ÚUpdate)ÚBinaryExpression)ÚKeyedColumnElement)ÚLabel)Ú NamedColumn)Ú
TextClause)ÚFunction)Ú
ForeignKey)ÚForeignKeyConstraint)ÚTableValueType)Ú
TypeEngine)Ú_CloneCallableTypeÚ
FromClauser~)úColumnElement[Any]r~c@s4eZdZejddœdd„ƒZejddœdd„ƒZdS)    Ú_JoinTargetProtocolúList[FromClause]©ÚreturncCsdS©N©©ÚselfrŒrŒúPd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\sqlalchemy/sql/selectable.pyr4œsz!_JoinTargetProtocol._from_objectsr1cCsdSr‹rŒrrŒrŒrÚentity_namespace sz$_JoinTargetProtocol.entity_namespaceN)Ú__name__Ú
__module__Ú __qualname__rXÚro_non_memoized_propertyr4rrŒrŒrŒrr‡›sr‡úColumnElement[bool])ú_ColumnExpressionArgument[Any]rar–c@s"eZdZdZeddœdd„ƒZdS)Ú_OffsetLimitParamTú Optional[int]r‰cCs|jSr‹)Zeffective_valuerrŒrŒrÚ_limit_offset_valueÁsz%_OffsetLimitParam._limit_offset_valueN)r‘r’r“Ú inherit_cacheÚpropertyr™rŒrŒrŒrr—¾sr—c@sŒeZdZdZdZdZdZdZdZe    ddœdd„ƒZ
e j ddœdd    „ƒZ d
d d œd d„Zddd œdd„Zdddœdd„Ze    ddœdd„ƒZdS)Ú ReturnsRowsa›The base-most class for Core constructs that have some concept of
    columns that can represent rows.
 
    While the SELECT statement and TABLE are the primary things we think
    of in this category,  DML like INSERT, UPDATE and DELETE can also specify
    RETURNING which means they can be used in CTEs and other forms, and
    PostgreSQL has functions that return rows also.
 
    .. versionadded:: 1.4
 
    TFr‰cCs|Sr‹rŒrrŒrŒrÚ
selectableÛszReturnsRows.selectableÚ_SelectIterablecCs
tƒ‚dS)aEA sequence of column expression objects that represents the
        "selected" columns of this :class:`_expression.ReturnsRows`.
 
        This is typically equivalent to .exported_columns except it is
        delivered in the form of a straight sequence and not  keyed
        :class:`_expression.ColumnCollection`.
 
        N©ÚNotImplementedErrorrrŒrŒrÚ_all_selected_columnsßs
z!ReturnsRows._all_selected_columnsúOptional[FromClause]Úbool©Ú
fromclauserŠcCs
tƒ‚dS)z¾Return ``True`` if this :class:`.ReturnsRows` is
        'derived' from the given :class:`.FromClause`.
 
        An example would be an Alias of a Table is derived from that Table.
 
        NrŸ©rŽr¥rŒrŒrÚis_derived_fromëszReturnsRows.is_derived_fromr…ÚNonecCs
tƒ‚dS)z=Populate columns into an :class:`.AliasedReturnsRows` object.NrŸr¦rŒrŒrÚ#_generate_fromclause_column_proxiesôsz/ReturnsRows._generate_fromclause_column_proxiesr†©ÚcolumnrŠcCs
tƒ‚dS)z>reset internal collections for an incoming column being added.NrŸ©rŽr«rŒrŒrÚ_refresh_for_new_columnûsz#ReturnsRows._refresh_for_new_columnz"ReadOnlyColumnCollection[Any, Any]cCs
tƒ‚dS)aA :class:`_expression.ColumnCollection`
        that represents the "exported"
        columns of this :class:`_expression.ReturnsRows`.
 
        The "exported" columns represent the collection of
        :class:`_expression.ColumnElement`
        expressions that are rendered by this SQL
        construct.   There are primary varieties which are the
        "FROM clause columns" of a FROM clause, such as a table, join,
        or subquery, the "SELECTed columns", which are the columns in
        the "columns clause" of a SELECT statement, and the RETURNING
        columns in a DML statement..
 
        .. versionadded:: 1.4
 
        .. seealso::
 
            :attr:`_expression.FromClause.exported_columns`
 
            :attr:`_expression.SelectBase.exported_columns`
        NrŸrrŒrŒrÚexported_columnsÿszReturnsRows.exported_columnsN)r‘r’r“Ú__doc__Z_is_returns_rowsÚ_is_from_clauseÚ_is_select_baseÚ_is_select_statementÚ _is_lateralr›rrXr”r¡r§r©r­r®rŒrŒrŒrrœÆs      rœc@seZdZdZdS)ÚExecutableReturnsRowsú0base for executable statements that return rows.N©r‘r’r“r¯rŒrŒrŒrr´sr´c@seZdZdZdS)ÚTypedReturnsRowsrµNr¶rŒrŒrŒrr·sr·c@sxeZdZdZdZdZdddœdd„Zd d
d d œd d„Zej    ddde 
d¡ddddœdd„ƒƒZ d!ddddœdd„Z d    S)"Ú
Selectablez!Mark a class as being selectable.rTr†r¨rªcCs
tƒ‚dSr‹rŸr¬rŒrŒrr­)sz"Selectable._refresh_for_new_columnNú Optional[str]ÚLateralFromClause©ÚnamerŠcCstj||dS)á;Return a LATERAL alias of this :class:`_expression.Selectable`.
 
        The return value is the :class:`_expression.Lateral` construct also
        provided by the top-level :func:`_expression.lateral` function.
 
        .. seealso::
 
            :ref:`tutorial_lateral_correlation` -  overview of usage.
 
        ©r¼)ÚLateralÚ
_construct©rŽr¼rŒrŒrÚlateral,s zSelectable.lateralú1.4zµThe :meth:`.Selectable.replace_selectable` method is deprecated, and will be removed in a future release.  Similar functionality is available via the sqlalchemy.sql.visitors module.)Úmessageúsqlalchemy.sql.utilr…ÚAliasr\)ÚoldÚaliasrŠcCstjj |¡ |¡S)zÆReplace all occurrences of :class:`_expression.FromClause`
        'old' with the given :class:`_expression.Alias`
        object, returning a copy of this :class:`_expression.FromClause`.
 
        )rXÚ    preloadedÚsql_utilÚ ClauseAdapterÚtraverse)rŽrÇrÈrŒrŒrÚreplace_selectable9s ÿzSelectable.replace_selectableFzKeyedColumnElement[Any]r£z!Optional[KeyedColumnElement[Any]])r«Úrequire_embeddedrŠcCs|j ||¡S)aÓGiven a :class:`_expression.ColumnElement`, return the exported
        :class:`_expression.ColumnElement` object from the
        :attr:`_expression.Selectable.exported_columns`
        collection of this :class:`_expression.Selectable`
        which corresponds to that
        original :class:`_expression.ColumnElement` via a common ancestor
        column.
 
        :param column: the target :class:`_expression.ColumnElement`
                      to be matched.
 
        :param require_embedded: only return corresponding columns for
         the given :class:`_expression.ColumnElement`, if the given
         :class:`_expression.ColumnElement`
         is actually present within a sub-element
         of this :class:`_expression.Selectable`.
         Normally the column will match if
         it merely shares a common ancestor with one of the exported
         columns of this :class:`_expression.Selectable`.
 
        .. seealso::
 
            :attr:`_expression.Selectable.exported_columns` - the
            :class:`_expression.ColumnCollection`
            that is used for the operation.
 
            :meth:`_expression.ColumnCollection.corresponding_column`
            - implementation
            method.
 
        )r®Úcorresponding_column)rŽr«rÎrŒrŒrrÏJs#ÿzSelectable.corresponding_column)N)F) r‘r’r“r¯Ú__visit_name__Ú is_selectabler­rÂrXÚ
deprecatedÚpreload_modulerÍrÏrŒrŒrŒrr¸"s þ ÿr¸c@sVeZdZUdZded<dejfgZded<ee    dddƒd    d
œd d d dœdd„ƒƒZ
dS)Ú HasPrefixesrŒú+Tuple[Tuple[DQLDMLClauseElement, str], ...]Ú    _prefixesrSÚ _has_prefixes_traverse_internalsÚprefixesz+:meth:`_expression.HasPrefixes.prefix_with`z.:paramref:`.HasPrefixes.prefix_with.*prefixes`Ú*©Údialectú#_TextCoercedExpressionArgument[Any]Ústrr\)rØrÛrŠcs"|jt‡fdd„|Dƒƒ|_|S)a‚Add one or more expressions following the statement keyword, i.e.
        SELECT, INSERT, UPDATE, or DELETE. Generative.
 
        This is used to support backend-specific prefix keywords such as those
        provided by MySQL.
 
        E.g.::
 
            stmt = table.insert().prefix_with("LOW_PRIORITY", dialect="mysql")
 
            # MySQL 5.7 optimizer hints
            stmt = select(table).prefix_with(
                "/*+ BKA(t1) */", dialect="mysql")
 
        Multiple prefixes can be specified by multiple calls
        to :meth:`_expression.HasPrefixes.prefix_with`.
 
        :param \*prefixes: textual or :class:`_expression.ClauseElement`
         construct which
         will be rendered following the INSERT, UPDATE, or DELETE
         keyword.
        :param dialect: optional string dialect name which will
         limit rendering of this prefix to only that dialect.
 
        csg|]}t tj|¡ˆf‘qSrŒ©rÚexpectrZStatementOptionRole©Ú.0ÚprÚrŒrÚ
<listcomp>žsÿz+HasPrefixes.prefix_with.<locals>.<listcomp>)rÖÚtuple)rŽrÛrØrŒrÚrÚ prefix_withys $
þÿzHasPrefixes.prefix_withN) r‘r’r“rÖÚ__annotations__rTÚdp_prefix_sequencer×r5rDrårŒrŒrŒrrÔrs
 ÿ ýýrÔc@sVeZdZUdZded<dejfgZded<ee    dddƒd    d
œd d d dœdd„ƒƒZ
dS)Ú HasSuffixesrŒrÕÚ    _suffixesrSÚ _has_suffixes_traverse_internalsÚsuffixesz+:meth:`_expression.HasSuffixes.suffix_with`z.:paramref:`.HasSuffixes.suffix_with.*suffixes`rÙrÚrÜrÝr\)rërÛrŠcs"|jt‡fdd„|Dƒƒ|_|S)aÎAdd one or more expressions following the statement as a whole.
 
        This is used to support backend-specific suffix keywords on
        certain constructs.
 
        E.g.::
 
            stmt = select(col1, col2).cte().suffix_with(
                "cycle empno set y_cycle to 1 default 0", dialect="oracle")
 
        Multiple suffixes can be specified by multiple calls
        to :meth:`_expression.HasSuffixes.suffix_with`.
 
        :param \*suffixes: textual or :class:`_expression.ClauseElement`
         construct which
         will be rendered following the target clause.
        :param dialect: Optional string dialect name which will
         limit rendering of this suffix to only that dialect.
 
        csg|]}t tj|¡ˆf‘qSrŒrÞràrÚrŒrrãÍsÿz+HasSuffixes.suffix_with.<locals>.<listcomp>)rérä)rŽrÛrërŒrÚrÚ suffix_with­s 
þÿzHasSuffixes.suffix_withN) r‘r’r“rérærTrçrêr5rDrìrŒrŒrŒrrè¦s
 ÿ ýýrèc@sˆeZdZUe ¡Zded<dZded<dej    fdej
fgZ ded<dd    d    d
d œd d „Z e ddd    d    d
dœdd„ƒZdd    d    d
dœdd„ZdS)ÚHasHintsz/util.immutabledict[Tuple[FromClause, str], str]Ú_hintsrŒzTuple[Tuple[str, str], ...]Ú_statement_hintsrSÚ_has_hints_traverse_internalsrÙrÝr\)ÚtextÚ dialect_namerŠcCs| d||¡S)aØAdd a statement hint to this :class:`_expression.Select` or
        other selectable object.
 
        This method is similar to :meth:`_expression.Select.with_hint`
        except that
        it does not require an individual table, and instead applies to the
        statement as a whole.
 
        Hints here are specific to the backend database and may include
        directives such as isolation levels, file directives, fetch directives,
        etc.
 
        .. seealso::
 
            :meth:`_expression.Select.with_hint`
 
            :meth:`_expression.Select.prefix_with` - generic SELECT prefixing
            which also can suit some database-specific HINT syntaxes such as
            MySQL optimizer hints
 
        N©Ú
_with_hint)rŽrñròrŒrŒrÚwith_statement_hintàszHasHints.with_statement_hintra)rrñròrŠcCs| |||¡S)aýAdd an indexing or other executional context hint for the given
        selectable to this :class:`_expression.Select` or other selectable
        object.
 
        The text of the hint is rendered in the appropriate
        location for the database backend in use, relative
        to the given :class:`_schema.Table` or :class:`_expression.Alias`
        passed as the
        ``selectable`` argument. The dialect implementation
        typically uses Python string substitution syntax
        with the token ``%(name)s`` to render the name of
        the table or alias. E.g. when using Oracle, the
        following::
 
            select(mytable).\
                with_hint(mytable, "index(%(name)s ix_mytable)")
 
        Would render SQL as::
 
            select /*+ index(mytable ix_mytable) */ ... from mytable
 
        The ``dialect_name`` option will limit the rendering of a particular
        hint to a particular backend. Such as, to add hints for both Oracle
        and Sybase simultaneously::
 
            select(mytable).\
                with_hint(mytable, "index(%(name)s ix_mytable)", 'oracle').\
                with_hint(mytable, "WITH INDEX ix_mytable", 'mssql')
 
        .. seealso::
 
            :meth:`_expression.Select.with_statement_hint`
 
        ró©rŽrrñròrŒrŒrÚ    with_hintøs*zHasHints.with_hintzOptional[_FromClauseArgument]cCsB|dkr|j||ff7_n |j t tj|¡|f|i¡|_|Sr‹)rïrîÚunionrrßrÚFromClauseRolerörŒrŒrrô$s þüÿzHasHints._with_hintN)rÙ)rÙ)r‘r’r“rXZ immutabledictrîrærïrTZdp_statement_hint_listZdp_table_hint_listrðrõr5r÷rôrŒrŒrŒrríÕs
þ
 þ ü+ríc@seZdZUdZdZdZejddœdd„ƒZde    d    <d
e    d <d Z
d e    d<dZ dZ dZ dZddœdd„ZdZddddddœdd„Zd[dddddœdd„Zd\d dddœdd „Zd]d!d d"d#d$œd%d&„Zddd'œd(d)„Zddd*œd+d,„Zejd-dœd.d/„ƒZdd0d'œd1d2„Zejd3dœd4d5„ƒZejd3dœd6d7„ƒZejd3dœd8d9„ƒZejd:dœd;d<„ƒZejd=dœd>d?„ƒZejd@dœdAdB„ƒZd0dœdCdD„ZejdEdœdFdG„ƒZ d0dœdHdI„Z!e"ddœdJdK„ƒZ#d0dœdLdM„Z$dNd0dOœdPdQ„Z%d ddRœd dddœdSdT„Z&e'r
d^dUdVdWœdXdY„Z(d S)_r…aERepresent an element that can be used within the ``FROM``
    clause of a ``SELECT`` statement.
 
    The most common forms of :class:`_expression.FromClause` are the
    :class:`_schema.Table` and the :func:`_expression.select` constructs.  Key
    features common to all :class:`_expression.FromClause` objects include:
 
    * a :attr:`.c` collection, which provides per-name access to a collection
      of :class:`_expression.ColumnElement` objects.
    * a :attr:`.primary_key` attribute, which is a collection of all those
      :class:`_expression.ColumnElement`
      objects that indicate the ``primary_key`` flag.
    * Methods to generate various derivations of a "from" clause, including
      :meth:`_expression.FromClause.alias`,
      :meth:`_expression.FromClause.join`,
      :meth:`_expression.FromClause.select`.
 
 
    r¥FúIterable[FromClause]r‰cCsdS©NrŒrŒrrŒrŒrÚ _hide_fromsPszFromClause._hide_fromsr¢Ú _is_clone_ofzColumnCollection[Any, Any]Ú_columnsNr¹ÚschemaTú Select[Any]cCst|ƒS)a#Return a SELECT of this :class:`_expression.FromClause`.
 
 
        e.g.::
 
            stmt = some_table.select().where(some_table.c.id == 5)
 
        .. seealso::
 
            :func:`_expression.select` - general purpose
            method which allows for arbitrary column lists.
 
        ©ÚSelectrrŒrŒrÚselectgszFromClause.selectraz)Optional[_ColumnExpressionArgument[bool]]r£ÚJoin)ÚrightÚonclauseÚisouterÚfullrŠcCst|||||ƒS)aaReturn a :class:`_expression.Join` from this
        :class:`_expression.FromClause`
        to another :class:`FromClause`.
 
        E.g.::
 
            from sqlalchemy import join
 
            j = user_table.join(address_table,
                            user_table.c.id == address_table.c.user_id)
            stmt = select(user_table).select_from(j)
 
        would emit SQL along the lines of::
 
            SELECT user.id, user.name FROM user
            JOIN address ON user.id = address.user_id
 
        :param right: the right side of the join; this is any
         :class:`_expression.FromClause` object such as a
         :class:`_schema.Table` object, and
         may also be a selectable-compatible object such as an ORM-mapped
         class.
 
        :param onclause: a SQL expression representing the ON clause of the
         join.  If left at ``None``, :meth:`_expression.FromClause.join`
         will attempt to
         join the two tables based on a foreign key relationship.
 
        :param isouter: if True, render a LEFT OUTER JOIN, instead of JOIN.
 
        :param full: if True, render a FULL OUTER JOIN, instead of LEFT OUTER
         JOIN.  Implies :paramref:`.FromClause.join.isouter`.
 
        .. seealso::
 
            :func:`_expression.join` - standalone function
 
            :class:`_expression.Join` - the type of object produced
 
        ©r)rŽrrrrrŒrŒrÚjoinws0zFromClause.join)rrrrŠcCst|||d|ƒS)aëReturn a :class:`_expression.Join` from this
        :class:`_expression.FromClause`
        to another :class:`FromClause`, with the "isouter" flag set to
        True.
 
        E.g.::
 
            from sqlalchemy import outerjoin
 
            j = user_table.outerjoin(address_table,
                            user_table.c.id == address_table.c.user_id)
 
        The above is equivalent to::
 
            j = user_table.join(
                address_table,
                user_table.c.id == address_table.c.user_id,
                isouter=True)
 
        :param right: the right side of the join; this is any
         :class:`_expression.FromClause` object such as a
         :class:`_schema.Table` object, and
         may also be a selectable-compatible object such as an ORM-mapped
         class.
 
        :param onclause: a SQL expression representing the ON clause of the
         join.  If left at ``None``, :meth:`_expression.FromClause.join`
         will attempt to
         join the two tables based on a foreign key relationship.
 
        :param full: if True, render a FULL OUTER JOIN, instead of
         LEFT OUTER JOIN.
 
        .. seealso::
 
            :meth:`_expression.FromClause.join`
 
            :class:`_expression.Join`
 
        Tr    )rŽrrrrŒrŒrÚ    outerjoin©s/zFromClause.outerjoinÚNamedFromClause©r¼ÚflatrŠcCstj||dS)atReturn an alias of this :class:`_expression.FromClause`.
 
        E.g.::
 
            a2 = some_table.alias('a2')
 
        The above code creates an :class:`_expression.Alias`
        object which can be used
        as a FROM clause in any SELECT statement.
 
        .. seealso::
 
            :ref:`tutorial_using_aliases`
 
            :func:`_expression.alias`
 
        r¾)rÆrÀ©rŽr¼rrŒrŒrrÈÚszFromClause.aliasúUnion[float, Function[Any]]ú*Optional[roles.ExpressionElementRole[Any]]Ú TableSample)Úsamplingr¼ÚseedrŠcCstj||||dS)aWReturn a TABLESAMPLE alias of this :class:`_expression.FromClause`.
 
        The return value is the :class:`_expression.TableSample`
        construct also
        provided by the top-level :func:`_expression.tablesample` function.
 
        .. seealso::
 
            :func:`_expression.tablesample` - usage guidelines and parameters
 
        )rr¼r)rrÀ)rŽrr¼rrŒrŒrÚ tablesampleñs ÿzFromClause.tablesampler¤cCs
||jkS)zÂReturn ``True`` if this :class:`_expression.FromClause` is
        'derived' from the given ``FromClause``.
 
        An example would be an Alias of a Table is derived from that Table.
 
        )Ú _cloned_setr¦rŒrŒrr§s
zFromClause.is_derived_from©ÚotherrŠcCst|j |j¡ƒS)zïReturn ``True`` if this :class:`_expression.FromClause` and
        the other represent the same lexical identity.
 
        This tests if either one is a copy of the other, or
        if they are the same via annotation identity.
 
        )r£rÚ intersection©rŽrrŒrŒrÚ_is_lexical_equivalentsz!FromClause._is_lexical_equivalentrÝcCst|d|jjdƒS)z|A brief description of this :class:`_expression.FromClause`.
 
        Used primarily for error message formatting.
 
        r¼z object)ÚgetattrÚ    __class__r‘rrŒrŒrÚ descriptionszFromClause.descriptionr¨cs ˆj ‡fdd„|jDƒ¡dS)Nc3s|]}| ˆ¡VqdSr‹©Ú _make_proxy©ráÚcol©r¥rŒrÚ    <genexpr>(szAFromClause._generate_fromclause_column_proxies.<locals>.<genexpr>)rþÚ_populate_separate_keysÚcr¦rŒr#rr©%sÿz.FromClause._generate_fromclause_column_proxiesú6ReadOnlyColumnCollection[str, KeyedColumnElement[Any]]cCs|jS)aéA :class:`_expression.ColumnCollection`
        that represents the "exported"
        columns of this :class:`_expression.Selectable`.
 
        The "exported" columns for a :class:`_expression.FromClause`
        object are synonymous
        with the :attr:`_expression.FromClause.columns` collection.
 
        .. versionadded:: 1.4
 
        .. seealso::
 
            :attr:`_expression.Selectable.exported_columns`
 
            :attr:`_expression.SelectBase.exported_columns`
 
 
        ©r&rrŒrŒrr®,szFromClause.exported_columnscCs|jS)a¶A named-based collection of :class:`_expression.ColumnElement`
        objects maintained by this :class:`_expression.FromClause`.
 
        The :attr:`.columns`, or :attr:`.c` collection, is the gateway
        to the construction of SQL expressions using table-bound or
        other selectable-bound columns::
 
            select(mytable).where(mytable.c.somecolumn == 5)
 
        :return: a :class:`.ColumnCollection` object.
 
        r(rrŒrŒrÚcolumnsDszFromClause.columnscCs$d|jkr| ¡| ¡|j ¡S)zk
        A synonym for :attr:`.FromClause.columns`
 
        :return: a :class:`.ColumnCollection`
 
        rþ)Ú__dict__Ú_init_collectionsÚ_populate_column_collectionrþÚ as_readonlyrrŒrŒrr&Vs
z FromClause.cr1cCs|jS)a—Return a namespace used for name-based access in SQL expressions.
 
        This is the namespace that is used to resolve "filter_by()" type
        expressions, such as::
 
            stmt.filter_by(address='some address')
 
        It defaults to the ``.c`` collection, however internally it can
        be overridden using the "entity_namespace" annotation to deliver
        alternative results.
 
        r(rrŒrŒrrcszFromClause.entity_namespaceúIterable[NamedColumn[Any]]cCs| ¡| ¡|jS)apReturn the iterable collection of :class:`_schema.Column` objects
        which comprise the primary key of this :class:`_selectable.FromClause`.
 
        For a :class:`_schema.Table` object, this collection is represented
        by the :class:`_schema.PrimaryKeyConstraint` which itself is an
        iterable collection of :class:`_schema.Column` objects.
 
        )r+r,Ú primary_keyrrŒrŒrr/ss
zFromClause.primary_keyúIterable[ForeignKey]cCs| ¡| ¡|jS)aVReturn the collection of :class:`_schema.ForeignKey` marker objects
        which this FromClause references.
 
        Each :class:`_schema.ForeignKey` is a member of a
        :class:`_schema.Table`-wide
        :class:`_schema.ForeignKeyConstraint`.
 
        .. seealso::
 
            :attr:`_schema.Table.foreign_key_constraints`
 
        )r+r,Ú foreign_keysrrŒrŒrr1szFromClause.foreign_keyscCsdD]}|j |d¡qdS)aReset the attributes linked to the ``FromClause.c`` attribute.
 
        This collection is separate from all the other memoized things
        as it has shown to be sensitive to being cleared out in situations
        where enclosing code, typically in a replacement traversal scenario,
        has already established strong relationships
        with the exported columns.
 
        The collection is cleared for the case where a table is having a
        column added to it as well as within a Join during copy internals.
 
        )rþr)r&r/r1N)r*Úpop)rŽÚkeyrŒrŒrÚ_reset_column_collection“sz#FromClause._reset_column_collectionržcCsdd„|jDƒS)Ncss|]}t|ƒs|VqdSr‹r6©rár&rŒrŒrr$¦sz.FromClause._select_iterable.<locals>.<genexpr>r(rrŒrŒrÚ_select_iterable¤szFromClause._select_iterablecCsFd|jkst‚d|jkst‚d|jks*t‚tƒ|_tƒ|_tƒ|_dS)Nrþr/r1)r*ÚAssertionErrorr;rþr<r/Úsetr1rrŒrŒrr+¨s zFromClause._init_collectionscCs
d|jkS)Nrþ)r*rrŒrŒrÚ_cols_populated±szFromClause._cols_populatedcCsdS)z˜Called on subclasses to establish the .c collection.
 
        Each implementation has a different way of establishing
        this collection.
 
        NrŒrrŒrŒrr,µsz&FromClause._populate_column_collectionr†rªcCs | ¡dS)aNGiven a column added to the .c collection of an underlying
        selectable, produce the local version of that column, assuming this
        selectable ultimately should proxy this column.
 
        this is used to "ping" a derived selectable to add a new column
        to its .c. collection when a Column has been added to one of the
        Table objects it ultimately derives from.
 
        If the given selectable hasn't populated its .c. collection yet,
        it should at least pass on the message to the contained selectables,
        but it will return None.
 
        This method is currently used by Declarative to allow Table
        columns to be added to a partially constructed inheritance
        mapping that may have already produced joins.  The method
        isn't public right now, as the full span of implications
        and/or caveats aren't yet clear.
 
        It's also possible that this functionality could be invoked by
        default via an event, which would require that
        selectables maintain a weak referencing collection of all
        derivations.
 
        N)r4r¬rŒrŒrr­½sz"FromClause._refresh_for_new_column©r¼rcCs |j|dS©Nr¾)rÈrrŒrŒrÚ_anonymous_fromclauseØsz FromClause._anonymous_fromclauseúOptional[OperatorType]zUnion[FromGrouping, Self]©ÚagainstrŠcCsdSr‹rŒ©rŽr?rŒrŒrÚ
self_groupßszFromClause.self_group)NFF)NF)NF)NN)N))r‘r’r“r¯rÐÚnamed_with_columnrXr”rürærÿrÑr°Ú_is_joinZ_use_schema_maprr
r rÈrr§rrr©r®r)Úro_memoized_propertyr&rr/r1r4r6r+r›r9r,r­r<rrArŒrŒrŒrr…8sr
     û5ü2ÿü 
      ÿÿc@s6eZdZUdZdZded<e d¡ddœdd    „ƒZd
S) r zˆA :class:`.FromClause` that has a name.
 
    Examples include tables, subqueries, CTEs, aliased tables.
 
    .. versionadded:: 2.0
 
    TrÝr¼zsqlalchemy.sql.sqltypesúTableValuedColumn[Any]r‰cCs t|tjƒS)apReturn a :class:`_sql.TableValuedColumn` object for this
        :class:`_expression.FromClause`.
 
        A :class:`_sql.TableValuedColumn` is a :class:`_sql.ColumnElement` that
        represents a complete row in a table. Support for this construct is
        backend dependent, and is supported in various forms by backends
        such as PostgreSQL, Oracle and SQL Server.
 
        E.g.:
 
        .. sourcecode:: pycon+sql
 
            >>> from sqlalchemy import select, column, func, table
            >>> a = table("a", column("id"), column("x"), column("y"))
            >>> stmt = select(func.row_to_json(a.table_valued()))
            >>> print(stmt)
            {printsql}SELECT row_to_json(a) AS row_to_json_1
            FROM a
 
        .. versionadded:: 1.4.0b2
 
        .. seealso::
 
            :ref:`tutorial_functions` - in the :ref:`unified_tutorial`
 
        )rOrÚ
TABLEVALUErrŒrŒrÚ table_valuedòszNamedFromClause.table_valuedN)    r‘r’r“r¯rBrærXrÓrGrŒrŒrŒrr ås
 
r c@s$eZdZdZdZdZdZeZdZdS)ÚSelectLabelStylezTLabel style constants that may be passed to
    :meth:`_sql.Select.set_label_style`.rrrVéN)    r‘r’r“r¯ÚLABEL_STYLE_NONEÚLABEL_STYLE_TABLENAME_PLUS_COLÚLABEL_STYLE_DISAMBIGUATE_ONLYÚLABEL_STYLE_DEFAULTZLABEL_STYLE_LEGACY_ORMrŒrŒrŒrrHs rHcsòeZdZUdZdZdejfdejfdejfdejfdejfgZde    d    <d
Z
d e    d<d e    d<d e    d<d e    d<d e    d<dSdddd d dœdd„Z e j ddœdd„ƒZdd dœdd„ZdTdddœd d!„Ze  d"¡d#dœd$d%„ƒZefd&d'd#d(œ‡fd)d*„ Zd+d#d,œ‡fd-d.„ Zd d d/d0œd1d2„Zeddd3œd d dd4d/d5œd6d7„ƒZedd8œd d d4d d9œd:d;„ƒZee  d"¡d dd d4d<d=œd>d?„ƒƒZed d d@dAd#dBœdCdD„ƒZdEdœdFdG„Ze  d"¡dUdHd dIdJœdKdL„ƒZe j dMdœdNdO„ƒZe j dPdœdQdR„ƒZ‡Z S)VraÛRepresent a ``JOIN`` construct between two
    :class:`_expression.FromClause`
    elements.
 
    The public constructor function for :class:`_expression.Join`
    is the module-level
    :func:`_expression.join()` function, as well as the
    :meth:`_expression.FromClause.join` method
    of any :class:`_expression.FromClause` (e.g. such as
    :class:`_schema.Table`).
 
    .. seealso::
 
        :func:`_expression.join`
 
        :meth:`_expression.FromClause.join`
 
    r
ÚleftrrrrrSÚ_traverse_internalsTr…zOptional[ColumnElement[bool]]r£NFraúOptional[_OnClauseArgument])rNrrrrcCsjt tj|¡|_t tj|¡ ¡|_|dkr@| |j|j¡|_nt tj    |¡jt
j d|_||_ ||_ dS)zñConstruct a new :class:`_expression.Join`.
 
        The usual entrypoint here is the :func:`_expression.join`
        function or the :meth:`_expression.FromClause.join` method of any
        :class:`_expression.FromClause` object.
 
        N©r?)rrßrrùrNrArÚ_match_primariesrÚ OnClauseRolerZ_asboolrr)rŽrNrrrrrŒrŒrÚ__init__Ÿs$þþ
ÿþz Join.__init__rÝr‰cCs$d|jjt|jƒ|jjt|jƒfS)Nz Join object on %s(%d) and %s(%d))rNrÚidrrrŒrŒrrÍs üzJoin.descriptionr¢r¤cCs(t|ƒt|ƒkp&|j |¡p&|j |¡Sr‹)ÚhashrNr§rr¦rŒrŒrr§Ös
 
ÿ
ûzJoin.is_derived_fromr=Ú FromGroupingr>cCst|ƒSr‹)rWr@rŒrŒrrAßszJoin.self_grouprÅr¨cCs‚tjj}dd„|jjDƒdd„|jjDƒ}|j | dd„|Dƒ|j    ¡¡|j
  dd„|Dƒ¡|j   tjdd„|DƒŽ¡dS)NcSsg|]}|‘qSrŒrŒr5rŒrŒrrãèsz4Join._populate_column_collection.<locals>.<listcomp>css|]}|jr|VqdSr‹)r/r5rŒrŒrr$îsz3Join._populate_column_collection.<locals>.<genexpr>css|]}|j|fVqdSr‹)Ú _tq_key_labelr!rŒrŒrr$ñscSsg|]
}|j‘qSrŒ)r1r!rŒrŒrrãõs)rXrÉrÊrNr&rr/ÚextendÚreduce_columnsrrþr%r1ÚupdateÚ    itertoolsÚchain)rŽÚsqlutilr)rŒrŒrr,ås ÿ ÿÿ ÿÿz Join._populate_column_collectionr„r©ÚcloneÚkwrŠc sptt t|jƒt|jƒ¡ƒ}‡‡fdd„|Dƒ‰ddddœ‡fdd„ }|ˆd    <tƒjfd
ˆiˆ—Ž| ¡dS) Ncsi|]}|ˆ|fˆŽ“qSrŒrŒ©ráÚf©r`rarŒrÚ
<dictcomp>sz(Join._copy_internals.<locals>.<dictcomp>ú/Union[BinaryExpression[Any], ColumnClause[Any]]rú0Optional[KeyedColumnElement[ColumnElement[Any]]]©ÚobjrarŠcs,t|tƒr(|jˆkr(ˆ|j |¡}|SdSr‹©Ú
isinstancerJÚtablerÏ©riraZnewelem©Ú    new_fromsrŒrÚreplace sz%Join._copy_internals.<locals>.replacerpr`)    r8r\r]r4rNrÚsuperÚ_copy_internalsÚ_reset_memoizations)rŽr`raÚ all_the_fromsrp©r©r`rarorrrøsþÿ        zJoin._copy_internalsr†rªcs(tƒ |¡|j |¡|j |¡dSr‹)rqr­rNrr¬rurŒrr­s  zJoin._refresh_for_new_columnr•)rNrrŠcCs&t|tƒr|j}nd}|j|||dS)N)Úa_subset)rkrrÚ_join_condition)rŽrNrÚ
left_rightrŒrŒrrR$s
zJoin._match_primaries)rwÚconsider_as_foreign_keysz(Optional[AbstractSet[ColumnClause[Any]]])ÚaÚbrwrzrŠcCsž| ||||¡}t|ƒdkr,| ||||¡t|ƒdkrdt|tƒrHd}nd}t d|j|j|f¡‚dd„t|     ¡ƒdDƒ}t|ƒdkr’|dSt
|ŽSdS)    z…Create a join condition between two tables or selectables.
 
        See sqlalchemy.sql.util.join_condition() for full docs.
 
        rrzI Perhaps you meant to convert the right side to a subquery using alias()?ÚzACan't find any foreign key relationships between '%s' and '%s'.%scSsg|]\}}||k‘qSrŒrŒ)ráÚxÚyrŒrŒrrãVsz(Join._join_condition.<locals>.<listcomp>N) Ú_joincond_scan_left_rightÚlenÚ_joincond_trim_constraintsrkrWrWZNoForeignKeysErrorrÚlistÚvaluesÚand_)Úclsr{r|rwrzÚ constraintsÚhintÚcritrŒrŒrrx/s6ÿ ÿ 
ÿ þÿ zJoin._join_condition)rz)rNrrzrŠcCs0t|tƒr|j}nd}|j||||d}t|ƒS)N)r{r|rwrz)rkrrr€r£)r†rNrrzryr‡rŒrŒrÚ    _can_join\s
 
üzJoin._can_joinzjcollections.defaultdict[Optional[ForeignKeyConstraint], List[Tuple[ColumnClause[Any], ColumnClause[Any]]]])r{rwr|rzrŠc CsÀtjj}t tj|¡}t tj|¡}t t    ¡}||fD]‚}|dkrFq6t
|j dd„dD]”}|dk    rp|j |krpqXz|  |¡}    WnNtjk
rÌ}
z.dd„| |¡Dƒ} |
j| kr´‚nWY¢qXW5d}
~
XYnX|    dk    rX||j |    |j f¡qX||k    r°t
|j dd„dD]¤}|dk    r(|j |kr(q
z|  |¡}    WnTtjk
rŠ}
z2dd„| |¡Dƒ} |
j| krp‚n
WY¢q
W5d}
~
XYnX|    dk    r
||j |    |j f¡q
|r6q¼q6|S)NcSs|jjSr‹©ÚparentZ_creation_order©ÚfkrŒrŒrÚ<lambda>óz0Join._joincond_scan_left_right.<locals>.<lambda>©r3cSsh|]
}|j’qSrŒr¾©ráÚtrŒrŒrÚ    <setcomp>™sz1Join._joincond_scan_left_right.<locals>.<setcomp>cSs|jjSr‹r‹rrŒrŒrr¤rcSsh|]
}|j’qSrŒr¾r’rŒrŒrr”®s)rXrÉrÊrrßrrùÚ collectionsÚ defaultdictrƒÚsortedr1rŒZ get_referentrWZNoReferenceErrorZ find_tablesZ
table_nameÚ
constraintÚappend) r†r{rwr|rzrÊr‡rNrŽr"ZnrteZ table_namesrŒrŒrr€ts` ýþ
ÿþ
 
þ
ÿþ 
zJoin._joincond_scan_left_rightzDict[Any, Any]z Optional[Any])r{r|r‡rzrŠcCs˜|r0t|ƒD]"}dd„|jDƒt|ƒkr ||=q t|ƒdkrrdd„| ¡Dƒ}t|ƒdkrrt|ƒd}|||i}t|ƒdkr”t d|j|jf¡‚dS)NcSsh|]
}|j’qSrŒ)rŒrbrŒrŒrr”Çsz2Join._joincond_trim_constraints.<locals>.<setcomp>rcSsh|] }t|ƒ’qSrŒ)rä)rár‰rŒrŒrr”Ïsrz®Can't determine join between '%s' and '%s'; tables have more than one foreign key constraint relationship between them. Please specify the 'onclause' of this join explicitly.)rƒÚelementsr8rr„rWZAmbiguousForeignKeysErrorr)r†r{r|r‡rzÚconstÚdeduper3rŒrŒrr‚ºs"  ÿ     
üÿzJoin._joincond_trim_constraintsrcCst|j|jƒ |¡S)ašCreate a :class:`_expression.Select` from this
        :class:`_expression.Join`.
 
        E.g.::
 
            stmt = table_a.join(table_b, table_a.c.id == table_b.c.a_id)
 
            stmt = stmt.select()
 
        The above will produce a SQL string resembling::
 
            SELECT table_a.id, table_a.col, table_b.id, table_b.a_id
            FROM table_a JOIN table_b ON table_a.id = table_b.a_id
 
        )rrNrÚ select_fromrrŒrŒrrÝsz Join.selectr¹ÚTODO_Anyr cCsŽtjj}|rp|dk    rt d¡‚|jjdd|jjdd}}| |¡     | |¡¡}|j
||  |j ¡|j |jdS| ¡ t¡ d¡ |¡SdS)Nz"Can't send name argument with flatT)r©rr)rXrÉrÊrWÚ ArgumentErrorrNr<rrËr]r
rÌrrrrÚset_label_stylerKÚ    correlaterÈ)rŽr¼rr^Zleft_aZright_aÚadapterrŒrŒrr<ïs0
  þ
ÿ
üÿþýÿzJoin._anonymous_fromclauserúcCstjdd„|jDƒŽS)NcSsg|]}t|j|jƒ‘qSrŒ)r4rNr)rár~rŒrŒrrãsz$Join._hide_froms.<locals>.<listcomp>)r\r]rrrŒrŒrrü sÿzJoin._hide_fromsrˆcCs|g}||jj|jjSr‹)rNr4r)rŽZ    self_listrŒrŒrr4szJoin._from_objects)NFF)N)NF)!r‘r’r“r¯rÐrTÚdp_clauseelementÚ
dp_booleanrOrærCrTrXr”rr§rArÓr,r+rrr­rRÚ classmethodrxrŠr€r‚rr<rür4Ú __classcell__rŒrŒrurrysd
û ú.
ÿÿ' ø,ùD"ÿrc@seZdZdddœdd„ZdS)ÚNoInitr)ÚargracOs*td|jj|jj ¡|jj ¡fƒ‚dS)Nz£The %s class is not intended to be constructed directly.  Please use the %s() standalone function or the %s() method available from appropriate selectable objects.)r rr‘Úlower©rŽr©rarŒrŒrrTs
 
ýüÿzNoInit.__init__N)r‘r’r“rTrŒrŒrŒrr¨sr¨c@seZdZdZdS)rºz>mark a FROM clause as being able to render directly as LATERALNr¶rŒrŒrŒrrº(srºcseZdZUdZdZdZded<dejfdej    fgZ
ded<e d    d
œd d d d dœdd„ƒZ d    d
œd d ddœdd„Z dddœ‡fdd„ Zddœdd„Zejddœdd„ƒZejddœd d!„ƒZeddœd"d#„ƒZd$dd%œd&d'„Zefd(d dd)œ‡fd*d+„ Zed,dœd-d.„ƒZ‡ZS)/ÚAliasedReturnsRowszLBase class of aliases against tables, subqueries, and other
    selectables.TFrœÚelementr¼rSrONr¾rr¹r\)rr¼rarŠcKs$| |¡}|j|fd|i|—Ž|S)Nr¼)Ú__new__Ú_init)r†rr¼rarirŒrŒrrÀEs
zAliasedReturnsRows._constructr¨©rr¼rŠcCsptjtj||d|_||_||_|dkrft|tƒrR|jrRt    |ddƒ}t|t
ƒrRd}t
  t |ƒ|pbd¡}||_ dS)N©Zapply_propagate_attrsr¼Úanon)rrßrÚReturnsRowsRoler­Z
_orig_namerkr…rBrrEÚsafe_constructrUr¼)rŽrr¼rŒrŒrr¯Qs"ÿÿþ 
zAliasedReturnsRows._initr†rªcstƒ |¡|j |¡dSr‹)rqr­r­r¬rurŒrr­bs z*AliasedReturnsRows._refresh_for_new_columnr‰cCs|j |¡dSr‹©r­r©rrŒrŒrr,fsz.AliasedReturnsRows._populate_column_collectionrÝcCs|j}t|tƒrd}|S)NZanon_1)r¼rkrErÁrŒrŒrris
zAliasedReturnsRows.descriptionr£cCs|jjSr‹)r­Úimplicit_returningrrŒrŒrr¶qsz%AliasedReturnsRows.implicit_returningcCs|jS)z9Legacy for dialects that are referring to Alias.original.©r­rrŒrŒrÚoriginaluszAliasedReturnsRows.originalr¢r¤cCs||jkrdS|j |¡S©NT)rr­r§r¦rŒrŒrr§zs
z"AliasedReturnsRows.is_derived_fromr„r_c s2|j}tƒjfd|i|—Ž||jk    r.| ¡dS)Nr`)r­rqrrr4)rŽr`raZexisting_elementrurŒrrrs
z"AliasedReturnsRows._copy_internalsrˆcCs|gSr‹rŒrrŒrŒrr4sz AliasedReturnsRows._from_objects)r‘r’r“r¯Ú_is_from_containerÚ_supports_derived_columnsrærTr¤Ú dp_anon_namerOr¦rÀr¯r­r,rXr”rr¶r›r¸r§r+rrr4r§rŒrŒrurr¬6s0
þ ü ÿr¬c@seZdZUded<dS)ÚFromClauseAliasr…r­N©r‘r’r“rærŒrŒrŒrr½’s
r½c@s<eZdZUdZdZdZded<edddd    d
d œd d „ƒZdS)rÆaRepresents an table or selectable alias (AS).
 
    Represents an alias, as typically applied to any table or
    sub-select within a SQL statement using the ``AS`` keyword (or
    without the keyword on certain databases such as Oracle).
 
    This object is constructed from the :func:`_expression.alias` module
    level function as well as the :meth:`_expression.FromClause.alias`
    method available
    on all :class:`_expression.FromClause` subclasses.
 
    .. seealso::
 
        :meth:`_expression.FromClause.alias`
 
    rÈTr…r­NFr¹r£r )rr¼rrŠcCstjtj|ddj||dS)NT)Z allow_selectr:)rrßrrùrÈ)r†rr¼rrŒrŒrÚ_factory®sÿþzAlias._factory)NF)    r‘r’r“r¯rÐršrær¦r¿rŒrŒrŒrrƖs
ürÆcsÐeZdZUdZdZdZdZdZdZde    j
fde    j fde    j fde    j fd    e    j fgZd
ed <d d dd œddddddœ‡fdd„Zejddœdd„ƒZd$ddddœdd„Zd%dddœdd „Zd&dddd!œd"d#„Z‡ZS)'ÚTableValuedAliasaèAn alias against a "table valued" SQL function.
 
    This construct provides for a SQL function that returns columns
    to be used in the FROM clause of a SELECT statement.   The
    object is generated using the :meth:`_functions.FunctionElement.table_valued`
    method, e.g.:
 
    .. sourcecode:: pycon+sql
 
        >>> from sqlalchemy import select, func
        >>> fn = func.json_array_elements_text('["one", "two", "three"]').table_valued("value")
        >>> print(select(fn.c.value))
        {printsql}SELECT anon_1.value
        FROM json_array_elements_text(:json_array_elements_text_1) AS anon_1
 
    .. versionadded:: 1.4.0b2
 
    .. seealso::
 
        :ref:`tutorial_functions_table_valued` - in the :ref:`unified_tutorial`
 
    Ztable_valued_aliasTFr­r¼Ú_tableval_typeÚ_render_derivedÚ_render_derived_w_typesrSrON©r¼Útable_value_typeÚjoins_implicitlyrr¹zOptional[TableValueType]r£r¨)rr¼rÅrÆrŠcs.tƒj||d||_|dkr$tjn||_dSr;)rqr¯rÆrrFrÁ)rŽrr¼rÅrÆrurŒrr¯ás ÿýzTableValuedAlias._initrEr‰cCs t||jƒS)aReturn a column expression representing this
        :class:`_sql.TableValuedAlias`.
 
        This accessor is used to implement the
        :meth:`_functions.FunctionElement.column_valued` method. See that
        method for further details.
 
        E.g.:
 
        .. sourcecode:: pycon+sql
 
            >>> print(select(func.some_func().table_valued("value").column))
            {printsql}SELECT anon_1 FROM some_func() AS anon_1
 
        .. seealso::
 
            :meth:`_functions.FunctionElement.column_valued`
 
        )rOrÁrrŒrŒrr«òszTableValuedAlias.columnr cCs.tj|||j|jd}|jr*d|_|j|_|S)zÈReturn a new alias of this :class:`_sql.TableValuedAlias`.
 
        This creates a distinct FROM object that will be distinguished
        from the original one when used in a SQL statement.
 
        rÄT)rÀrÀrÁrÆrÂrÃ)rŽr¼rÚtvarŒrŒrrÈ
s
üzTableValuedAlias.aliasrºr»cCs|j|d}d|_|S)z¶Return a new :class:`_sql.TableValuedAlias` with the lateral flag
        set, so that it renders as LATERAL.
 
        .. seealso::
 
            :func:`_expression.lateral`
 
        r¾T)rÈr³)rŽr¼rÇrŒrŒrrÂ!s     zTableValuedAlias.lateral)r¼Ú
with_typesrŠcCs(tj|j||j|jd}d|_||_|S)a¾Apply "render derived" to this :class:`_sql.TableValuedAlias`.
 
        This has the effect of the individual column names listed out
        after the alias name in the "AS" sequence, e.g.:
 
        .. sourcecode:: pycon+sql
 
            >>> print(
            ...     select(
            ...         func.unnest(array(["one", "two", "three"])).
                        table_valued("x", with_ordinality="o").render_derived()
            ...     )
            ... )
            {printsql}SELECT anon_1.x, anon_1.o
            FROM unnest(ARRAY[%(param_1)s, %(param_2)s, %(param_3)s]) WITH ORDINALITY AS anon_1(x, o)
 
        The ``with_types`` keyword will render column types inline within
        the alias expression (this syntax currently applies to the
        PostgreSQL database):
 
        .. sourcecode:: pycon+sql
 
            >>> print(
            ...     select(
            ...         func.json_to_recordset(
            ...             '[{"a":1,"b":"foo"},{"a":"2","c":"bar"}]'
            ...         )
            ...         .table_valued(column("a", Integer), column("b", String))
            ...         .render_derived(with_types=True)
            ...     )
            ... )
            {printsql}SELECT anon_1.a, anon_1.b FROM json_to_recordset(:json_to_recordset_1)
            AS anon_1(a INTEGER, b VARCHAR)
 
        :param name: optional string name that will be applied to the alias
         generated.  If left as None, a unique anonymizing name will be used.
 
        :param with_types: if True, the derived columns will include the
         datatype specification with each column. This is a special syntax
         currently known to be required by PostgreSQL for some SQL functions.
 
        rÄT)rÀrÀr­rÁrÆrÂrÃ)rŽr¼rÈZ    new_aliasrŒrŒrÚrender_derived.s8üzTableValuedAlias.render_derived)NF)N)NF)r‘r’r“r¯rÐr»rÂrÃrÆrTr¤r¼Údp_typer¥rOrær¯rBÚmemoized_attributer«rÈrÂrÉr§rŒrŒrurrÀºs2
û úÿýrÀc@s4eZdZdZdZdZdZed ddddœd    d
„ƒZdS) r¿aÞRepresent a LATERAL subquery.
 
    This object is constructed from the :func:`_expression.lateral` module
    level function as well as the :meth:`_expression.FromClause.lateral`
    method available
    on all :class:`_expression.FromClause` subclasses.
 
    While LATERAL is part of the SQL standard, currently only more recent
    PostgreSQL versions provide support for this keyword.
 
    .. seealso::
 
        :ref:`tutorial_lateral_correlation` -  overview of usage.
 
    rÂTNz&Union[SelectBase, _FromClauseArgument]r¹rºr°cCstjtj|ddj|dS)NT)Zexplicit_subqueryr¾)rrßrrùr©r†rr¼rŒrŒrr¿‡sÿþzLateral._factory)N)    r‘r’r“r¯rÐr³ršr¦r¿rŒrŒrŒrr¿qsýr¿cs’eZdZUdZdZejdejfdejfgZde    d<e
ddd    d
d dd œd d„ƒZ e   d¡dddœdd
d    d ddœ‡fdd„ƒZddœdd„Z‡ZS)raIRepresent a TABLESAMPLE clause.
 
    This object is constructed from the :func:`_expression.tablesample` module
    level function as well as the :meth:`_expression.FromClause.tablesample`
    method
    available on all :class:`_expression.FromClause` subclasses.
 
    .. seealso::
 
        :func:`_expression.tablesample`
 
    rrrrSrONrarr¹r)rrr¼rrŠcCst tj|¡j|||dS)N©r¼r)rrßrrùr)r†rrr¼rrŒrŒrr¿ªs
ÿzTableSample._factoryzsqlalchemy.sql.functionsrÍrr¨)rr¼rrrŠcsL|dk    s t‚tjj}t||jƒs,|j |¡}||_||_    t
ƒj ||ddSr;) r7rXrÉZ sql_functionsrkrÚfuncÚsystemrrrqr¯)rŽrr¼rrÚ    functionsrurŒrr¯¶s       zTableSample._initz Function[Any]r‰cCs|jSr‹)rrrŒrŒrÚ _get_methodÈszTableSample._get_method)NN)r‘r’r“r¯rÐr¬rOrTr¤rær¦r¿rXrÓr¯rÑr§rŒrŒrurr’s"
 þÿÿ
û ú rc sþeZdZUdZdZejdejfdejfdej    fdej    fge
j e j Zded<d    ed
<ed(d    d dddœdd„ƒZd d d d d d d dœdd ddddddddœ    ‡fdd„Zddœdd„Zd)d dddœdd„Zd dd!œd"d#„Zd dd!œd$d%„Zddœd&d'„Z‡ZS)*ÚCTEaURepresent a Common Table Expression.
 
    The :class:`_expression.CTE` object is obtained using the
    :meth:`_sql.SelectBase.cte` method from any SELECT statement. A less often
    available syntax also allows use of the :meth:`_sql.HasCTE.cte` method
    present on :term:`DML` constructs such as :class:`_sql.Insert`,
    :class:`_sql.Update` and
    :class:`_sql.Delete`.   See the :meth:`_sql.HasCTE.cte` method for
    usage details on CTEs.
 
    .. seealso::
 
        :ref:`tutorial_subqueries_ctes` - in the 2.0 tutorial
 
        :meth:`_sql.HasCTE.cte` - examples of calling styles
 
    ÚcteÚ
_cte_aliasÚ    _restatesÚ    recursiveÚnestingrSrOÚHasCTEr­NFr¹r£)rr¼rÖrŠcCst tj|¡j||dS)z©Return a new :class:`_expression.CTE`,
        or Common Table Expression instance.
 
        Please see :meth:`_expression.HasCTE.cte` for detail on CTE usage.
 
        )r¼rÖ)rrßrÚ
HasCTERolerÓ)r†rr¼rÖrŒrŒrr¿ös ÿz CTE._factory)r¼rÖr×rÔrÕrÖrérz Optional[CTE]zOptional[Tuple[()]]r¨)    rr¼rÖr×rÔrÕrÖrérŠc    s@||_||_||_||_|r"||_|r,||_tƒj||ddSr;)rÖr×rÔrÕrÖrérqr¯)    rŽrr¼rÖr×rÔrÕrÖrérurŒrr¯s z    CTE._initr‰cCs(|jdk    r|j |¡n |j |¡dSr‹)rÔr©r­rrŒrŒrr,s
zCTE._populate_column_collectionr c    Cs"tj|j||j|j||j|jdS)a2Return an :class:`_expression.Alias` of this
        :class:`_expression.CTE`.
 
        This method is a CTE-specific specialization of the
        :meth:`_expression.FromClause.alias` method.
 
        .. seealso::
 
            :ref:`tutorial_using_aliases`
 
            :func:`_expression.alias`
 
        )r¼rÖr×rÔrÖré)rÒrÀr­rÖr×rÖrérrŒrŒrrÈ$sùz    CTE.aliasrgrc    GsFt|jƒstd|j›dƒ‚tj|jj|Ž|j|j|j||j    |j
dS)ažReturn a new :class:`_expression.CTE` with a SQL ``UNION``
        of the original CTE against the given selectables provided
        as positional arguments.
 
        :param \*other: one or more elements with which to create a
         UNION.
 
         .. versionchanged:: 1.4.28 multiple elements are now accepted.
 
        .. seealso::
 
            :meth:`_sql.HasCTE.cte` - examples of calling styles
 
        ú CTE element fz does not support union()©r¼rÖr×rÕrÖré) r%r­r7rÒrÀrør¼rÖr×rÖrérrŒrŒrrø<sÿ þ
ùz    CTE.unionc    GsFt|jƒstd|j›dƒ‚tj|jj|Ž|j|j|j||j    |j
dS)a¢Return a new :class:`_expression.CTE` with a SQL ``UNION ALL``
        of the original CTE against the given selectables provided
        as positional arguments.
 
        :param \*other: one or more elements with which to create a
         UNION.
 
         .. versionchanged:: 1.4.28 multiple elements are now accepted.
 
        .. seealso::
 
            :meth:`_sql.HasCTE.cte` - examples of calling styles
 
        rÚz does not support union_all()rÛ) r%r­r7rÒrÀÚ    union_allr¼rÖr×rÖrérrŒrŒrrÜYsÿ þ
ùz CTE.union_allcCs|jdk    r|jS|S)zÀ
        A recursive CTE is updated to attach the recursive part.
        Updated CTEs should still refer to the original CTE.
        This function returns this reference identifier.
        N)rÕrrŒrŒrÚ_get_reference_ctewszCTE._get_reference_cte)NF)NF)r‘r’r“r¯rÐr¬rOrTr¤r¥rÔr×rèrêrær¦r¿r¯r,rÈrørÜrÝr§rŒrŒrurrÒÌs@
üÿùøÿ
üö&rÒc@seZdZUded<dS)Ú_CTEOptsr£r×Nr¾rŒrŒrŒrrÞ€s
rÞc@s6eZdZUded<ded<ded<ded<ded<d    S)
Ú_ColumnsPlusNamesr¹Úrequired_label_nameÚ    proxy_keyÚfallback_label_nameú%Union[ColumnElement[Any], TextClause]r«r£ÚrepeatedNr¾rŒrŒrŒrrß„s
rßc@s2eZdZUdZeZded<d ddddœd    d
„ZdS) Ú SelectsRowszvSub-base of ReturnsRows for elements that deliver rows
    directly, namely SELECT and INSERT/UPDATE/DELETE..RETURNINGrHÚ _label_styleNr£zOptional[_SelectIterable]zList[_ColumnsPlusNames])Úanon_for_dupe_keyÚcolsrŠcCsj|dkr|j}t |j¡}i}g}|j}|jtk}|jtk}d}    |D]}
d} |
jsbd} } }nÚ|rŒtrvt    |
ƒsvt
‚d} } |
j pˆ|
j }n°trœt    |
ƒsœt
‚|r°|
j } } }n|
j } }d} | dkr<|
j}|dkr0|
j |k} |
||
j <d} } | r(|r|
 |    ¡}|    d7}    n|
 |    ¡}|    d7}    n|
j }n |} } }| dk    rLtrZt    |
ƒsZt
‚| |krDt|| ƒt|
ƒkr|rŒ|
j} }n
|
j } }|rú| |krút|| ƒt|
ƒksÀt
‚|rÞ|
 |    ¡} }|    d7}    n|
 |    ¡} }|    d7}    d} n|
|| <n>|rL|r(|
 |    ¡} }|    d7}    n|
 |    ¡} }|    d7}    d} n|
|| <|t| ||
ƒ||
| ƒƒqD|S)acGenerate column names as rendered in a SELECT statement by
        the compiler.
 
        This is distinct from the _column_naming_convention generator that's
        intended for population of .c collections and similar, which has
        different rules.   the collection returned here calls upon the
        _column_naming_convention as well.
 
        NrFT)r¡Ú SelectStateÚ_column_naming_conventionrær™rKrJZ_render_label_in_columns_clauserr$r7Z_non_anon_labelZ_anon_name_labelÚ    _tq_labelZ_expression_labelZ_dedupe_anon_tq_label_idxZ_dedupe_anon_label_idxrVZ_anon_tq_labelrß)rŽrçrèZkey_naming_conventionÚnamesÚresultZ result_appendÚtable_qualifiedZlabel_style_noneZ dedupe_hashr&räZeffective_nameràrâZ
expr_labelrŒrŒrÚ_generate_columns_plus_names«sÌÿ
 
 
þþ  þþ
 
 
 
 
ÿ
ÿ
þ
 
þÿþþ
þ
þ
þûÿ
z(SelectsRows._generate_columns_plus_names)N)r‘r’r“r¯rJrærærïrŒrŒrŒrrå¥s
 ýråc@sxeZdZUdZdejfdejfgZded<dZ    ded<dZ
ded<e d    d
œd d d dœdd„ƒZ ddd d d dœdd„Z dS)rØz3Mixin that declares a class to include CTE support.Ú_independent_ctesÚ_independent_ctes_optsrSÚ_has_ctes_traverse_internalsrŒzTuple[CTE, ...]zTuple[_CTEOpts, ...]F)Ú    nest_hererÒr£r\)ÚctesrórŠcGsDt|ƒ}|D]2}t tj|¡}|j|f7_|j|f7_q |S)aSAdd one or more :class:`_sql.CTE` constructs to this statement.
 
        This method will associate the given :class:`_sql.CTE` constructs with
        the parent statement such that they will each be unconditionally
        rendered in the WITH clause of the final statement, even if not
        referenced elsewhere within the statement or any sub-selects.
 
        The optional :paramref:`.HasCTE.add_cte.nest_here` parameter when set
        to True will have the effect that each given :class:`_sql.CTE` will
        render in a WITH clause rendered directly along with this statement,
        rather than being moved to the top of the ultimate rendered statement,
        even if this statement is rendered as a subquery within a larger
        statement.
 
        This method has two general uses. One is to embed CTE statements that
        serve some purpose without being referenced explicitly, such as the use
        case of embedding a DML statement such as an INSERT or UPDATE as a CTE
        inline with a primary statement that may draw from its results
        indirectly.  The other is to provide control over the exact placement
        of a particular series of CTE constructs that should remain rendered
        directly in terms of a particular statement that may be nested in a
        larger statement.
 
        E.g.::
 
            from sqlalchemy import table, column, select
            t = table('t', column('c1'), column('c2'))
 
            ins = t.insert().values({"c1": "x", "c2": "y"}).cte()
 
            stmt = select(t).add_cte(ins)
 
        Would render::
 
            WITH anon_1 AS
            (INSERT INTO t (c1, c2) VALUES (:param_1, :param_2))
            SELECT t.c1, t.c2
            FROM t
 
        Above, the "anon_1" CTE is not referred towards in the SELECT
        statement, however still accomplishes the task of running an INSERT
        statement.
 
        Similarly in a DML-related context, using the PostgreSQL
        :class:`_postgresql.Insert` construct to generate an "upsert"::
 
            from sqlalchemy import table, column
            from sqlalchemy.dialects.postgresql import insert
 
            t = table("t", column("c1"), column("c2"))
 
            delete_statement_cte = (
                t.delete().where(t.c.c1 < 1).cte("deletions")
            )
 
            insert_stmt = insert(t).values({"c1": 1, "c2": 2})
            update_statement = insert_stmt.on_conflict_do_update(
                index_elements=[t.c.c1],
                set_={
                    "c1": insert_stmt.excluded.c1,
                    "c2": insert_stmt.excluded.c2,
                },
            ).add_cte(delete_statement_cte)
 
            print(update_statement)
 
        The above statement renders as::
 
            WITH deletions AS
            (DELETE FROM t WHERE t.c1 < %(c1_1)s)
            INSERT INTO t (c1, c2) VALUES (%(c1)s, %(c2)s)
            ON CONFLICT (c1) DO UPDATE SET c1 = excluded.c1, c2 = excluded.c2
 
        .. versionadded:: 1.4.21
 
        :param \*ctes: zero or more :class:`.CTE` constructs.
 
         .. versionchanged:: 2.0  Multiple CTE instances are accepted
 
        :param nest_here: if True, the given CTE or CTEs will be rendered
         as though they specified the :paramref:`.HasCTE.cte.nesting` flag
         to ``True`` when they were added to this :class:`.HasCTE`.
         Assuming the given CTEs are not referenced in an outer-enclosing
         statement as well, the CTEs given should render at the level of
         this statement when this flag is given.
 
         .. versionadded:: 2.0
 
         .. seealso::
 
            :paramref:`.HasCTE.cte.nesting`
 
 
        )rÞrrßrÚ    IsCTERolerðrñ)rŽrórôÚoptrÓrŒrŒrÚadd_cte_    s`ÿzHasCTE.add_cteNr¹)r¼rÖr×rŠcCstj||||dS)aý%Return a new :class:`_expression.CTE`,
        or Common Table Expression instance.
 
        Common table expressions are a SQL standard whereby SELECT
        statements can draw upon secondary statements specified along
        with the primary statement, using a clause called "WITH".
        Special semantics regarding UNION can also be employed to
        allow "recursive" queries, where a SELECT statement can draw
        upon the set of rows that have previously been selected.
 
        CTEs can also be applied to DML constructs UPDATE, INSERT
        and DELETE on some databases, both as a source of CTE rows
        when combined with RETURNING, as well as a consumer of
        CTE rows.
 
        SQLAlchemy detects :class:`_expression.CTE` objects, which are treated
        similarly to :class:`_expression.Alias` objects, as special elements
        to be delivered to the FROM clause of the statement as well
        as to a WITH clause at the top of the statement.
 
        For special prefixes such as PostgreSQL "MATERIALIZED" and
        "NOT MATERIALIZED", the :meth:`_expression.CTE.prefix_with`
        method may be
        used to establish these.
 
        .. versionchanged:: 1.3.13 Added support for prefixes.
           In particular - MATERIALIZED and NOT MATERIALIZED.
 
        :param name: name given to the common table expression.  Like
         :meth:`_expression.FromClause.alias`, the name can be left as
         ``None`` in which case an anonymous symbol will be used at query
         compile time.
        :param recursive: if ``True``, will render ``WITH RECURSIVE``.
         A recursive common table expression is intended to be used in
         conjunction with UNION ALL in order to derive rows
         from those already selected.
        :param nesting: if ``True``, will render the CTE locally to the
         statement in which it is referenced.   For more complex scenarios,
         the :meth:`.HasCTE.add_cte` method using the
         :paramref:`.HasCTE.add_cte.nest_here`
         parameter may also be used to more carefully
         control the exact placement of a particular CTE.
 
         .. versionadded:: 1.4.24
 
         .. seealso::
 
            :meth:`.HasCTE.add_cte`
 
        The following examples include two from PostgreSQL's documentation at
        https://www.postgresql.org/docs/current/static/queries-with.html,
        as well as additional examples.
 
        Example 1, non recursive::
 
            from sqlalchemy import (Table, Column, String, Integer,
                                    MetaData, select, func)
 
            metadata = MetaData()
 
            orders = Table('orders', metadata,
                Column('region', String),
                Column('amount', Integer),
                Column('product', String),
                Column('quantity', Integer)
            )
 
            regional_sales = select(
                                orders.c.region,
                                func.sum(orders.c.amount).label('total_sales')
                            ).group_by(orders.c.region).cte("regional_sales")
 
 
            top_regions = select(regional_sales.c.region).\
                    where(
                        regional_sales.c.total_sales >
                        select(
                            func.sum(regional_sales.c.total_sales) / 10
                        )
                    ).cte("top_regions")
 
            statement = select(
                        orders.c.region,
                        orders.c.product,
                        func.sum(orders.c.quantity).label("product_units"),
                        func.sum(orders.c.amount).label("product_sales")
                ).where(orders.c.region.in_(
                    select(top_regions.c.region)
                )).group_by(orders.c.region, orders.c.product)
 
            result = conn.execute(statement).fetchall()
 
        Example 2, WITH RECURSIVE::
 
            from sqlalchemy import (Table, Column, String, Integer,
                                    MetaData, select, func)
 
            metadata = MetaData()
 
            parts = Table('parts', metadata,
                Column('part', String),
                Column('sub_part', String),
                Column('quantity', Integer),
            )
 
            included_parts = select(\
                parts.c.sub_part, parts.c.part, parts.c.quantity\
                ).\
                where(parts.c.part=='our part').\
                cte(recursive=True)
 
 
            incl_alias = included_parts.alias()
            parts_alias = parts.alias()
            included_parts = included_parts.union_all(
                select(
                    parts_alias.c.sub_part,
                    parts_alias.c.part,
                    parts_alias.c.quantity
                ).\
                where(parts_alias.c.part==incl_alias.c.sub_part)
            )
 
            statement = select(
                        included_parts.c.sub_part,
                        func.sum(included_parts.c.quantity).
                          label('total_quantity')
                    ).\
                    group_by(included_parts.c.sub_part)
 
            result = conn.execute(statement).fetchall()
 
        Example 3, an upsert using UPDATE and INSERT with CTEs::
 
            from datetime import date
            from sqlalchemy import (MetaData, Table, Column, Integer,
                                    Date, select, literal, and_, exists)
 
            metadata = MetaData()
 
            visitors = Table('visitors', metadata,
                Column('product_id', Integer, primary_key=True),
                Column('date', Date, primary_key=True),
                Column('count', Integer),
            )
 
            # add 5 visitors for the product_id == 1
            product_id = 1
            day = date.today()
            count = 5
 
            update_cte = (
                visitors.update()
                .where(and_(visitors.c.product_id == product_id,
                            visitors.c.date == day))
                .values(count=visitors.c.count + count)
                .returning(literal(1))
                .cte('update_cte')
            )
 
            upsert = visitors.insert().from_select(
                [visitors.c.product_id, visitors.c.date, visitors.c.count],
                select(literal(product_id), literal(day), literal(count))
                    .where(~exists(update_cte.select()))
            )
 
            connection.execute(upsert)
 
        Example 4, Nesting CTE (SQLAlchemy 1.4.24 and above)::
 
            value_a = select(
                literal("root").label("n")
            ).cte("value_a")
 
            # A nested CTE with the same name as the root one
            value_a_nested = select(
                literal("nesting").label("n")
            ).cte("value_a", nesting=True)
 
            # Nesting CTEs takes ascendency locally
            # over the CTEs at a higher level
            value_b = select(value_a_nested.c.n).cte("value_b")
 
            value_ab = select(value_a.c.n.label("a"), value_b.c.n.label("b"))
 
        The above query will render the second CTE nested inside the first,
        shown with inline parameters below as::
 
            WITH
                value_a AS
                    (SELECT 'root' AS n),
                value_b AS
                    (WITH value_a AS
                        (SELECT 'nesting' AS n)
                    SELECT value_a.n AS n FROM value_a)
            SELECT value_a.n AS a, value_b.n AS b
            FROM value_a, value_b
 
        The same CTE can be set up using the :meth:`.HasCTE.add_cte` method
        as follows (SQLAlchemy 2.0 and above)::
 
            value_a = select(
                literal("root").label("n")
            ).cte("value_a")
 
            # A nested CTE with the same name as the root one
            value_a_nested = select(
                literal("nesting").label("n")
            ).cte("value_a")
 
            # Nesting CTEs takes ascendency locally
            # over the CTEs at a higher level
            value_b = (
                select(value_a_nested.c.n).
                add_cte(value_a_nested, nest_here=True).
                cte("value_b")
            )
 
            value_ab = select(value_a.c.n.label("a"), value_b.c.n.label("b"))
 
        Example 5, Non-Linear CTE (SQLAlchemy 1.4.28 and above)::
 
            edge = Table(
                "edge",
                metadata,
                Column("id", Integer, primary_key=True),
                Column("left", Integer),
                Column("right", Integer),
            )
 
            root_node = select(literal(1).label("node")).cte(
                "nodes", recursive=True
            )
 
            left_edge = select(edge.c.left).join(
                root_node, edge.c.right == root_node.c.node
            )
            right_edge = select(edge.c.right).join(
                root_node, edge.c.left == root_node.c.node
            )
 
            subgraph_cte = root_node.union(left_edge, right_edge)
 
            subgraph = select(subgraph_cte)
 
        The above query will render 2 UNIONs inside the recursive CTE::
 
            WITH RECURSIVE nodes(node) AS (
                    SELECT 1 AS node
                UNION
                    SELECT edge."left" AS "left"
                    FROM edge JOIN nodes ON edge."right" = nodes.node
                UNION
                    SELECT edge."right" AS "right"
                    FROM edge JOIN nodes ON edge."left" = nodes.node
            )
            SELECT nodes.node FROM nodes
 
        .. seealso::
 
            :meth:`_orm.Query.cte` - ORM version of
            :meth:`_expression.HasCTE.cte`.
 
        )r¼rÖr×)rÒrÀ)rŽr¼rÖr×rŒrŒrrÓÈ    sÿz
HasCTE.cte)NFF)r‘r’r“r¯rTÚdp_clauseelement_listÚ dp_plain_objròrærðrñr5r÷rÓrŒrŒrŒrrØT    s
þ   jürØc@sXeZdZUdZdZdZdZded<edddddœd    d
„ƒZ    e
  d d ¡d dœdd„ƒZ dS)ÚSubquerya‰Represent a subquery of a SELECT.
 
    A :class:`.Subquery` is created by invoking the
    :meth:`_expression.SelectBase.subquery` method, or for convenience the
    :meth:`_expression.SelectBase.alias` method, on any
    :class:`_expression.SelectBase` subclass
    which includes :class:`_expression.Select`,
    :class:`_expression.CompoundSelect`, and
    :class:`_expression.TextualSelect`.  As rendered in a FROM clause,
    it represents the
    body of the SELECT statement inside of parenthesis, followed by the usual
    "AS <somename>" that defines all "alias" objects.
 
    The :class:`.Subquery` object is very similar to the
    :class:`_expression.Alias`
    object and can be used in an equivalent way.    The difference between
    :class:`_expression.Alias` and :class:`.Subquery` is that
    :class:`_expression.Alias` always
    contains a :class:`_expression.FromClause` object whereas
    :class:`.Subquery`
    always contains a :class:`_expression.SelectBase` object.
 
    .. versionadded:: 1.4 The :class:`.Subquery` class was added which now
       serves the purpose of providing an aliased version of a SELECT
       statement.
 
    ÚsubqueryTÚ
SelectBaser­Nr¹r°cCst tj|¡j|dS)z#Return a :class:`.Subquery` object.r¾)rrßrÚSelectStatementRolerûrÌrŒrŒrr¿ s ÿþzSubquery._factoryrÃaxThe :meth:`.Subquery.as_scalar` method, which was previously ``Alias.as_scalar()`` prior to version 1.4, is deprecated and will be removed in a future release; Please use the :meth:`_expression.Select.scalar_subquery` method of the :func:`_expression.select` construct before constructing a subquery object, or with the ORM use the :meth:`_query.Query.scalar_subquery` method.úScalarSelect[Any]r‰cCs|j t¡ ¡Sr‹)r­r¡rJÚscalar_subqueryrrŒrŒrÚ    as_scalar
s zSubquery.as_scalar)N) r‘r’r“r¯rÐZ _is_subqueryršrær¦r¿rXrÒrrŒrŒrŒrrúÛ
s
ÿ    þ
rúc@seZdZUdZdejfgZded<ded<ddœdd„Zd    d
œd d „Z    e
j d d
œdd„ƒZ e
j d d
œdd„ƒZ edd
œdd„ƒZedd
œdd„ƒZdddœdd„Zd4ddd d!œd"d#„Zd$dd%œd&d'„Ze
j d(d
œd)d*„ƒZe
j d+d
œd,d-„ƒZd.d
œd/d0„Zd.d    d1œd2d3„ZdS)5rWz%Represent a grouping of a FROM clauser­rSrOr…r·cCst tj|¡|_dSr‹)rrßrrùr­©rŽr­rŒrŒrrT! szFromGrouping.__init__r¨r‰cCsdSr‹rŒrrŒrŒrr+$ szFromGrouping._init_collectionsr'cCs|jjSr‹©r­r)rrŒrŒrr)' szFromGrouping.columnscCs|jjSr‹rrrŒrŒrr&- szFromGrouping.cr.cCs|jjSr‹)r­r/rrŒrŒrr/1 szFromGrouping.primary_keyr0cCs|jjSr‹)r­r1rrŒrŒrr15 szFromGrouping.foreign_keysr¢r£r¤cCs |j |¡Sr‹)r­r§r¦rŒrŒrr§9 szFromGrouping.is_derived_fromNFr¹ÚNamedFromGroupingr cCst|jj||dƒS)Nr:)rr­rÈrrŒrŒrrÈ< szFromGrouping.aliasr©rarŠcKst|jjf|ŽƒSr‹)rWr­r<©rŽrarŒrŒrr<A sz"FromGrouping._anonymous_fromclauserúcCs|jjSr‹)r­rürrŒrŒrrüD szFromGrouping._hide_fromsrˆcCs|jjSr‹©r­r4rrŒrŒrr4H szFromGrouping._from_objectszDict[str, FromClause]cCs
d|jiS©Nr­r·rrŒrŒrÚ __getstate__L szFromGrouping.__getstate__©ÚstaterŠcCs|d|_dSrr·©rŽr
rŒrŒrÚ __setstate__O szFromGrouping.__setstate__)NF)r‘r’r“r¯rTr¤rOrærTr+rXr”r)r&r›r/r1r§rÈr<rür4rr rŒrŒrŒrrW s2
ÿ ÿrWc@seZdZdZdZdS)rzLrepresent a grouping of a named FROM clause
 
    .. versionadded:: 2.0
 
    TN)r‘r’r“r¯ršrŒrŒrŒrrS srcsPeZdZUdZdZdejfdejfdejfgZde    d<dZ
d    e    d
<d Z e j d d œdd„ƒZd    dddœ‡fdd„ Zerœe jdd œdd„ƒZe jdd œdd„ƒZd    d œdd„Zdddœdd „Zdd œd!d"„Ze j d    d œd#d$„ƒZddd%œd&d'„Ze  d(¡d)d œd*d+„ƒZe  d(¡d,d œd-d.„ƒZe  d(¡d/d œd0d1„ƒZe jd2d œd3d4„ƒZ‡ZS)5Ú TableClausea-Represents a minimal "table" construct.
 
    This is a lightweight table object that has only a name, a
    collection of columns, which are typically produced
    by the :func:`_expression.column` function, and a schema::
 
        from sqlalchemy import table, column
 
        user = table("user",
                column("id"),
                column("name"),
                column("description"),
        )
 
    The :class:`_expression.TableClause` construct serves as the base for
    the more commonly used :class:`_schema.Table` object, providing
    the usual set of :class:`_expression.FromClause` services including
    the ``.c.`` collection and statement generation methods.
 
    It does **not** provide all the additional schema-level services
    of :class:`_schema.Table`, including constraints, references to other
    tables, or support for :class:`_schema.MetaData`-level services.
    It's useful
    on its own as an ad-hoc construct used to generate quick SQL
    statements when a more fully fledged :class:`_schema.Table`
    is not on hand.
 
    rlr)r¼rÿrSrOTrÝÚfullnameFzOptional[ColumnClause[Any]]r‰cCsdS)z4No PK or default support so no autoincrement column.NrŒrrŒrŒrÚ_autoincrement_column sz!TableClause._autoincrement_columnúColumnClause[Any]r)r¼r)racs–tƒ ¡||_tƒ|_tƒ|_tƒ|_|D]}|     |¡q,| 
dd¡}|dk    rV||_ |j dk    rtd|j |jf|_ n|j|_ |r’t  dt|ƒ¡‚dS)Nrÿz%s.%szUnsupported argument(s): %s)rqrTr¼r>rþr<r/r8r1Ú append_columnr2rÿrrWr rƒ)rŽr¼r)rar&rÿrurŒrrT” s
 
zTableClause.__init__z0ReadOnlyColumnCollection[str, ColumnClause[Any]]cCsdSr‹rŒrrŒrŒrr)© szTableClause.columnscCsdSr‹rŒrrŒrŒrr&­ sz TableClause.ccCs$|jdk    r|jd|jS|jSdS)NÚ.)rÿr¼rrŒrŒrÚ__str__± s
zTableClause.__str__r†r¨rªcCsdSr‹rŒr¬rŒrŒrr­· sz#TableClause._refresh_for_new_columncCsdSr‹rŒrrŒrŒrr+º szTableClause._init_collectionscCs|jSr‹r¾rrŒrŒrr½ szTableClause.description)r&rŠcCs@|j}|dk    r*||k    r*t d|j|f¡‚|j |¡||_dS)Nz1column object '%s' already assigned to table '%s')rlrWr r3rþÚadd)rŽr&ÚexistingrŒrŒrrÁ sÿÿ zTableClause.append_columnzsqlalchemy.sql.dmlzutil.preloaded.sql_dml.InsertcCstjj |¡S)zöGenerate an :class:`_sql.Insert` construct against this
        :class:`_expression.TableClause`.
 
        E.g.::
 
            table.insert().values(name='foo')
 
        See :func:`_expression.insert` for argument and usage information.
 
        )rXrÉÚsql_dmlZInsertrrŒrŒrÚinsertÌ s zTableClause.insertrycCstjj |¡S)aGenerate an :func:`_expression.update` construct against this
        :class:`_expression.TableClause`.
 
        E.g.::
 
            table.update().where(table.c.id==7).values(name='foo')
 
        See :func:`_expression.update` for argument and usage information.
 
        )rXrÉrryrrŒrŒrr[Û s ÿzTableClause.updaterxcCstjj |¡S)zýGenerate a :func:`_expression.delete` construct against this
        :class:`_expression.TableClause`.
 
        E.g.::
 
            table.delete().where(table.c.id==7)
 
        See :func:`_expression.delete` for argument and usage information.
 
        )rXrÉrrxrrŒrŒrÚdeleteë s zTableClause.deleterˆcCs|gSr‹rŒrrŒrŒrr4ù szTableClause._from_objects)r‘r’r“r¯rÐrTZ)dp_fromclause_canonical_column_collectionÚ    dp_stringrOræZ    _is_tabler¶rXrDrrTrr”r)r&rr­r+rrrÓrr[rr4r§rŒrŒrurr ] sB
þú       r Ú ForUpdateArgc@sÀeZdZUdejfdejfdejfdejfgZded<ded<ded<ded<ded<ed    d
d œd d „ƒZ    dddœdd„Z
dddœdd„Z ddœdd„Z ddddddœddddddœdd„Z dS)rÚofÚnowaitÚreadÚ skip_lockedrSrOz!Optional[Sequence[ClauseElement]]r£ÚForUpdateParameterúOptional[ForUpdateArg])Úwith_for_updaterŠcCs<t|tƒr|S|dkrdS|dkr(tƒStftd|ƒŽSdS)N)NFTúDict[str, Any])rkrr)r†r!rŒrŒrÚ_from_argument s
zForUpdateArg._from_argumentrrcCsFt|tƒoD|j|jkoD|j|jkoD|j|jkoD|j|jkoD|j|jkSr‹)rkrrrrÚ    key_sharerrrŒrŒrÚ__eq__ s
 
ÿ
þ
ý
ü
úzForUpdateArg.__eq__cCs | |¡ Sr‹)r%rrŒrŒrÚ__ne__% szForUpdateArg.__ne__Úintr‰cCst|ƒSr‹)rUrrŒrŒrÚ__hash__( szForUpdateArg.__hash__FN©rrrrr$úOptional[_ForUpdateOfArgument]cCsB||_||_||_||_|dk    r8dd„t |¡Dƒ|_nd|_dS)zZRepresents arguments specified to
        :meth:`_expression.Select.for_update`.
 
        NcSsg|]}t tj|¡‘qSrŒ©rrßrZColumnsClauseRole©ráÚelemrŒrŒrrã> sÿz)ForUpdateArg.__init__.<locals>.<listcomp>)rrrr$rXÚto_listr©rŽrrrrr$rŒrŒrrT+ sþ
zForUpdateArg.__init__)r‘r’r“rTrør¥rOrær¦r#r%r&r(rTrŒrŒrŒrr s(
ü  
ùcsüeZdZUdZdZdZded<ded<dejfdej    fd    ej
fd
ej fgZ d ed <d ddœddddœ‡fdd„Z eddœdd„ƒZed.ddddœdd„ƒZed/dddœdd „ƒZed!dd"œd#d$„ƒZd%dœd&d'„Zd(dœd)d*„Zejd+dœd,d-„ƒZ‡ZS)0ÚValueszáRepresent a ``VALUES`` construct that can be used as a FROM element
    in a statement.
 
    The :class:`_expression.Values` object is created from the
    :func:`_expression.values` function.
 
    .. versionadded:: 1.4
 
    r„rŒú!Tuple[List[Tuple[Any, ...]], ...]Ú_datar£Ú_unnamedÚ _column_argsr¼Ú literal_bindsrSrONF)r¼r5rr¹)r)r¼r5csRtƒ ¡||_|dkr2d|_t t|ƒd¡|_n d|_||_||_|j |_    dS)NTr²F)
rqrTr4r3rEr´rUr¼r5rB)rŽr¼r5r)rurŒrrT] s
zValues.__init__úList[TypeEngine[Any]]r‰cCsdd„|jDƒS)NcSsg|]
}|j‘qSrŒ©Útyper!rŒrŒrrãp sz(Values._column_types.<locals>.<listcomp>©r4rrŒrŒrÚ _column_typesn szValues._column_typesr\r cCs4|dkrt t|ƒd¡}n|}||_d|_d|_|S)aYReturn a new :class:`_expression.Values`
        construct that is a copy of this
        one with the given name.
 
        This method is a VALUES-specific specialization of the
        :meth:`_expression.FromClause.alias` method.
 
        .. seealso::
 
            :ref:`tutorial_using_aliases`
 
            :func:`_expression.alias`
 
        Nr²TF)rEr´rUr¼rBr3)rŽr¼rÚ non_none_namerŒrŒrrÈr sz Values.aliasrºr»cCs*|dkr|j}n|}d|_||_d|_|S)z»Return a new :class:`_expression.Values` with the lateral flag set,
        so that
        it renders as LATERAL.
 
        .. seealso::
 
            :func:`_expression.lateral`
 
        NTF)r¼r³r3)rŽr¼r;rŒrŒrr s zValues.lateralzList[Tuple[Any, ...]])r„rŠcCs|j|f7_|S)ajReturn a new :class:`_expression.Values` construct,
        adding the given data to the data list.
 
        E.g.::
 
            my_values = my_values.data([(1, 'value 1'), (2, 'value2')])
 
        :param values: a sequence (i.e. list) of tuples that map to the
         column expressions given in the :class:`_expression.Values`
         constructor.
 
        )r2)rŽr„rŒrŒrÚdata¦ sz Values.dataÚ ScalarValuescCst|j|j|jƒS)zReturns a scalar ``VALUES`` construct that can be used as a
        COLUMN element in a statement.
 
        .. versionadded:: 2.0.0b4
 
        )r=r4r2r5rrŒrŒrÚ scalar_values¸ szValues.scalar_valuesr¨cCs"|jD]}|j |¡||_qdSr‹)r4rþrrl)rŽr&rŒrŒrr,Á s
 z"Values._populate_column_collectionrˆcCs|gSr‹rŒrrŒrŒrr4Æ szValues._from_objects)NF)N)r‘r’r“r¯rÐr2rærTrøÚdp_dml_multi_valuesrr¥rOrTr›r:r5rÈrÂr<r>r,rXr”r4r§rŒrŒrurr0F s0
 
 ü
ü    r0csteZdZUdZdZdejfdejfdejfgZ    de
d<dd    d
d œ‡fd d „ Z e ddœdd„ƒZ ddœdd„Z‡ZS)r=a{Represent a scalar ``VALUES`` construct that can be used as a
    COLUMN element in a statement.
 
    The :class:`_expression.ScalarValues` object is created from the
    :meth:`_expression.Values.scalar_values` method. It's also
    automatically generated when a :class:`_expression.Values` is used in
    an ``IN`` or ``NOT IN`` condition.
 
    .. versionadded:: 2.0.0b4
 
    r>r4r2r5rSrOzSequence[ColumnClause[Any]]r1r£)r)r<r5cs tƒ ¡||_||_||_dSr‹)rqrTr4r2r5)rŽr)r<r5rurŒrrTà s
zScalarValues.__init__r6r‰cCsdd„|jDƒS)NcSsg|]
}|j‘qSrŒr7r!rŒrŒrrãí sz.ScalarValues._column_types.<locals>.<listcomp>r9rrŒrŒrr:ë szScalarValues._column_typescCs|Sr‹rŒrrŒrŒrÚ__clause_element__ï szScalarValues.__clause_element__)r‘r’r“r¯rÐrTrør?r¥rOrærTr›r:r@r§rŒrŒrurr=Ë s
 ý  r=c@s¢eZdZUdZdZdZeZded<dddœdd    „Z    e
j d
d œd d „ƒZ ddœddddœdd„Z e
j dd œdd„ƒZedd œdd„ƒZee
 dd¡dd œdd„ƒƒZedd œd d!„ƒZdd œd"d#„Zdd$d%œd&d'„Ze
 dd(¡d)d)d*d+œd,d-„ƒZejd.d œd/d0„ƒZd1d œd2d3„Ze
 dd4¡d5d œd6d7„ƒZd8d œd9d:„Zd5d œd;d<„Zd=d>d?œd@dA„ZdNd=dBd?œdCdD„ZdOd=d.d?œdEdF„Z d$d œdGdH„Z!dPd=dJd.dKœdLdM„Z"dS)Qrüz­Base class for SELECT statements.
 
 
    This includes :class:`_expression.Select`,
    :class:`_expression.CompoundSelect` and
    :class:`_expression.TextualSelect`.
 
 
    TrHrær†r¨rªcCs | ¡dSr‹)rsr¬rŒrŒrr­ sz"SelectBase._refresh_for_new_columnú)ColumnCollection[str, ColumnElement[Any]]r‰cCs
tƒ‚dS)a$A :class:`_expression.ColumnCollection`
        representing the columns that
        this SELECT statement or similar construct returns in its result set.
 
        This collection differs from the :attr:`_expression.FromClause.columns`
        collection of a :class:`_expression.FromClause` in that the columns
        within this collection cannot be directly nested inside another SELECT
        statement; a subquery must be applied first which provides for the
        necessary parenthesization required by SQL.
 
        .. note::
 
            The :attr:`_sql.SelectBase.selected_columns` collection does not
            include expressions established in the columns clause using the
            :func:`_sql.text` construct; these are silently omitted from the
            collection. To use plain textual column expressions inside of a
            :class:`_sql.Select` construct, use the :func:`_sql.literal_column`
            construct.
 
        .. seealso::
 
            :attr:`_sql.Select.selected_columns`
 
        .. versionadded:: 1.4
 
        NrŸrrŒrŒrÚselected_columns szSelectBase.selected_columnsN©Úproxy_compound_columnsr…ú0Optional[Iterable[Sequence[ColumnElement[Any]]]]©rûrDrŠcCs
tƒ‚dSr‹rŸ©rŽrûrDrŒrŒrr©. sz.SelectBase._generate_fromclause_column_proxiesržcCs
tƒ‚dS)a A sequence of expressions that correspond to what is rendered
        in the columns clause, including :class:`_sql.TextClause`
        constructs.
 
        .. versionadded:: 1.4.12
 
        .. seealso::
 
            :attr:`_sql.SelectBase.exported_columns`
 
        NrŸrrŒrŒrr¡8 s z SelectBase._all_selected_columnsz1ReadOnlyColumnCollection[str, ColumnElement[Any]]cCs
|j ¡S)afA :class:`_expression.ColumnCollection`
        that represents the "exported"
        columns of this :class:`_expression.Selectable`, not including
        :class:`_sql.TextClause` constructs.
 
        The "exported" columns for a :class:`_expression.SelectBase`
        object are synonymous
        with the :attr:`_expression.SelectBase.selected_columns` collection.
 
        .. versionadded:: 1.4
 
        .. seealso::
 
            :attr:`_expression.Select.exported_columns`
 
            :attr:`_expression.Selectable.exported_columns`
 
            :attr:`_expression.FromClause.exported_columns`
 
 
        )rBr-rrŒrŒrr®G szSelectBase.exported_columnsrÃa×The :attr:`_expression.SelectBase.c` and :attr:`_expression.SelectBase.columns` attributes are deprecated and will be removed in a future release; these attributes implicitly create a subquery that should be explicit.  Please call :meth:`_expression.SelectBase.subquery` first in order to create a subquery, which then contains this attribute.  To access the columns that this SELECT object SELECTs from, use the :attr:`_expression.SelectBase.selected_columns` attribute.r'cCs|jjSr‹)Ú_implicit_subqueryr)rrŒrŒrr&b sz SelectBase.ccCs|jSr‹r(rrŒrŒrr)s szSelectBase.columnscCs
tƒ‚dS)zX
        Retrieve the current label style.
 
        Implemented by subclasses.
 
        NrŸrrŒrŒrÚget_label_styley szSelectBase.get_label_styler\©ÚstylerŠcCs
tƒ‚dS)zeReturn a new selectable with the specified label style.
 
        Implemented by subclasses.
 
        NrŸ©rŽrKrŒrŒrr¡‚ szSelectBase.set_label_stylea The :meth:`_expression.SelectBase.select` method is deprecated and will be removed in a future release; this method implicitly creates a subquery that should be explicit.  Please call :meth:`_expression.SelectBase.subquery` first in order to create a subquery, which then can be selected.rr)r©rarŠcOs|jj||ŽSr‹)rHrr«rŒrŒrr‹ s
zSelectBase.selectrúcCs| ¡Sr‹©rûrrŒrŒrrH— szSelectBase._implicit_subqueryúTypeEngine[Any]cCs
tƒ‚dSr‹rŸrrŒrŒrÚ _scalar_type› szSelectBase._scalar_typez«The :meth:`_expression.SelectBase.as_scalar` method is deprecated and will be removed in a future release.  Please refer to :meth:`_expression.SelectBase.scalar_subquery`.rþcCs| ¡Sr‹)rÿrrŒrŒrrž szSelectBase.as_scalarÚExistscCst|ƒS)aaReturn an :class:`_sql.Exists` representation of this selectable,
        which can be used as a column expression.
 
        The returned object is an instance of :class:`_sql.Exists`.
 
        .. seealso::
 
            :func:`_sql.exists`
 
            :ref:`tutorial_exists` - in the :term:`2.0 style` tutorial.
 
        .. versionadded:: 1.4
 
        )rPrrŒrŒrÚexists¨ szSelectBase.existscCs|jtk    r| t¡}t|ƒS)aXReturn a 'scalar' representation of this selectable, which can be
        used as a column expression.
 
        The returned object is an instance of :class:`_sql.ScalarSelect`.
 
        Typically, a select statement which has only one column in its columns
        clause is eligible to be used as a scalar expression.  The scalar
        subquery can then be used in the WHERE clause or columns clause of
        an enclosing SELECT.
 
        Note that the scalar subquery differentiates from the FROM-level
        subquery that can be produced using the
        :meth:`_expression.SelectBase.subquery`
        method.
 
        .. versionchanged: 1.4 - the ``.as_scalar()`` method was renamed to
           :meth:`_expression.SelectBase.scalar_subquery`.
 
        .. seealso::
 
            :ref:`tutorial_scalar_subquery` - in the 2.0 tutorial
 
        )rærJr¡Ú ScalarSelectrrŒrŒrrÿ¹ s
 
zSelectBase.scalar_subqueryr¹z
Label[Any]r»cCs| ¡ |¡S)z¾Return a 'scalar' representation of this selectable, embedded as a
        subquery with a label.
 
        .. seealso::
 
            :meth:`_expression.SelectBase.scalar_subquery`.
 
        )rÿÚlabelrÁrŒrŒrrSÖ s    zSelectBase.labelrºcCs t ||¡S)r½)r¿r¿rÁrŒrŒrrÂá s zSelectBase.lateralcCstj| ¡|dS)aÈReturn a subquery of this :class:`_expression.SelectBase`.
 
        A subquery is from a SQL perspective a parenthesized, named
        construct that can be placed in the FROM clause of another
        SELECT statement.
 
        Given a SELECT statement such as::
 
            stmt = select(table.c.id, table.c.name)
 
        The above statement might look like::
 
            SELECT table.id, table.name FROM table
 
        The subquery form by itself renders the same way, however when
        embedded into the FROM clause of another SELECT statement, it becomes
        a named sub-element::
 
            subq = stmt.subquery()
            new_stmt = select(subq)
 
        The above renders as::
 
            SELECT anon_1.id, anon_1.name
            FROM (SELECT table.id, table.name FROM table) AS anon_1
 
        Historically, :meth:`_expression.SelectBase.subquery`
        is equivalent to calling
        the :meth:`_expression.FromClause.alias`
        method on a FROM object; however,
        as a :class:`_expression.SelectBase`
        object is not directly  FROM object,
        the :meth:`_expression.SelectBase.subquery`
        method provides clearer semantics.
 
        .. versionadded:: 1.4
 
        r¾)rúrÀÚ_ensure_disambiguated_namesrÁrŒrŒrrûî s(ÿzSelectBase.subquerycCs
tƒ‚dS)ztEnsure that the names generated by this selectbase will be
        disambiguated in some way, if possible.
 
        NrŸrrŒrŒrrTsz&SelectBase._ensure_disambiguated_namesFr£r cCs |j|dS)a.Return a named subquery against this
        :class:`_expression.SelectBase`.
 
        For a :class:`_expression.SelectBase` (as opposed to a
        :class:`_expression.FromClause`),
        this returns a :class:`.Subquery` object which behaves mostly the
        same as the :class:`_expression.Alias` object that is used with a
        :class:`_expression.FromClause`.
 
        .. versionchanged:: 1.4 The :meth:`_expression.SelectBase.alias`
           method is now
           a synonym for the :meth:`_expression.SelectBase.subquery` method.
 
        r¾rMrrŒrŒrrÈ"szSelectBase.alias)N)N)NF)#r‘r’r“r¯r±Ú    is_selectrJrærær­rXr”rBr©r¡r›r®rÒr&r)rIr¡rrBrËrHrOrrQrÿrSrÂrûrTrÈrŒrŒrŒrrüó sZ
    
 %ú
þ         þ    þ  ,    ÿrüÚ_SBc@süeZdZUdZdZdejfgZded<dZ    ded<ddd    œd
d „Z
d d œdd„Z dd œdd„Z dd dœdd„Z edd œdd„ƒZd/dddœdd„Zer¤dd œdd„Zdd œd!d"dd#œd$d%„Zejd&d œd'd(„ƒZejd)d œd*d+„ƒZejd,d œd-d.„ƒZdS)0ÚSelectStatementGroupingzÞRepresent a grouping of a :class:`_expression.SelectBase`.
 
    This differs from :class:`.Subquery` in that we are still
    an "inner" SELECT statement, this is strictly for grouping inside of
    compound selects.
 
    Zselect_statement_groupingr­rSrOTrVr¨©r­rŠcCsttt tj|¡ƒ|_dSr‹)rrVrrßrrýr­rrŒrŒrrTKs ÿz SelectStatementGrouping.__init__zSelectStatementGrouping[_SB]r‰cCs$|j ¡}||jk    rt|ƒS|SdSr‹)r­rTrW)rŽÚ new_elementrŒrŒrrTPs
 
z3SelectStatementGrouping._ensure_disambiguated_namesrHcCs
|j ¡Sr‹)r­rIrrŒrŒrrIWsz'SelectStatementGrouping.get_label_style©Ú label_stylerŠcCst|j |¡ƒSr‹)rWr­r¡)rŽr[rŒrŒrr¡Zs
ÿz'SelectStatementGrouping.set_label_stylecCs|jSr‹r·rrŒrŒrÚselect_statementasz(SelectStatementGrouping.select_statementNr=r\r>cCs|Sr‹rŒr@rŒrŒrrAesz"SelectStatementGrouping.self_groupcCsdSr‹rŒrrŒrŒrÚ_ungroupksz SelectStatementGrouping._ungrouprCr…rErFcCs|jj||ddS)NrCrµrGrŒrŒrr©ssÿz;SelectStatementGrouping._generate_fromclause_column_proxiesržcCs|jjSr‹)r­r¡rrŒrŒrr¡sz-SelectStatementGrouping._all_selected_columnsrAcCs|jjS)a:A :class:`_expression.ColumnCollection`
        representing the columns that
        the embedded SELECT statement returns in its result set, not including
        :class:`_sql.TextClause` constructs.
 
        .. versionadded:: 1.4
 
        .. seealso::
 
            :attr:`_sql.Select.selected_columns`
 
        )r­rBrrŒrŒrrBƒsz(SelectStatementGrouping.selected_columnsrˆcCs|jjSr‹rrrŒrŒrr4“sz%SelectStatementGrouping._from_objects)N)r‘r’r“r¯rÐrTr¤rOræZ_is_select_containerrTrTrIr¡r›r\rArr]r©rXr”r¡rBr4rŒrŒrŒrrW9s.
ÿ ú rWc    @seZdZUdZdZded<dZded<dZded<dZded    <dZ    ded
<dZ
d ed <dZ d ed<e fddœdd„Z eddddddœdddddddœdd„ƒZddœdd„Zdddœdd „Zed!dœd"d#„ƒZed!dœd$d%„ƒZdVd&d'd(d)d*œd+d,„Zed)d-d.d/œd0d1„ƒZed2d-d3d/œd4d1„ƒZdd-d5d/œd6d1„Zed3dœd7d8„ƒZd9dd:œd;d<„Zed3dœd=d>„ƒZeddœd?d@„ƒZed&ddAœdBdC„ƒZedWd&ddddDœdEdF„ƒZed&ddGœdHdI„ƒZee  dJ¡dKdKddLœdMdN„ƒƒZ!ee"j#fdOdPddQœdRdS„ƒZ$ee"j#fdOdPddQœdTdU„ƒZ%dS)XÚGenerativeSelecta&Base class for SELECT statements where additional elements can be
    added.
 
    This serves as the base for :class:`_expression.Select` and
    :class:`_expression.CompoundSelect`
    where elements such as ORDER BY, GROUP BY can be added and column
    rendering can be controlled.  Compare to
    :class:`_expression.TextualSelect`, which,
    while it subclasses :class:`_expression.SelectBase`
    and is also a SELECT construct,
    represents a fixed textual string which cannot be altered at this level,
    only wrapped as a subquery.
 
    rŒúTuple[ColumnElement[Any], ...]Ú_order_by_clausesÚ_group_by_clausesNúOptional[ColumnElement[Any]]Ú _limit_clauseÚ_offset_clauseÚ _fetch_clausezOptional[Dict[str, bool]]Ú_fetch_clause_optionsr Ú_for_update_argrH©ræcCs
||_dSr‹rh)rŽrærŒrŒrrT°szGenerativeSelect.__init__Fr)r£r*r\)rrrrr$rŠcCst|||||d|_|S)a"Specify a ``FOR UPDATE`` clause for this
        :class:`_expression.GenerativeSelect`.
 
        E.g.::
 
            stmt = select(table).with_for_update(nowait=True)
 
        On a database like PostgreSQL or Oracle, the above would render a
        statement like::
 
            SELECT table.a, table.b FROM table FOR UPDATE NOWAIT
 
        on other backends, the ``nowait`` option is ignored and instead
        would produce::
 
            SELECT table.a, table.b FROM table FOR UPDATE
 
        When called with no arguments, the statement will render with
        the suffix ``FOR UPDATE``.   Additional arguments can then be
        provided which allow for common database-specific
        variants.
 
        :param nowait: boolean; will render ``FOR UPDATE NOWAIT`` on Oracle
         and PostgreSQL dialects.
 
        :param read: boolean; will render ``LOCK IN SHARE MODE`` on MySQL,
         ``FOR SHARE`` on PostgreSQL.  On PostgreSQL, when combined with
         ``nowait``, will render ``FOR SHARE NOWAIT``.
 
        :param of: SQL expression or list of SQL expression elements,
         (typically :class:`_schema.Column` objects or a compatible expression,
         for some backends may also be a table expression) which will render
         into a ``FOR UPDATE OF`` clause; supported by PostgreSQL, Oracle, some
         MySQL versions and possibly others. May render as a table or as a
         column depending on backend.
 
        :param skip_locked: boolean, will render ``FOR UPDATE SKIP LOCKED``
         on Oracle and PostgreSQL dialects or ``FOR SHARE SKIP LOCKED`` if
         ``read=True`` is also specified.
 
        :param key_share: boolean, will render ``FOR NO KEY UPDATE``,
         or if combined with ``read=True`` will render ``FOR KEY SHARE``,
         on the PostgreSQL dialect.
 
        r))rrgr/rŒrŒrr!³s7ûz GenerativeSelect.with_for_updater‰cCs|jS)zS
        Retrieve the current label style.
 
        .. versionadded:: 1.4
 
        rhrrŒrŒrrIósz GenerativeSelect.get_label_stylerJcCs|j|k    r| ¡}||_|S)a|Return a new selectable with the specified label style.
 
        There are three "label styles" available,
        :attr:`_sql.SelectLabelStyle.LABEL_STYLE_DISAMBIGUATE_ONLY`,
        :attr:`_sql.SelectLabelStyle.LABEL_STYLE_TABLENAME_PLUS_COL`, and
        :attr:`_sql.SelectLabelStyle.LABEL_STYLE_NONE`.   The default style is
        :attr:`_sql.SelectLabelStyle.LABEL_STYLE_TABLENAME_PLUS_COL`.
 
        In modern SQLAlchemy, there is not generally a need to change the
        labeling style, as per-expression labels are more effectively used by
        making use of the :meth:`_sql.ColumnElement.label` method. In past
        versions, :data:`_sql.LABEL_STYLE_TABLENAME_PLUS_COL` was used to
        disambiguate same-named columns from different tables, aliases, or
        subqueries; the newer :data:`_sql.LABEL_STYLE_DISAMBIGUATE_ONLY` now
        applies labels only to names that conflict with an existing name so
        that the impact of this labeling is minimal.
 
        The rationale for disambiguation is mostly so that all column
        expressions are available from a given :attr:`_sql.FromClause.c`
        collection when a subquery is created.
 
        .. versionadded:: 1.4 - the
            :meth:`_sql.GenerativeSelect.set_label_style` method replaces the
            previous combination of ``.apply_labels()``, ``.with_labels()`` and
            ``use_labels=True`` methods and/or parameters.
 
        .. seealso::
 
            :data:`_sql.LABEL_STYLE_DISAMBIGUATE_ONLY`
 
            :data:`_sql.LABEL_STYLE_TABLENAME_PLUS_COL`
 
            :data:`_sql.LABEL_STYLE_NONE`
 
            :data:`_sql.LABEL_STYLE_DEFAULT`
 
        )ræÚ    _generaterLrŒrŒrr¡üs&
z GenerativeSelect.set_label_stylerIcCst tj|j¡S)z9ClauseList access to group_by_clauses for legacy dialects)rIÚ_construct_rawrÚcomma_oprarrŒrŒrÚ_group_by_clause'sÿz!GenerativeSelect._group_by_clausecCst tj|j¡S)z9ClauseList access to order_by_clauses for legacy dialects)rIrjrrkr`rrŒrŒrÚ_order_by_clause.sÿz!GenerativeSelect._order_by_clausercr¹z"Optional[_TypeEngineArgument[int]]r†)r­r¼Útype_rŠcCstjtj|||dS)zÉConvert the given value to an "offset or limit" clause.
 
        This handles incoming integers and converts to an expression; if
        an expression is already given, it is passed through.
 
        )r¼rn)rrßrZLimitOffsetRole)rŽr­r¼rnrŒrŒrÚ_offset_or_limit_clause5s ÿz(GenerativeSelect._offset_or_limit_clauserÝr)ÚclauseÚattrnamerŠcCsdSr‹rŒ©rŽrprqrŒrŒrÚ_offset_or_limit_clause_asintEsz.GenerativeSelect._offset_or_limit_clause_asintzOptional[_OffsetLimitParam]r˜cCsdSr‹rŒrrrŒrŒrrsKszUnion[NoReturn, Optional[int]]c
CsX|dkr dSz
|j}Wn2tk
rH}zt d|¡|‚W5d}~XYn Xt |¡SdS)zàConvert the "offset or limit" clause of a select construct to an
        integer.
 
        This is only possible if the value is stored as a simple bound
        parameter. Otherwise, a compilation error is raised.
 
        Nz@This SELECT structure does not use a simple integer value for %s)r™ÚAttributeErrorrWÚ CompileErrorrXZasint)rŽrprqÚvalueÚerrrŒrŒrrsQs
 
ÿÿýcCs| |jd¡S)zûGet an integer value for the limit.  This should only be used
        by code that cannot support a limit as a BindParameter or
        other custom clause as it will throw an exception if the limit
        isn't currently set to an integer.
 
        Úlimit)rsrcrrŒrŒrÚ_limitgszGenerativeSelect._limitrH©rprŠcCs
t|tƒS)zkTrue if the clause is a simple integer, False
        if it is not present or is a SQL expression.
        )rkr—)rŽrprŒrŒrÚ_simple_int_clauseqsz#GenerativeSelect._simple_int_clausecCs| |jd¡S)zÿGet an integer value for the offset.  This should only be used
        by code that cannot support an offset as a BindParameter or
        other custom clause as it will throw an exception if the
        offset isn't currently set to an integer.
 
        Úoffset)rsrdrrŒrŒrÚ_offsetwsÿzGenerativeSelect._offsetcCs|jdk    p|jdk    p|jdk    Sr‹)rcrdrerrŒrŒrÚ_has_row_limiting_clauseƒs
 
ÿýz)GenerativeSelect._has_row_limiting_clause)rxrŠcCsd|_|_| |¡|_|S)aÑReturn a new selectable with the given LIMIT criterion
        applied.
 
        This is a numerical value which usually renders as a ``LIMIT``
        expression in the resulting select.  Backends that don't
        support ``LIMIT`` will attempt to provide similar
        functionality.
 
        .. note::
 
           The :meth:`_sql.GenerativeSelect.limit` method will replace
           any clause applied with :meth:`_sql.GenerativeSelect.fetch`.
 
        :param limit: an integer LIMIT parameter, or a SQL expression
         that provides an integer result. Pass ``None`` to reset it.
 
        .. seealso::
 
           :meth:`_sql.GenerativeSelect.fetch`
 
           :meth:`_sql.GenerativeSelect.offset`
 
        N)rerfrorc)rŽrxrŒrŒrrx‹s  zGenerativeSelect.limit)ÚcountÚ    with_tiesÚpercentrŠcCs8d|_|dkrd|_|_n| |¡|_||dœ|_|S)a—Return a new selectable with the given FETCH FIRST criterion
        applied.
 
        This is a numeric value which usually renders as
        ``FETCH {FIRST | NEXT} [ count ] {ROW | ROWS} {ONLY | WITH TIES}``
        expression in the resulting select. This functionality is
        is currently implemented for Oracle, PostgreSQL, MSSQL.
 
        Use :meth:`_sql.GenerativeSelect.offset` to specify the offset.
 
        .. note::
 
           The :meth:`_sql.GenerativeSelect.fetch` method will replace
           any clause applied with :meth:`_sql.GenerativeSelect.limit`.
 
        .. versionadded:: 1.4
 
        :param count: an integer COUNT parameter, or a SQL expression
         that provides an integer result. When ``percent=True`` this will
         represent the percentage of rows to return, not the absolute value.
         Pass ``None`` to reset it.
 
        :param with_ties: When ``True``, the WITH TIES option is used
         to return any additional rows that tie for the last place in the
         result set according to the ``ORDER BY`` clause. The
         ``ORDER BY`` may be mandatory in this case. Defaults to ``False``
 
        :param percent: When ``True``, ``count`` represents the percentage
         of the total number of selected rows to return. Defaults to ``False``
 
        .. seealso::
 
           :meth:`_sql.GenerativeSelect.limit`
 
           :meth:`_sql.GenerativeSelect.offset`
 
        N)r€r)rcrerfro)rŽrr€rrŒrŒrÚfetch©s- þzGenerativeSelect.fetch)r|rŠcCs| |¡|_|S)a2Return a new selectable with the given OFFSET criterion
        applied.
 
 
        This is a numeric value which usually renders as an ``OFFSET``
        expression in the resulting select.  Backends that don't
        support ``OFFSET`` will attempt to provide similar
        functionality.
 
        :param offset: an integer OFFSET parameter, or a SQL expression
         that provides an integer result. Pass ``None`` to reset it.
 
        .. seealso::
 
           :meth:`_sql.GenerativeSelect.limit`
 
           :meth:`_sql.GenerativeSelect.fetch`
 
        )rord)rŽr|rŒrŒrr|ás zGenerativeSelect.offsetrÅr')ÚstartÚstoprŠcCs4tjj}d|_|_| |j|j||¡\|_|_|S)aApply LIMIT / OFFSET to this statement based on a slice.
 
        The start and stop indices behave like the argument to Python's
        built-in :func:`range` function. This method provides an
        alternative to using ``LIMIT``/``OFFSET`` to get a slice of the
        query.
 
        For example, ::
 
            stmt = select(User).order_by(User).id.slice(1, 3)
 
        renders as
 
        .. sourcecode:: sql
 
           SELECT users.id AS users_id,
                  users.name AS users_name
           FROM users ORDER BY users.id
           LIMIT ? OFFSET ?
           (2, 1)
 
        .. note::
 
           The :meth:`_sql.GenerativeSelect.slice` method will replace
           any clause applied with :meth:`_sql.GenerativeSelect.fetch`.
 
        .. versionadded:: 1.4  Added the :meth:`_sql.GenerativeSelect.slice`
           method generalized from the ORM.
 
        .. seealso::
 
           :meth:`_sql.GenerativeSelect.limit`
 
           :meth:`_sql.GenerativeSelect.offset`
 
           :meth:`_sql.GenerativeSelect.fetch`
 
        N)rXrÉrÊrerfZ _make_slicercrd)rŽrƒr„rÊrŒrŒrÚsliceús- ÿ zGenerativeSelect.slicezMUnion[Literal[None, _NoArg.NO_ARG], _ColumnExpressionOrStrLabelArgument[Any]]z(_ColumnExpressionOrStrLabelArgument[Any])Ú_GenerativeSelect__firstÚclausesrŠcGsD|s|dkrd|_n,|tjk    r@|jtdd„|f|Dƒƒ7_|S)a¥Return a new selectable with the given list of ORDER BY
        criteria applied.
 
        e.g.::
 
            stmt = select(table).order_by(table.c.id, table.c.name)
 
        Calling this method multiple times is equivalent to calling it once
        with all the clauses concatenated. All existing ORDER BY criteria may
        be cancelled by passing ``None`` by itself.  New ORDER BY criteria may
        then be added by invoking :meth:`_orm.Query.order_by` again, e.g.::
 
            # will erase all ORDER BY and ORDER BY new_col alone
            stmt = stmt.order_by(None).order_by(new_col)
 
        :param \*clauses: a series of :class:`_expression.ColumnElement`
         constructs
         which will be used to generate an ORDER BY clause.
 
        .. seealso::
 
            :ref:`tutorial_order_by` - in the :ref:`unified_tutorial`
 
            :ref:`tutorial_order_by_label` - in the :ref:`unified_tutorial`
 
        NrŒcss|]}t tj|¡VqdSr‹)rrßrZ OrderByRole©rárprŒrŒrr$Usÿz,GenerativeSelect.order_by.<locals>.<genexpr>)r`r8ÚNO_ARGrä©rŽr†r‡rŒrŒrÚorder_by.s$ 
þ zGenerativeSelect.order_bycGsD|s|dkrd|_n,|tjk    r@|jtdd„|f|Dƒƒ7_|S)a~Return a new selectable with the given list of GROUP BY
        criterion applied.
 
        All existing GROUP BY settings can be suppressed by passing ``None``.
 
        e.g.::
 
            stmt = select(table.c.name, func.max(table.c.stat)).\
            group_by(table.c.name)
 
        :param \*clauses: a series of :class:`_expression.ColumnElement`
         constructs
         which will be used to generate an GROUP BY clause.
 
        .. seealso::
 
            :ref:`tutorial_group_by_w_aggregates` - in the
            :ref:`unified_tutorial`
 
            :ref:`tutorial_order_by_label` - in the :ref:`unified_tutorial`
 
        NrŒcss|]}t tj|¡VqdSr‹)rrßrZ GroupByRolerˆrŒrŒrr$~sÿz,GenerativeSelect.group_by.<locals>.<genexpr>)rar8r‰rärŠrŒrŒrÚgroup_by[s  
þ zGenerativeSelect.group_by)NN)FF)&r‘r’r“r¯r`rærarcrdrerfrgrMrTr5r!rIr¡r›rlrmrorrsryr{r}r~rxr‚r|rXrÓr…r8r‰r‹rŒrŒrŒrŒrr^˜sl
       ù?    +    ü     ü72û,ûr^ÚdefaultÚcompound_selectc@s eZdZejddœdd„ƒZdS)ÚCompoundSelectStateúbTuple[Dict[str, ColumnElement[Any]], Dict[str, ColumnElement[Any]], Dict[str, ColumnElement[Any]]]r‰cCs*|j ¡}d|_dd„|jDƒ}|||fS)NFcSsi|] }|j|“qSrŒr‘r5rŒrŒrre’sz;CompoundSelectState._label_resolve_dict.<locals>.<dictcomp>)Ú    statementrûrBr&)rŽZhacky_subqueryÚdrŒrŒrÚ_label_resolve_dict‡s    
z'CompoundSelectState._label_resolve_dictN)r‘r’r“rXZmemoized_propertyr“rŒrŒrŒrr…src@s$eZdZdZdZdZdZdZdZdS)Ú_CompoundSelectKeywordÚUNIONz    UNION ALLÚEXCEPTz
EXCEPT ALLÚ    INTERSECTz INTERSECT ALLN)    r‘r’r“r•Ú    UNION_ALLr–Ú
EXCEPT_ALLr—Ú INTERSECT_ALLrŒrŒrŒrr”–s r”c
s®eZdZUdZdZdejfdejfdejfdejfdejfdejfd    ejfd
ejfd ej    fg    e
j Z d e d <de d<dZdZdddœdd„Zedddœdd„ƒZedddœdd„ƒZedddœdd„ƒZedddœdd„ƒZedddœdd „ƒZedddœd!d"„ƒZd#d$œd%d&„ZdId(d)d*œd+d,„Zd-d.d/œd0d1„Zd2dd3œd4d5„Zdd$œd6d7„Zd'd8œd9d:d;d<œd=d>„Zd?d;d@œ‡fdAdB„ Zej dCd$œdDdE„ƒZ!ej dFd$œdGdH„ƒZ"‡Z#S)JÚCompoundSelectaXForms the basis of ``UNION``, ``UNION ALL``, and other
    SELECT-based set operations.
 
 
    .. seealso::
 
        :func:`_expression.union`
 
        :func:`_expression.union_all`
 
        :func:`_expression.intersect`
 
        :func:`_expression.intersect_all`
 
        :func:`_expression.except`
 
        :func:`_expression.except_all`
 
    rŽÚselectsrcrdrerfr`rargÚkeywordrSrOzList[SelectBase]TFr”rg)rrœcs(|ˆ_‡fdd„|Dƒˆ_t ˆ¡dS)Ncs"g|]}t tj|¡jˆd‘qS)rQ)rrßrÚCompoundElementRolerA)ráÚsrrŒrrãÍsýÿz+CompoundSelect.__init__.<locals>.<listcomp>)rrœr^rT)rŽrrœrŒrrrTÇs
 
üzCompoundSelect.__init__)rœrŠcGsttjf|žŽSr‹)r›r”r•©r†rœrŒrŒrÚ _create_unionÖszCompoundSelect._create_unioncGsttjf|žŽSr‹)r›r”r˜r rŒrŒrÚ_create_union_allÜsz CompoundSelect._create_union_allcGsttjf|žŽSr‹)r›r”r–r rŒrŒrÚ_create_exceptâszCompoundSelect._create_exceptcGsttjf|žŽSr‹)r›r”r™r rŒrŒrÚ_create_except_allèsz!CompoundSelect._create_except_allcGsttjf|žŽSr‹)r›r”r—r rŒrŒrÚ_create_intersectîsz CompoundSelect._create_intersectcGsttjf|žŽSr‹)r›r”ršr rŒrŒrÚ_create_intersect_allôsz$CompoundSelect._create_intersect_allrNr‰cCs|jd ¡S©Nr)rœrOrrŒrŒrrOúszCompoundSelect._scalar_typeNr=rMr>cCst|ƒSr‹)rWr@rŒrŒrrAýszCompoundSelect.self_groupr¢r£r¤cCs |jD]}| |¡rdSqdS©NTF)rœr§)rŽr¥rŸrŒrŒrr§s
 
zCompoundSelect.is_derived_fromrHrJcCs<|j|k    r8| ¡}|jd |¡}|g|jdd…|_|S©Nrr)rærirœr¡)rŽrKÚselect_0rŒrŒrr¡s
 
zCompoundSelect.set_label_stylecCs>|jd ¡}||jdk    r:| ¡}|g|jdd…|_|Sr©)rœrTri)rŽZ
new_selectrŒrŒrrTs
z*CompoundSelect._ensure_disambiguated_namesrCr…rEr¨rFcCsT|jd}|jtk    r | |j¡}tdd„dd„t|jƒDƒDƒŽ}|j||ddS)Nrcs$g|]\‰}‡fdd„|jDƒ‘qS)csg|]}t|ƒr| ˆ¡‘qSrŒ)r$Z    _annotater5©ÚddrŒrrã2sþzQCompoundSelect._generate_fromclause_column_proxies.<locals>.<listcomp>.<listcomp>)r¡)ráÚstmtrŒr«rrã1sû
þzFCompoundSelect._generate_fromclause_column_proxies.<locals>.<listcomp>cSs g|]\}}d|di|f‘qS)ZweightrrŒ)ráÚir­rŒrŒrrã7sÿrC)rœrærMr¡ÚzipÚ    enumerater©)rŽrûrDrªÚextra_col_iteratorrŒrŒrr©s
 
 þúÿÿz2CompoundSelect._generate_fromclause_column_proxiesr†rªcs&tƒ |¡|jD]}| |¡qdSr‹)rqr­rœ)rŽr«rrurŒrr­Gs 
z&CompoundSelect._refresh_for_new_columnržcCs |jdjSr§)rœr¡rrŒrŒrr¡Lsz$CompoundSelect._all_selected_columnsrAcCs |jdjS)a\A :class:`_expression.ColumnCollection`
        representing the columns that
        this SELECT statement or similar construct returns in its result set,
        not including :class:`_sql.TextClause` constructs.
 
        For a :class:`_expression.CompoundSelect`, the
        :attr:`_expression.CompoundSelect.selected_columns`
        attribute returns the selected
        columns of the first SELECT statement contained within the series of
        statements within the set operation.
 
        .. seealso::
 
            :attr:`_sql.Select.selected_columns`
 
        .. versionadded:: 1.4
 
        r)rœrBrrŒrŒrrBPszCompoundSelect.selected_columns)N)$r‘r’r“r¯rÐrTrør¤Ú dp_plain_dictrr*Ú%_clone_annotations_traverse_internalsrOrærºÚ_auto_correlaterTr¦r¡r¢r£r¤r¥r¦rOrAr§r¡rTr©r­rXr”r¡rBr§rŒrŒrurr›ŸsV
÷
ö ÿú/r›rc@s~eZdZUdZerded<nGdd„deƒZerDedddœdd    „ƒZ    d
d d d œdd„Z
eddœdd„ƒZ ed
ddœdd„ƒZ ed
dddœdd„ƒZ ed
ddœdd„ƒZedd d!œd"d#„ƒZd
ddœd$d%„ZedNd'd(d)dd*œd+d,„ƒZdOd-d-dd.œd/d0„Zd1dœd2d3„Zed
d4d5œd6d7„ƒZed
d8dœd9d:„ƒZd;d<d=d>œd?d@„Ze dA¡d<dBdCdDdEdFœdGdH„ƒZe dA¡dIdJdKœdLdM„ƒZd&S)Pré)Ú from_clausesÚfromsÚcolumns_plus_namesr“r:Údefault_select_compile_optionsc@seZdZgZdS)z*SelectState.default_select_compile_optionsN)r‘r’r“Ú_cache_key_traversalrŒrŒrŒrr¸{sr?úType[SelectState]©r‘rŠcCsdSr‹rŒ©r†r‘rŒrŒrÚget_plugin_class€szSelectState.get_plugin_classrzOptional[SQLCompiler]r)r‘ÚcompilerracKs\||_|j|_|jD]}| |j|j¡q|jr@| |j|j¡| |¡|_| d¡|_    dSr¹)
r‘Ú    _from_objrµÚ_memoized_select_entitiesÚ _setup_joinsÚ _raw_columnsÚ
_get_fromsr¶rïr·)rŽr‘r¾raZmemoized_entitiesrŒrŒrrT„s
ÿ zSelectState.__init__rr‰cCs tdƒ‚dS)NzLThe default SELECT construct without plugins does not implement this method.rŸ)r†rŒrŒrÚ_plugin_not_implemented™sÿz#SelectState._plugin_not_implementedzList[Dict[str, Any]]cCsdd„| d¡DƒS)NcSs$g|]\}}}}}||j|dœ‘qS))r¼r8Úexprr7)ráÚ_r¼r­rŒrŒrrã¤s
 üýz7SelectState.get_column_descriptions.<locals>.<listcomp>F)rïr¼rŒrŒrÚget_column_descriptions sùz#SelectState.get_column_descriptionsúroles.ReturnsRowsRoler´)r‘Úfrom_statementrŠcCs | ¡dSr‹)rÄ)r†r‘rÉrŒrŒrrɯszSelectState.from_statementrˆcCs| tj dd„|jDƒ¡¡S)Ncss|] }|jVqdSr‹r3©rár­rŒrŒrr$ºsz7SelectState.get_columns_clause_froms.<locals>.<genexpr>)Ú_normalize_fromsr\r]Ú from_iterablerÂr¼rŒrŒrÚget_columns_clause_fromsµs
 ÿÿz$SelectState.get_columns_clause_fromsrHÚ_LabelConventionCallablerZcs>|tk‰|tk    ‰tƒ‰tƒ‰dddddœ‡‡‡‡fdd„ }|S)Nrãr¹)r&Úcol_namerŠcsªt|ƒr dStrt|ƒst‚ˆs6|j}|dkr2d}|Sˆr@|jn|j}|dkrxd}|ˆkrh| |¡ˆSˆ |¡|Sn.|ˆkr˜ˆrŽ|jˆS|j    ˆSˆ |¡|SdS)NZ    _no_label)
r(rr$r7Z
_proxy_keyrXZ _anon_labelrZ_anon_tq_key_labelZ_anon_key_label)r&rÏr¼©rœrìÚparîrŒrÚgoÊs. 
ÿ ý
z1SelectState._column_naming_convention.<locals>.go)N)rKrJrUr8)r†r[rÒrŒrÐrrê¿sþ#z%SelectState._column_naming_conventionc    CsNi|_}|jt |jtj dd„|jDƒ¡tj dd„|jDƒ¡¡||dS)NcSsg|]
}|j‘qSrŒr3rÊrŒrŒrrã÷sÿz*SelectState._get_froms.<locals>.<listcomp>cSsg|]
}|j‘qSrŒr3rÊrŒrŒrrãýsÿ)Úcheck_statementÚambiguous_table_name_map)Z_ambiguous_table_name_maprËr\r]rµrÌrÂÚ_where_criteria)rŽr‘rÔrŒrŒrrÃïs$
þÿþÿøïzSelectState._get_fromsNrúzOptional[Select[Any]]z Optional[_AmbiguousTableNameMap])Úiterable_of_fromsrÓrÔrŠcsªtƒ}g}|D]B}t|ƒr.|j|kr.t d¡‚| |j¡s| |¡| |j¡q|r¦tt    j
  dd„|Dƒ¡ƒ‰ˆr†‡fdd„|Dƒ}ˆdk    r¦ˆ ‡fdd„|Dƒ¡|S)a0given an iterable of things to select FROM, reduce them to what
        would actually render in the FROM clause of a SELECT.
 
        This does the job of checking for JOINs, tables, etc. that are in fact
        overlapping due to cloning, adaption, present in overlapping joins,
        etc.
 
        z-select() construct refers to itself as a FROMcSsg|]}t|jƒ‘qSrŒ)r2rürbrŒrŒrrã'sz0SelectState._normalize_froms.<locals>.<listcomp>csg|]}|ˆkr|‘qSrŒrŒrb)ÚtoremoverŒrrã-sNc3sL|]D}|jD]8}t|ƒr |jr |jˆkr |jt t|jƒ|j¡fVq qdSr‹)r4r'rÿr¼rEr´rV)ráÚitemÚfr)rÔrŒrr$0s
÷ÿþz/SelectState._normalize_froms.<locals>.<genexpr>) r8r&r­rWÚInvalidRequestErrorrrr™r[r\r]rÌ)r†rÖrÓrÔÚseenr¶rØrŒ)rÔr×rrËs.ÿ 
 ÿÿùzSelectState._normalize_fromszOptional[Sequence[FromClause]])Úexplicit_correlate_fromsÚimplicit_correlate_fromsrŠcsšˆj‰ˆjjr0ˆjj‰ˆr0‡‡‡fdd„ˆDƒ‰ˆjjdk    rR‡‡‡fdd„ˆDƒ‰ˆjjr–ˆr–tˆƒdkr–‡‡fdd„ˆDƒ‰tˆƒs–t dˆj¡‚ˆS)aReturn the full list of 'from' clauses to be displayed.
 
        Takes into account a set of existing froms which may be
        rendered in the FROM clause of enclosing selects; this Select
        may want to leave those absent if it is automatically
        correlating.
 
        cs(g|] }|ttˆˆpdƒˆƒkr|‘qS©rŒr-rb)rÜr¶Ú to_correlaterŒrrãSsÿüÿþz2SelectState._get_display_froms.<locals>.<listcomp>Ncs,g|]$}|ttˆˆpdƒˆjjƒkr|‘qSrÞ)r,r.r‘Ú_correlate_exceptrb)rÜr¶rŽrŒrrãasÿüÿþrcsg|]}|tˆˆƒkr|‘qSrŒr-rb)r¶rÝrŒrrãss
ÿþz„Select statement '%r' returned no FROM clauses due to auto-correlation; specify correlate(<tables>) to control correlation manually.)r¶r‘Ú
_correlateràr´rrWrÚ)rŽrÜrÝrŒ)rÜr¶rÝrŽrßrÚ_get_display_froms@s6þ þ ÿþ
ý þûÿ    zSelectState._get_display_fromsrcCsVdd„|jjDƒ}dd„t|jƒDƒ}| ¡}| ¡D]\}}| ||¡q6|||fS)NcSs i|]}|jr|jp|j|“qSrŒ)Ú_allow_label_resolverër3r5rŒrŒrresþ
zBSelectState._memoized_attr__label_resolve_dict.<locals>.<dictcomp>cSsi|]}|jr|j|“qSrŒ)rãr3r5rŒrŒrre’sþ)r‘r¡r9r¶ÚcopyÚitemsÚ
setdefault)rŽZ    with_colsZ
only_fromsZ    only_colsr3rvrŒrŒrÚ"_memoized_attr__label_resolve_dict†sþþz.SelectState._memoized_attr__label_resolve_dictzOptional[_JoinTargetElement])r­rŠcCs|jr|jddSdSdS)Néÿÿÿÿr)rÁ)r†r­rŒrŒrÚdetermine_last_joined_entitysz(SelectState.determine_last_joined_entityržcCsdd„t|jƒDƒS)NcSsg|]}|‘qSrŒrŒr5rŒrŒrrã¨sz4SelectState.all_selected_columns.<locals>.<listcomp>)r9rÂr¼rŒrŒrÚall_selected_columns¦sz SelectState.all_selected_columnsúTuple[_SetupJoinsElement, ...]úList[_ColumnsClauseElement]r¨)ÚargsÚ raw_columnsrŠc     Cs|D]ø\}}}}tr*|dk    r*t|tƒs*t‚|d}|d}|dkrX| ||||¡\}}    n
| |¡}    trŠt|tƒstt‚|dk    rŠt|tƒsŠt‚|    dk    rÔ|j|    }
|jd|    …t|
||||df|j|    dd…|_q|dk    sàt‚|jt|||||df|_qdS)NrrrŸr)    rrkrKr7Ú"_join_determine_implicit_left_sideÚ_join_place_explicit_left_sider…rµr) rŽrírîrrrNÚflagsrrÚreplace_from_obj_indexZ left_clauserŒrŒrrÁªsVÿýþÿ    
 ûÿÿ
öÿ ÿzSelectState._setup_joinsrÅr¢Ú_JoinTargetElementrbz*Tuple[Optional[FromClause], Optional[int]])rîrNrrrŠc Csòtjj}d}|j}|rB| |||¡}t|ƒdkr¾|d}||}n|i}    |j}
t tj     dd„|Dƒ¡tj     dd„|
j
Dƒ¡¡D] } d|    | <q~t |      ¡ƒ} | | ||¡}t|ƒdkr¾| |d}t|ƒdkrÖt  d¡‚n|sêt  d    |f¡‚||fS)
z­When join conditions don't express the left side explicitly,
        determine if an existing FROM or entity in this query
        can serve as the left hand side.
 
        NrrcSsg|]
}|j‘qSrŒr3rÊrŒrŒrrãszBSelectState._join_determine_implicit_left_side.<locals>.<listcomp>cSsg|]
}|j‘qSrŒr3rÊrŒrŒrrã sÿrŒaCan't determine which FROM clause to join from, there are multiple FROMS which can join to this entity. Please use the .select_from() method to establish an explicit left side, as well as providing an explicit ON clause if not present already to help resolve the ambiguity.zÇDon't know how to join to %r. Please use the .select_from() method to establish an explicit left side, as well as providing an explicit ON clause if not present already to help resolve the ambiguity.)rXrÉrÊrµZfind_left_clause_to_join_fromrr‘r\r]rÌrÕrƒÚkeysrWrÚ) rŽrîrNrrrÊròrµÚindexesZ    potentialr‘Z from_clauseZ all_clausesrŒrŒrrïåsXÿ 
 ÿþÿü
 ÿ   ÿüÿz.SelectState._join_determine_implicit_left_sider…r˜)rNrŠcCsXd}tjj}t|j ¡ƒ}|r.| |j|¡}ng}t|ƒdkrHt     
d¡‚|rT|d}|S)NrzrCan't identify which entity in which to assign the left side of this join.   Please use a more specific ON clause.r) rXrÉrÊrƒr‘Ú_iterate_from_elementsZ#find_left_clause_that_matches_givenrµrrWrÚ)rŽrNròrÊrµrõrŒrŒrrð/s ÿ ÿz*SelectState._join_place_explicit_left_side)NN)NN)r‘r’r“Ú    __slots__rrær:r¸r¦r½rTrÄrÇrÉrÍrêrÃrËrârçrérêrÁrXrÓrïrðrŒrŒrŒrrénsH
 
    /ü:ýF;Iréc@s8eZdZUdZded<ded<ded<dd    œd
d „Zd S) Ú_SelectFromElementsrŒrìrÂr_rÕúTuple[FromClause, ...]r¿zIterator[FromClause]r‰ccs”tƒ}|jD]*}|jD]}||kr$q| |¡|Vqq |jD]*}|jD]}||krVqH| |¡|VqHq>|jD]}||kr~qp| |¡|VqpdSr‹)r8rÂr4rrÕr¿)rŽrÛr­rÙrŒrŒrröYs$
 
 
 
 
 
 
 
 
 
z*_SelectFromElements._iterate_from_elementsN)r‘r’r“r÷rærörŒrŒrŒrrøRs
 
røc@s„eZdZUdZdZdejfdejfdejfgZ    de
d<de
d    <d
e
d<d e
d<d e
d<e j Z d ddœdd„Zedddœdd„ƒZdS)Ú_MemoizedSelectEntitiesarepresents partial state from a Select object, for the case
    where Select.columns() has redefined the set of columns/entities the
    statement will be SELECTing from.  This object represents
    the entities from the SELECT before that transformation was applied,
    so that transformations that were made in terms of the SELECT at that
    time, such as join() as well as options(), can access the correct context.
 
    In previous SQLAlchemy versions, this wasn't needed because these
    constructs calculated everything up front, like when you called join()
    or options(), it did everything to figure out how that would translate
    into specific SQL constructs that would be ready to send directly to the
    SQL compiler when needed.  But as of
    1.4, all of that stuff is done in the compilation phase, during the
    "compile state" portion of the process, so that the work can all be
    cached.  So it needs to be able to resolve joins/options2 based on what
    the list of entities was when those methods were called.
 
 
    Zmemoized_select_entitiesrÂrÁÚ _with_optionsrSrOzOptional[ClauseElement]rýrìrëzTuple[ExecutableOption, ...]rr\rcKs8|j |j¡}dd„|j ¡Dƒ|_|j d|¡|_|S)NcSsi|]\}}||“qSrŒrŒ)ráÚkÚvrŒrŒrre™sz2_MemoizedSelectEntities._clone.<locals>.<dictcomp>rý)rr®r*råÚgetrý)rŽrar&rŒrŒrr+—sz_MemoizedSelectEntities._clonerr¨)Ú select_stmtrŠcCsP|js |jrLtƒ}|j|_|j|_|j|_|j|f7_g|_d|_|_dSrû)rÁrûrúrÂrÀ)r†rÿrŽrŒrŒrÚ_generate_for_statementžs z/_MemoizedSelectEntities._generate_for_statementN)r‘r’r“r¯rÐrTrøÚdp_setup_join_tupleZdp_executable_optionsrOrærXÚ
EMPTY_DICTZ _annotationsr+r¦rrŒrŒrŒrrúqs
ý rúcs,eZdZUdZdZdZded<dZded<ded    <d
Zd ed <dZ    d ed<dZ
ded<dZ ded<dZ d ed<dZ d ed<dZded<dZdZejZded<d    ejfdejfdejfdejfdejfdejfdejfdejfdejfdejfdejfdejfdejfdejfd ejfd ejfdejfd!ejfgejej e!j"e#j$e%j&e'j(Z)d"ed#<e)dej*fgZ+d$ed%<d&ed'<e,d(d)d*œd+d,„ƒZ-d-d.œd/d0„Z.d1d2œd3d4„Z/d5d6d7œd8d9„Z0d:d2œd;d<„Z1e2re3d=d>d?œd@dA„ƒZ4e3dBdCd?œdDdA„ƒZ4e3d>d2œdEdA„ƒZ4d>d2œdFdA„Z4d(d6dGœdHdI„Z5e6d(d2œdJdK„ƒZ7dLdMdNœdOdP„Z8e9dèd
d
dQœdRdSd d d6dTœdUdV„ƒZ:déd
dWœdXdRdSd d6dYœdZd[„Z;e9dêd
d
dQœdXdRdSd d d6d\œd]d^„ƒZ<dëd
dWœdRdSd d6d_œd`da„Z=dbd2œdcdd„Z>e6e? @dedf¡dbd2œdgdh„ƒƒZAe6did2œdjdk„ƒZBe6dld2œdmdn„ƒZCdod dpœdqdr„ZDeEfdsd(dtduœ‡fdvdw„ ZFd(dxd*œ‡fdydz„ ZGe9d-d)d{œd|d}„ƒZHd~dtd{œdd€„ZIe? @dd‚¡d-d)dƒœd„d…„ƒZJe? Kd†¡dìd d)d‡œdˆd‰„ƒZLe3dŠd‹dŒœddŽ„ƒZMe3dŠddd‘œd’dŽ„ƒZMe3dŠdd“d”d•œd–dŽ„ƒZMe3dŠdd“d—d˜d™œdšdŽ„ƒZMe3dŠdd“d—d›dœdœdždŽ„ƒZMe3dŠdd“d—d›dŸd d¡œd¢dŽ„ƒZMe3dŠdd“d—d›dŸd£d¤d¥œd¦dŽ„ƒZMe3dŠdd“d—d›dŸd£d§d¨d©œ    dªdŽ„ƒZMe3d
d«œd-d d(d)d¬œd­dŽ„ƒZMe9d
d«œd-d d(d)d¬œd®dŽ„ƒZMe6d¯d2œd°d±„ƒZNeNZOe9d5d6d²œd³d´„ƒZPe9d5d6dµœd¶d·„ƒZQe9d¸d6d¹œdºd»„ƒZRe9dXd6d¼œd½d¾„ƒZSe9d¿d6dÀœdÁd„ƒZTe9d¿d6dÀœdÃdĄƒZUeVdÅd2œdÆdDŽƒZWeVdld2œdÈdɄƒZXd)d2œdÊd˄ZYdd̜dÍdÎdtdϜdÐdфZZd d2œdÒdӄZ[dídÔdÕd֜d×d؄Z\dÙdÚdۜdÜd݄Z]dÙdÚdۜdÞd߄Z^dÙdÚdۜdàdá„Z_dÙdÚdۜdâdã„Z`dÙdÚdۜdädå„ZadÙdÚdۜdædç„Zb‡ZcS)îraRepresents a ``SELECT`` statement.
 
    The :class:`_sql.Select` object is normally constructed using the
    :func:`_sql.select` function.  See that function for details.
 
    .. seealso::
 
        :func:`_sql.select`
 
        :ref:`tutorial_selecting_data` - in the 2.0 tutorial
 
    rrŒrërÁzTuple[TODO_Any, ...]rÀrìrÂFr£Ú    _distinctr_Ú _distinct_onrùráNz Optional[Tuple[FromClause, ...]]ràrÕÚ_having_criteriar¿Tr:Ú_compile_optionsr`rarcrdrerfrgrærSrOrvr¹rºÚ_compile_state_factoryrrrcKst t¡}|j |¡|S)z±Create a :class:`.Select` using raw ``__new__`` with no coercions.
 
        Used internally to build up :class:`.Select` constructs with
        pre-established state.
 
        )rr®r*r[)r†rar­rŒrŒrÚ_create_raw_selectûs    
 zSelect._create_raw_selectz_ColumnsClauseArgument[Any])Úentitiescs"‡fdd„|Dƒˆ_t ˆ¡dS)z£Construct a new :class:`_expression.Select`.
 
        The public constructor for :class:`_expression.Select` is the
        :func:`_sql.select` function.
 
        csg|]}tjtj|ˆd‘qS©r±r+©ráÚentrrŒrrãs ýÿz#Select.__init__.<locals>.<listcomp>N)rÂr^rT©rŽr    rŒrrrTs
üzSelect.__init__rNr‰cCs(|js
tS|jd}t|jƒ}|djSr§)rÂrRrƒr6r8)rŽr-rèrŒrŒrrOs
 
 
zSelect._scalar_typeú_ColumnExpressionArgument[bool]r\)ÚcriteriarŠcGs
|j|ŽS)z3A synonym for the :meth:`_sql.Select.where` method.©Úwhere)rŽrrŒrŒrÚfiltersz Select.filterzFUnion[FromClause, _JoinTargetProtocol, ColumnElement[Any], TextClause]cCs@|jr&t |¡j}||ƒ}|dk    r&|S|jr6|jdS|jdSr§)rÁrér½rér¿rÂ)rŽÚmethZ_last_joined_entityrŒrŒrÚ_filter_by_zero$sÿ
zSelect._filter_by_zerozSelect[Tuple[_MAYBE_ENTITY]]rþ)rŽrŠcCsdSr‹rŒrrŒrŒrrÿ8szSelect.scalar_subqueryzSelect[Tuple[_NOT_ENTITY]]zScalarSelect[_NOT_ENTITY]cCsdSr‹rŒrrŒrŒrrÿ>scCsdSr‹rŒrrŒrŒrrÿDscCsdSr‹rŒrrŒrŒrrÿHs)ÚkwargsrŠc s(| ¡‰‡fdd„| ¡Dƒ}|j|ŽS)zWapply the given filtering criterion as a WHERE clause
        to this select.
 
        csg|]\}}tˆ|ƒ|k‘qSrŒr/)rár3rv©Z from_entityrŒrrãRsÿz$Select.filter_by.<locals>.<listcomp>)rrår)rŽrr‡rŒrrÚ    filter_byKs
 
þzSelect.filter_bycCst |¡j}||ƒS)a5Return a :term:`plugin-enabled` 'column descriptions' structure
        referring to the columns which are SELECTed by this statement.
 
        This attribute is generally useful when using the ORM, as an
        extended structure which includes information about mapped
        entities is returned.  The section :ref:`queryguide_inspection`
        contains more background.
 
        For a Core-only statement, the structure returned by this accessor
        is derived from the same objects that are returned by the
        :attr:`.Select.selected_columns` accessor, formatted as a list of
        dictionaries which contain the keys ``name``, ``type`` and ``expr``,
        which indicate the column expressions to be selected::
 
            >>> stmt = select(user_table)
            >>> stmt.column_descriptions
            [
                {
                    'name': 'id',
                    'type': Integer(),
                    'expr': Column('id', Integer(), ...)},
                {
                    'name': 'name',
                    'type': String(length=30),
                    'expr': Column('name', String(length=30), ...)}
            ]
 
        .. versionchanged:: 1.4.33 The :attr:`.Select.column_descriptions`
           attribute returns a structure for a Core-only set of entities,
           not just ORM-only entities.
 
        .. seealso::
 
            :attr:`.UpdateBase.entity_description` - entity information for
            an :func:`.insert`, :func:`.update`, or :func:`.delete`
 
            :ref:`queryguide_inspection` - ORM background
 
        )rér½rÇ©rŽrrŒrŒrÚcolumn_descriptionsXs) zSelect.column_descriptionsrÈr´r»cCst |¡j}|||ƒS)a‰Apply the columns which this :class:`.Select` would select
        onto another statement.
 
        This operation is :term:`plugin-specific` and will raise a not
        supported exception if this :class:`_sql.Select` does not select from
        plugin-enabled entities.
 
 
        The statement is typically either a :func:`_expression.text` or
        :func:`_expression.select` construct, and should return the set of
        columns appropriate to the entities represented by this
        :class:`.Select`.
 
        .. seealso::
 
            :ref:`orm_queryguide_selecting_text` - usage examples in the
            ORM Querying Guide
 
        )rér½rÉ)rŽr‘rrŒrŒrrÉ„s zSelect.from_statementrŸrbrP)ÚtargetrrrrŠcCsPtjtj||d}|dk    r*t tj|¡}nd}|j||d||dœff7_|S)ah    Create a SQL JOIN against this :class:`_expression.Select`
        object's criterion
        and apply generatively, returning the newly resulting
        :class:`_expression.Select`.
 
        E.g.::
 
            stmt = select(user_table).join(address_table, user_table.c.id == address_table.c.user_id)
 
        The above statement generates SQL similar to::
 
            SELECT user.id, user.name FROM user JOIN address ON user.id = address.user_id
 
        .. versionchanged:: 1.4 :meth:`_expression.Select.join` now creates
           a :class:`_sql.Join` object between a :class:`_sql.FromClause`
           source that is within the FROM clause of the existing SELECT,
           and a given target :class:`_sql.FromClause`, and then adds
           this :class:`_sql.Join` to the FROM clause of the newly generated
           SELECT statement.    This is completely reworked from the behavior
           in 1.3, which would instead create a subquery of the entire
           :class:`_expression.Select` and then join that subquery to the
           target.
 
           This is a **backwards incompatible change** as the previous behavior
           was mostly useless, producing an unnamed subquery rejected by
           most databases in any case.   The new behavior is modeled after
           that of the very successful :meth:`_orm.Query.join` method in the
           ORM, in order to support the functionality of :class:`_orm.Query`
           being available by using a :class:`_sql.Select` object with an
           :class:`_orm.Session`.
 
           See the notes for this change at :ref:`change_select_join`.
 
 
        :param target: target table to join towards
 
        :param onclause: ON clause of the join.  If omitted, an ON clause
         is generated automatically based on the :class:`_schema.ForeignKey`
         linkages between the two tables, if one can be unambiguously
         determined, otherwise an error is raised.
 
        :param isouter: if True, generate LEFT OUTER join.  Same as
         :meth:`_expression.Select.outerjoin`.
 
        :param full: if True, generate FULL OUTER join.
 
        .. seealso::
 
            :ref:`tutorial_select_join` - in the :doc:`/tutorial/index`
 
            :ref:`orm_queryguide_joins` - in the :ref:`queryguide_toplevel`
 
            :meth:`_expression.Select.join_from`
 
            :meth:`_expression.Select.outerjoin`
 
        r±NrŸ)rrßrÚJoinTargetRolerSrÁ)rŽrrrrÚ join_targetÚonclause_elementrŒrŒrr
s Bÿüÿz Select.join)rra)Úfrom_rrrrŠcCs|j|||d|dS)aCreate a SQL LEFT OUTER JOIN against this
        :class:`_expression.Select` object's criterion and apply generatively,
        returning the newly resulting :class:`_expression.Select`.
 
        Usage is the same as that of :meth:`_selectable.Select.join_from`.
 
        T©rrr)Ú    join_from)rŽrrrrrŒrŒrÚouterjoin_fromñsÿzSelect.outerjoin_from)rrrrrrŠcCsbtjtj||d}tjtj||d}|dk    r<t tj|¡}nd}|j|||||dœff7_|S)aCreate a SQL JOIN against this :class:`_expression.Select`
        object's criterion
        and apply generatively, returning the newly resulting
        :class:`_expression.Select`.
 
        E.g.::
 
            stmt = select(user_table, address_table).join_from(
                user_table, address_table, user_table.c.id == address_table.c.user_id
            )
 
        The above statement generates SQL similar to::
 
            SELECT user.id, user.name, address.id, address.email, address.user_id
            FROM user JOIN address ON user.id = address.user_id
 
        .. versionadded:: 1.4
 
        :param from\_: the left side of the join, will be rendered in the
         FROM clause and is roughly equivalent to using the
         :meth:`.Select.select_from` method.
 
        :param target: target table to join towards
 
        :param onclause: ON clause of the join.
 
        :param isouter: if True, generate LEFT OUTER join.  Same as
         :meth:`_expression.Select.outerjoin`.
 
        :param full: if True, generate FULL OUTER join.
 
        .. seealso::
 
            :ref:`tutorial_select_join` - in the :doc:`/tutorial/index`
 
            :ref:`orm_queryguide_joins` - in the :ref:`queryguide_toplevel`
 
            :meth:`_expression.Select.join`
 
        r±NrŸ)rrßrrùrrSrÁ)rŽrrrrrrrrŒrŒrr s*7ÿÿüÿzSelect.join_from)rrrrŠcCs|j||d|dS)añCreate a left outer join.
 
        Parameters are the same as that of :meth:`_expression.Select.join`.
 
        .. versionchanged:: 1.4 :meth:`_expression.Select.outerjoin` now
           creates a :class:`_sql.Join` object between a
           :class:`_sql.FromClause` source that is within the FROM clause of
           the existing SELECT, and a given target :class:`_sql.FromClause`,
           and then adds this :class:`_sql.Join` to the FROM clause of the
           newly generated SELECT statement.    This is completely reworked
           from the behavior in 1.3, which would instead create a subquery of
           the entire
           :class:`_expression.Select` and then join that subquery to the
           target.
 
           This is a **backwards incompatible change** as the previous behavior
           was mostly useless, producing an unnamed subquery rejected by
           most databases in any case.   The new behavior is modeled after
           that of the very successful :meth:`_orm.Query.join` method in the
           ORM, in order to support the functionality of :class:`_orm.Query`
           being available by using a :class:`_sql.Select` object with an
           :class:`_orm.Session`.
 
           See the notes for this change at :ref:`change_select_join`.
 
        .. seealso::
 
            :ref:`tutorial_select_join` - in the :doc:`/tutorial/index`
 
            :ref:`orm_queryguide_joins` - in the :ref:`queryguide_toplevel`
 
            :meth:`_expression.Select.join`
 
        Tr)r
)rŽrrrrŒrŒrr Ps)zSelect.outerjoinzSequence[FromClause]cCs| |d¡ ¡S)aGCompute the final displayed list of :class:`_expression.FromClause`
        elements.
 
        This method will run through the full computation required to
        determine what FROM elements will be displayed in the resulting
        SELECT statement, including shadowing individual tables with
        JOIN objects, as well as full computation for ORM use cases including
        eager loading clauses.
 
        For ORM use, this accessor returns the **post compilation**
        list of FROM objects; this collection will include elements such as
        eagerly loaded tables and joins.  The objects will **not** be
        ORM enabled and not work as a replacement for the
        :meth:`_sql.Select.select_froms` collection; additionally, the
        method is not well performing for an ORM enabled statement as it
        will incur the full ORM construction process.
 
        To retrieve the FROM list that's implied by the "columns" collection
        passed to the :class:`_sql.Select` originally, use the
        :attr:`_sql.Select.columns_clause_froms` accessor.
 
        To select from an alternative set of columns while maintaining the
        FROM list, use the :meth:`_sql.Select.with_only_columns` method and
        pass the
        :paramref:`_sql.Select.with_only_columns.maintain_column_froms`
        parameter.
 
        .. versionadded:: 1.4.23 - the :meth:`_sql.Select.get_final_froms`
           method replaces the previous :attr:`_sql.Select.froms` accessor,
           which is deprecated.
 
        .. seealso::
 
            :attr:`_sql.Select.columns_clause_froms`
 
        N)rrârrŒrŒrÚget_final_froms{s&zSelect.get_final_fromsz1.4.23zqThe :attr:`_expression.Select.froms` attribute is moved to the :meth:`_expression.Select.get_final_froms` method.cCs| ¡S)zYReturn the displayed list of :class:`_expression.FromClause`
        elements.
 
 
        )r"rrŒrŒrr¶£s z Select.fromsrˆcCst |¡ |¡S)a¡Return the set of :class:`_expression.FromClause` objects implied
        by the columns clause of this SELECT statement.
 
        .. versionadded:: 1.4.23
 
        .. seealso::
 
            :attr:`_sql.Select.froms` - "final" FROM list taking the full
            statement into account
 
            :meth:`_sql.Select.with_only_columns` - makes use of this
            collection to set up a new FROM list
 
        )rér½rÍrrŒrŒrÚcolumns_clause_froms±s
ÿzSelect.columns_clause_fromsržcCs
t|jƒS)a0An iterator of all :class:`_expression.ColumnElement`
        expressions which would
        be rendered into the columns clause of the resulting SELECT statement.
 
        This method is legacy as of 1.4 and is superseded by the
        :attr:`_expression.Select.exported_columns` collection.
 
        )Úiterr¡rrŒrŒrÚ inner_columnsÆs zSelect.inner_columnsr¢r¤cCs8|dk    r||jkrdS| ¡D]}| |¡rdSqdSr¨)rrör§)rŽr¥rcrŒrŒrr§Ós  
zSelect.is_derived_fromr„r¨r_c sÊtt t|jŽt|jŽtdd„|jDƒŽ¡ƒ}‡‡fdd„|Dƒ‰‡‡fdd„|jDƒ}dd„ˆ ¡Dƒ     |¡     |¡}t
|ƒt
|ƒ|_dd    d
d œ‡fd d „ }|ˆd<t ƒj fˆddœˆ—Ž|  ¡dS)NcSsg|] }|d‘qS)rrŒr,rŒrŒrrãësz*Select._copy_internals.<locals>.<listcomp>csi|]}|ˆ|fˆŽ“qSrŒrŒrbrdrŒrreõsz*Select._copy_internals.<locals>.<dictcomp>csg|]}ˆ|fˆŽ‘qSrŒrŒrbrdrŒrrãøscSsh|]}t|tƒr|’qSrŒ)rkrrbrŒrŒrr”ús
z)Select._copy_internals.<locals>.<setcomp>rfrrgrhcs,t|tƒr(|jˆkr(ˆ|j |¡}|SdSr‹rjrmrnrŒrrpsz'Select._copy_internals.<locals>.replacerp)r¿)r`Ú
omit_attrs)r8r\r]r4rÂrÕrÁr¿r„Ú
differencerärqrrrs)rŽr`rartZexisting_from_objZ    add_fromsrprurvrrrÜs( ýÿÿþÿ    zSelect._copy_internalszIterable[ClauseElement]c s"t tƒjfddi|—Ž| ¡¡S)Nr&)r¿rárà)r\r]rqÚ get_childrenrörrurŒrr(s
ÿþûzSelect.get_children)r    rŠcs&ˆ ¡ˆj‡fdd„|Dƒˆ_ˆS)aúReturn a new :func:`_expression.select` construct with
        the given entities appended to its columns clause.
 
        E.g.::
 
            my_select = my_select.add_columns(table.c.new_column)
 
        The original expressions in the columns clause remain in place.
        To replace the original expressions with new ones, see the method
        :meth:`_expression.Select.with_only_columns`.
 
        :param \*entities: column, table, or other entity expressions to be
         added to the columns clause
 
        .. seealso::
 
            :meth:`_expression.Select.with_only_columns` - replaces existing
            expressions rather than appending.
 
            :ref:`orm_queryguide_select_multiple_entities` - ORM-centric
            example
 
        csg|]}tjtj|ˆd‘qSr
r+)rár«rrŒrrã<s ýÿz&Select.add_columns.<locals>.<listcomp>)rsrÂr rŒrrÚ add_columnss
ü
zSelect.add_columnsz%Iterable[_ColumnsClauseArgument[Any]]cs‡fdd„t |¡Dƒˆ_dS)Ncsg|]}tjtj|ˆd‘qSr
r+r rrŒrrãGs ýÿz(Select._set_entities.<locals>.<listcomp>)rXr.rÂr rŒrrÚ _set_entitiesDs
üzSelect._set_entitiesrÃz–The :meth:`_expression.Select.column` method is deprecated and will be removed in a future release.  Please use :meth:`_expression.Select.add_columns`rªcCs
| |¡S)aReturn a new :func:`_expression.select` construct with
        the given column expression added to its columns clause.
 
        E.g.::
 
            my_select = my_select.column(table.c.new_column)
 
        See the documentation for
        :meth:`_expression.Select.with_only_columns`
        for guidelines on adding /replacing the columns of a
        :class:`_expression.Select` object.
 
        )r)r¬rŒrŒrr«Nsz Select.columnrÅ)Ú only_synonymsrŠcCs.|jtjjj|jf|j|jžd|iŽŽ}|S)a"Return a new :func:`_expression.select` construct with redundantly
        named, equivalently-valued columns removed from the columns clause.
 
        "Redundant" here means two columns where one refers to the
        other either based on foreign key, or via a simple equality
        comparison in the WHERE clause of the statement.   The primary purpose
        of this method is to automatically construct a select statement
        with all uniquely-named columns, without the need to use
        table-qualified labels as
        :meth:`_expression.Select.set_label_style`
        does.
 
        When columns are omitted based on foreign key, the referred-to
        column is the one that's kept.  When columns are omitted based on
        WHERE equivalence, the first column in the columns clause is the
        one that's kept.
 
        :param only_synonyms: when True, limit the removal of columns
         to those which have the same name as the equivalent.   Otherwise,
         all columns that are equivalent to another are removed.
 
        r+)Úwith_only_columnsrXrÉrÊrZr¡rÕr¿)rŽr+ZwocrŒrŒrrZdsÿ
ýþÿzSelect.reduce_columnsz
_TCCA[_T0]zSelect[Tuple[_T0]])Ú _Select__ent0rŠcCsdSr‹rŒ)rŽr-rŒrŒrr,‹súSelect.with_only_columnsz
_TCCA[_T1]zSelect[Tuple[_T0, _T1]])r-Ú _Select__ent1rŠcCsdSr‹rŒ)rŽr-r/rŒrŒrr,sz
_TCCA[_T2]zSelect[Tuple[_T0, _T1, _T2]])r-r/Ú _Select__ent2rŠcCsdSr‹rŒ)rŽr-r/r0rŒrŒrr,•sz
_TCCA[_T3]z!Select[Tuple[_T0, _T1, _T2, _T3]])r-r/r0Ú _Select__ent3rŠcCsdSr‹rŒ)rŽr-r/r0r1rŒrŒrr,›sz
_TCCA[_T4]z&Select[Tuple[_T0, _T1, _T2, _T3, _T4]])r-r/r0r1Ú _Select__ent4rŠcCsdSr‹rŒ)rŽr-r/r0r1r2rŒrŒrr,¥s    z
_TCCA[_T5]z+Select[Tuple[_T0, _T1, _T2, _T3, _T4, _T5]])r-r/r0r1r2Ú _Select__ent5rŠcCsdSr‹rŒ)rŽr-r/r0r1r2r3rŒrŒrr,°s
z
_TCCA[_T6]z0Select[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6]])r-r/r0r1r2r3Ú _Select__ent6rŠcCsdSr‹rŒ)rŽr-r/r0r1r2r3r4rŒrŒrr,¼s z
_TCCA[_T7]z5Select[Tuple[_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7]])    r-r/r0r1r2r3r4Ú _Select__ent7rŠc        CsdSr‹rŒ)    rŽr-r/r0r1r2r3r4r5rŒrŒrr,És )Úmaintain_column_froms)r    r6Ú _Select__kwrŠcOsdSr‹rŒ©rŽr6r    r7rŒrŒrr,ÙscOsR|r
tƒ‚| ¡|r*|jj|f|jžŽt |¡dd„t dd|¡Dƒ|_    |S)aÊReturn a new :func:`_expression.select` construct with its columns
        clause replaced with the given entities.
 
        By default, this method is exactly equivalent to as if the original
        :func:`_expression.select` had been called with the given entities.
        E.g. a statement::
 
            s = select(table1.c.a, table1.c.b)
            s = s.with_only_columns(table1.c.b)
 
        should be exactly equivalent to::
 
            s = select(table1.c.b)
 
        In this mode of operation, :meth:`_sql.Select.with_only_columns`
        will also dynamically alter the FROM clause of the
        statement if it is not explicitly stated.
        To maintain the existing set of FROMs including those implied by the
        current columns clause, add the
        :paramref:`_sql.Select.with_only_columns.maintain_column_froms`
        parameter::
 
            s = select(table1.c.a, table2.c.b)
            s = s.with_only_columns(table1.c.a, maintain_column_froms=True)
 
        The above parameter performs a transfer of the effective FROMs
        in the columns collection to the :meth:`_sql.Select.select_from`
        method, as though the following were invoked::
 
            s = select(table1.c.a, table2.c.b)
            s = s.select_from(table1, table2).with_only_columns(table1.c.a)
 
        The :paramref:`_sql.Select.with_only_columns.maintain_column_froms`
        parameter makes use of the :attr:`_sql.Select.columns_clause_froms`
        collection and performs an operation equivalent to the following::
 
            s = select(table1.c.a, table2.c.b)
            s = s.select_from(*s.columns_clause_froms).with_only_columns(table1.c.a)
 
        :param \*entities: column expressions to be used.
 
        :param maintain_column_froms: boolean parameter that will ensure the
         FROM list implied from the current columns clause will be transferred
         to the :meth:`_sql.Select.select_from` method first.
 
         .. versionadded:: 1.4.23
 
        cSsg|]}t tj|¡‘qSrŒr+r5rŒrŒrrã*sÿz,Select.with_only_columns.<locals>.<listcomp>r    r.)
r!Z_assert_no_memoizationsrZnon_generativer#rúrrZ!_expression_collection_was_a_listrÂr8rŒrŒrr,âs$8ÿÿ
ÿþrbcCs t |j¡S)a Return the completed WHERE clause for this
        :class:`_expression.Select` statement.
 
        This assembles the current collection of WHERE criteria
        into a single :class:`_expression.BooleanClauseList` construct.
 
 
        .. versionadded:: 1.4
 
        )rGZ_construct_for_whereclauserÕrrŒrŒrÚ whereclause2s ÿzSelect.whereclause)r9rŠcGs<t|jtƒst‚|D]"}t tj|¡}|j|f7_q|S)z¯Return a new :func:`_expression.select` construct with
        the given expression added to
        its WHERE clause, joined to the existing clause via AND, if any.
 
        )rkrÕrär7rrßrÚWhereHavingRole)rŽr9Ú    criterionZwhere_criteriarŒrŒrrEsÿz Select.where)ÚhavingrŠcGs,|D]"}t tj|¡}|j|f7_q|S)z°Return a new :func:`_expression.select` construct with
        the given expression added to
        its HAVING clause, joined to the existing clause via AND, if any.
 
        )rrßrr:r)rŽr<r;Zhaving_criteriarŒrŒrr<Vsÿz Select.havingr–)rÅrŠcGs0|r&d|_|jtdd„|Dƒƒ|_nd|_|S)a±Return a new :func:`_expression.select` construct which
        will apply DISTINCT to its columns clause.
 
        :param \*expr: optional column expressions.  When present,
         the PostgreSQL dialect will render a ``DISTINCT ON (<expressions>>)``
         construct.
 
         .. deprecated:: 1.4 Using \*expr in other dialects is deprecated
            and will raise :class:`_exc.CompileError` in a future version.
 
        Tcss|]}t tj|¡VqdSr‹)rrßrZByOfRole)ráÚerŒrŒrr$tsz"Select.distinct.<locals>.<genexpr>)rrrä)rŽrÅrŒrŒrÚdistinctes  ÿzSelect.distinct©r¶rŠcs$ˆjt‡fdd„|Dƒƒ7_ˆS)aReturn a new :func:`_expression.select` construct with the
        given FROM expression(s)
        merged into its list of FROM objects.
 
        E.g.::
 
            table1 = table('t1', column('a'))
            table2 = table('t2', column('b'))
            s = select(table1.c.a).\
                select_from(
                    table1.join(table2, table1.c.a==table2.c.b)
                )
 
        The "from" list is a unique set on the identity of each element,
        so adding an already present :class:`_schema.Table`
        or other selectable
        will have no effect.   Passing a :class:`_expression.Join` that refers
        to an already present :class:`_schema.Table`
        or other selectable will have
        the effect of concealing the presence of that selectable as
        an individual element in the rendered FROM list, instead
        rendering it into a JOIN clause.
 
        While the typical purpose of :meth:`_expression.Select.select_from`
        is to
        replace the default, derived FROM clause with a join, it can
        also be called with individual table elements, multiple times
        if desired, in the case that the FROM clause cannot be fully
        derived from the columns clause::
 
            select(func.count('*')).select_from(table1)
 
        c3s |]}tjtj|ˆdVqdS)r±N©rrßrrù)rár¥rrŒrr$Ÿs ýÿz%Select.select_from.<locals>.<genexpr>)r¿rä)rŽr¶rŒrrr{s$ü zSelect.select_fromú2Union[Literal[(None, False)], _FromClauseArgument]©Ú fromclausesrŠcGsRd|_|r|ddkr4t|ƒdkr,t d¡‚d|_n|jtdd„|Dƒƒ|_|S)    aŽReturn a new :class:`_expression.Select`
        which will correlate the given FROM
        clauses to that of an enclosing :class:`_expression.Select`.
 
        Calling this method turns off the :class:`_expression.Select` object's
        default behavior of "auto-correlation".  Normally, FROM elements
        which appear in a :class:`_expression.Select`
        that encloses this one via
        its :term:`WHERE clause`, ORDER BY, HAVING or
        :term:`columns clause` will be omitted from this
        :class:`_expression.Select`
        object's :term:`FROM clause`.
        Setting an explicit correlation collection using the
        :meth:`_expression.Select.correlate`
        method provides a fixed list of FROM objects
        that can potentially take place in this process.
 
        When :meth:`_expression.Select.correlate`
        is used to apply specific FROM clauses
        for correlation, the FROM elements become candidates for
        correlation regardless of how deeply nested this
        :class:`_expression.Select`
        object is, relative to an enclosing :class:`_expression.Select`
        which refers to
        the same FROM object.  This is in contrast to the behavior of
        "auto-correlation" which only correlates to an immediate enclosing
        :class:`_expression.Select`.
        Multi-level correlation ensures that the link
        between enclosed and enclosing :class:`_expression.Select`
        is always via
        at least one WHERE/ORDER BY/HAVING/columns clause in order for
        correlation to take place.
 
        If ``None`` is passed, the :class:`_expression.Select`
        object will correlate
        none of its FROM entries, and all will render unconditionally
        in the local FROM clause.
 
        :param \*fromclauses: one or more :class:`.FromClause` or other
         FROM-compatible construct such as an ORM mapped entity to become part
         of the correlate collection; alternatively pass a single value
         ``None`` to remove all existing correlations.
 
        .. seealso::
 
            :meth:`_expression.Select.correlate_except`
 
            :ref:`tutorial_scalar_subquery`
 
        Fr¾NFrzKadditional FROM objects not accepted when passing None/False to correlate()rŒcss|]}t tj|¡VqdSr‹r@rbrŒrŒrr$ësz#Select.correlate.<locals>.<genexpr>)r´rrWr rárä©rŽrCrŒrŒrr¢§s; ÿ ÿ zSelect.correlatecGsVd|_|r|ddkr4t|ƒdkr,t d¡‚d|_n|jp<dtdd„|Dƒƒ|_|S)    aÿReturn a new :class:`_expression.Select`
        which will omit the given FROM
        clauses from the auto-correlation process.
 
        Calling :meth:`_expression.Select.correlate_except` turns off the
        :class:`_expression.Select` object's default behavior of
        "auto-correlation" for the given FROM elements.  An element
        specified here will unconditionally appear in the FROM list, while
        all other FROM elements remain subject to normal auto-correlation
        behaviors.
 
        If ``None`` is passed, or no arguments are passed,
        the :class:`_expression.Select` object will correlate all of its
        FROM entries.
 
        :param \*fromclauses: a list of one or more
         :class:`_expression.FromClause`
         constructs, or other compatible constructs (i.e. ORM-mapped
         classes) to become part of the correlate-exception collection.
 
        .. seealso::
 
            :meth:`_expression.Select.correlate`
 
            :ref:`tutorial_scalar_subquery`
 
        FrrDrzRadditional FROM objects not accepted when passing None/False to correlate_except()rŒcss|]}t tj|¡VqdSr‹r@rbrŒrŒrr$sz*Select.correlate_except.<locals>.<genexpr>)r´rrWr ràrärErŒrŒrÚcorrelate_exceptðs! ÿÿ zSelect.correlate_exceptrAcs2tdt |j¡ƒ‰t‡fdd„|jDƒƒ}| ¡S)a-A :class:`_expression.ColumnCollection`
        representing the columns that
        this SELECT statement or similar construct returns in its result set,
        not including :class:`_sql.TextClause` constructs.
 
        This collection differs from the :attr:`_expression.FromClause.columns`
        collection of a :class:`_expression.FromClause` in that the columns
        within this collection cannot be directly nested inside another SELECT
        statement; a subquery must be applied first which provides for the
        necessary parenthesization required by SQL.
 
        For a :func:`_expression.select` construct, the collection here is
        exactly what would be rendered inside the "SELECT" statement, and the
        :class:`_expression.ColumnElement` objects are directly present as they
        were given, e.g.::
 
            col1 = column('q', Integer)
            col2 = column('p', Integer)
            stmt = select(col1, col2)
 
        Above, ``stmt.selected_columns`` would be a collection that contains
        the ``col1`` and ``col2`` objects directly. For a statement that is
        against a :class:`_schema.Table` or other
        :class:`_expression.FromClause`, the collection will use the
        :class:`_expression.ColumnElement` objects that are in the
        :attr:`_expression.FromClause.c` collection of the from element.
 
        .. note::
 
            The :attr:`_sql.Select.selected_columns` collection does not
            include expressions established in the columns clause using the
            :func:`_sql.text` construct; these are silently omitted from the
            collection. To use plain textual column expressions inside of a
            :class:`_sql.Select` construct, use the :func:`_sql.literal_column`
            construct.
 
 
        .. versionadded:: 1.4
 
        zCallable[[Any], str]cs g|]}t|ƒrˆ|ƒ|f‘qSrŒr#r5©ÚconvrŒrrãWsþz+Select.selected_columns.<locals>.<listcomp>)rrérêrær;r¡r-)rŽÚccrŒrGrrB s1
þ
þÿzSelect.selected_columnscCst |¡j}t||ƒƒSr‹)rér½rêrƒrrŒrŒrr¡_s zSelect._all_selected_columnscCs|jtkr| t¡}|Sr‹)rærJr¡rLrrŒrŒrrTds
 
z"Select._ensure_disambiguated_namesrCr…rErFcsP|r(|}‡fdd„t| d¡|ƒDƒ}n‡fdd„| d¡Dƒ}ˆj |¡dS)zYGenerate column proxies to place in the exported ``.c``
        collection of a subquery.c    s6g|].\\}}}}}}t|ƒr|jˆ||d|d‘qS)T)r3r¼Úname_is_truncatableÚcompound_select_cols©r$r )ráràrárâr&räÚ
extra_colsrMrŒrrãvs êûz>Select._generate_fromclause_column_proxies.<locals>.<listcomp>Fcs0g|](\}}}}}t|ƒr|jˆ||dd‘qS)T)r3r¼rJrL)ráràrárâr&rärMrŒrrã‘sóüN)r¯rïrþr%)rŽrûrDr±ZproxrŒrMrr©is 
þî
óz*Select._generate_fromclause_column_proxiescCs|jpt|jjƒSr‹)r~r£rmr‡rrŒrŒrÚ_needs_parens_for_grouping¤sÿz!Select._needs_parens_for_groupingr=z*Union[SelectStatementGrouping[Self], Self]r>cCs"t|tƒr| ¡s|St|ƒSdSr‹)rkr›rNrWr@rŒrŒrrA©s ÿþzSelect.self_grouprgr›rcGstj|f|žŽS)aÀReturn a SQL ``UNION`` of this select() construct against
        the given selectables provided as positional arguments.
 
        :param \*other: one or more elements with which to create a
         UNION.
 
         .. versionchanged:: 1.4.28
 
            multiple elements are now accepted.
 
        :param \**kwargs: keyword arguments are forwarded to the constructor
         for the newly created :class:`_sql.CompoundSelect` object.
 
        )r›r¡rrŒrŒrrø½sz Select.unioncGstj|f|žŽS)aÄReturn a SQL ``UNION ALL`` of this select() construct against
        the given selectables provided as positional arguments.
 
        :param \*other: one or more elements with which to create a
         UNION.
 
         .. versionchanged:: 1.4.28
 
            multiple elements are now accepted.
 
        :param \**kwargs: keyword arguments are forwarded to the constructor
         for the newly created :class:`_sql.CompoundSelect` object.
 
        )r›r¢rrŒrŒrrÜÐszSelect.union_allcGstj|f|žŽS)a.Return a SQL ``EXCEPT`` of this select() construct against
        the given selectable provided as positional arguments.
 
        :param \*other: one or more elements with which to create a
         UNION.
 
         .. versionchanged:: 1.4.28
 
            multiple elements are now accepted.
 
        )r›r£rrŒrŒrÚexcept_ãszSelect.except_cGstj|f|žŽS)a3Return a SQL ``EXCEPT ALL`` of this select() construct against
        the given selectables provided as positional arguments.
 
        :param \*other: one or more elements with which to create a
         UNION.
 
         .. versionchanged:: 1.4.28
 
            multiple elements are now accepted.
 
        )r›r¤rrŒrŒrÚ
except_allószSelect.except_allcGstj|f|žŽS)aÄReturn a SQL ``INTERSECT`` of this select() construct against
        the given selectables provided as positional arguments.
 
        :param \*other: one or more elements with which to create a
         UNION.
 
         .. versionchanged:: 1.4.28
 
            multiple elements are now accepted.
 
        :param \**kwargs: keyword arguments are forwarded to the constructor
         for the newly created :class:`_sql.CompoundSelect` object.
 
        )r›r¥rrŒrŒrÚ    intersectszSelect.intersectcGstj|f|žŽS)aÈReturn a SQL ``INTERSECT ALL`` of this select() construct
        against the given selectables provided as positional arguments.
 
        :param \*other: one or more elements with which to create a
         UNION.
 
         .. versionchanged:: 1.4.28
 
            multiple elements are now accepted.
 
        :param \**kwargs: keyword arguments are forwarded to the constructor
         for the newly created :class:`_sql.CompoundSelect` object.
 
        )r›r¦rrŒrŒrÚ intersect_allszSelect.intersect_all)N)N)N)N)T)N)dr‘r’r“r¯rÐrÁrærÀrrráràrÕrr¿r´r²rér¸rrTrøZdp_memoized_select_entitiesZdp_clauseelement_tuplerr¤r²r¥rùrØròrÔr×rèrêrírðr*r³r?Z_executable_traverse_internalsrOZdp_has_cache_keyr¹r¦rrTrOrrrrrÿrr›rrÉr5r
r!r r r"rXrÒr¶r#r%r§r+rrr(r)r*r«rÓrZr,r9Z _whereclauserr<r>rr¢rFrYrBr¡rTr©rNrArørÜrOrPrQrRr§rŒrŒrurr«sT
              ÿ
þëéèçæåäÿ
 ÿ  +ýúWüúüùNýû+(þ 
ÿ:    $
þ&    
   ýýO+H/> ú;ÿrc@s8eZdZUdZdejfdejfgZded<gZ    ded<dZ
e sBd    Z dZ d
ed<d
d d œd d„Zdddœdd„Zddœdd„Zdd dœdd„Zeddœdd„ƒZeZeddd œd!d"„ƒZed6d$d%d$d&œd'd(„ƒZed7d)d%d)d&œd*d(„ƒZd8d%d)d+œd,d(„Ze r d-dœd.d/„Zed0dd1œd2d3„ƒZed0dd1œd4d5„ƒZd#S)9rRa£Represent a scalar subquery.
 
 
    A :class:`_sql.ScalarSelect` is created by invoking the
    :meth:`_sql.SelectBase.scalar_subquery` method.   The object
    then participates in other SQL expressions as a SQL column expression
    within the :class:`_sql.ColumnElement` hierarchy.
 
    .. seealso::
 
        :meth:`_sql.SelectBase.scalar_subquery`
 
        :ref:`tutorial_scalar_subquery` - in the 2.0 tutorial
 
    r­r8rSrOrˆr4TFrür¨rXcCs||_| ¡|_dSr‹)r­rOr8rrŒrŒrrTJszScalarSelect.__init__rÝr)ÚattrrŠcCs t|j|ƒSr‹)rr­)rŽrSrŒrŒrÚ __getattr__NszScalarSelect.__getattr__r"r‰cCs|j|jdœS)N©r­r8rUrrŒrŒrrQszScalarSelect.__getstate__r    cCs|d|_|d|_dS)Nr­r8rUr rŒrŒrr Ts
zScalarSelect.__setstate__rcCst d¡‚dS)NzcScalar Select expression has no columns; use this object directly within a column-level expression.)rWrÚrrŒrŒrr)XsÿzScalarSelect.columnsrr\)r‰rŠcCstd|jƒ |¡|_|S)zuApply a WHERE clause to the SELECT statement referred to
        by this :class:`_expression.ScalarSelect`.
 
        r)rr­r)rŽr‰rŒrŒrrbszScalarSelect.whereNrþr=)rŽr?rŠcCsdSr‹rŒr@rŒrŒrrAkszScalarSelect.self_groupr†cCsdSr‹rŒr@rŒrŒrrAqsr>cCs|Sr‹rŒr@rŒrŒrrAwsrcCsdSr‹rŒrrŒrŒrr]szScalarSelect._ungrouprArBcGstd|jƒj|Ž|_|S)aÓReturn a new :class:`_expression.ScalarSelect`
        which will correlate the given FROM
        clauses to that of an enclosing :class:`_expression.Select`.
 
        This method is mirrored from the :meth:`_sql.Select.correlate` method
        of the underlying :class:`_sql.Select`.  The method applies the
        :meth:_sql.Select.correlate` method, then returns a new
        :class:`_sql.ScalarSelect` against that statement.
 
        .. versionadded:: 1.4 Previously, the
           :meth:`_sql.ScalarSelect.correlate`
           method was only available from :class:`_sql.Select`.
 
        :param \*fromclauses: a list of one or more
         :class:`_expression.FromClause`
         constructs, or other compatible constructs (i.e. ORM-mapped
         classes) to become part of the correlate collection.
 
        .. seealso::
 
            :meth:`_expression.ScalarSelect.correlate_except`
 
            :ref:`tutorial_scalar_subquery` - in the 2.0 tutorial
 
 
        r)rr­r¢rErŒrŒrr¢‚s ÿzScalarSelect.correlatecGstd|jƒj|Ž|_|S)aÜReturn a new :class:`_expression.ScalarSelect`
        which will omit the given FROM
        clauses from the auto-correlation process.
 
        This method is mirrored from the
        :meth:`_sql.Select.correlate_except` method of the underlying
        :class:`_sql.Select`.  The method applies the
        :meth:_sql.Select.correlate_except` method, then returns a new
        :class:`_sql.ScalarSelect` against that statement.
 
        .. versionadded:: 1.4 Previously, the
           :meth:`_sql.ScalarSelect.correlate_except`
           method was only available from :class:`_sql.Select`.
 
        :param \*fromclauses: a list of one or more
         :class:`_expression.FromClause`
         constructs, or other compatible constructs (i.e. ORM-mapped
         classes) to become part of the correlate-exception collection.
 
        .. seealso::
 
            :meth:`_expression.ScalarSelect.correlate`
 
            :ref:`tutorial_scalar_subquery` - in the 2.0 tutorial
 
 
        r)rr­rFrErŒrŒrrF¦s! ÿzScalarSelect.correlate_except)N)N)N)r‘r’r“r¯rTr¤rÊrOrær4rºrZ_is_implicitly_booleanršrTrTrr r›r)r&r5rrrAr]r¢rFrŒrŒrŒrrR*sB
þ  ÿÿÿ#rRc@s eZdZUdZdZded<d%ddœdd    „Zejd
d œd d „ƒZ    dddœdd„Z
dd œdd„Z dddœdd„Z dddœdd„Z dddœdd „Zd!dd"œd#d$„ZdS)&rPzãRepresent an ``EXISTS`` clause.
 
    See :func:`_sql.exists` for a description of usage.
 
    An ``EXISTS`` clause can also be constructed from a :func:`_sql.select`
    instance by calling :meth:`_sql.SelectBase.exists`.
 
    Tz>Union[SelectStatementGrouping[Select[Any]], ScalarSelect[Any]]r­NzKOptional[Union[_ColumnsClauseArgument[Any], SelectBase, ScalarSelect[Any]]])Ú_Exists__argumentcCsn|dkrttdƒƒ ¡}n8t|tƒr6| ¡}|j|_nt|tƒrF|}n t|ƒ ¡}tj||t    j
t j dddS)NrÙT)ÚoperatorrnZwraps_column_expression) rrNrÿrkrüZ_propagate_attrsrRrPrTrrQrZ BOOLEANTYPE)rŽrVrŸrŒrŒrrTÚs    
 
 
 ûzExists.__init__rˆr‰cCsgSr‹rŒrrŒrŒrr4õszExists._from_objectsz$Callable[[Select[Any]], Select[Any]]z$SelectStatementGrouping[Select[Any]])ÚfnrŠcCs2|j ¡}||ƒ}|jtjd}t|tƒs.t‚|S)NrQ)r­r]rArrQrkrWr7)rŽrXr­rYZ return_valuerŒrŒrÚ_regroupùs
 
zExists._regrouprcCst|ƒS)aºReturn a SELECT of this :class:`_expression.Exists`.
 
        e.g.::
 
            stmt = exists(some_table.c.id).where(some_table.c.id == 5).select()
 
        This will produce a statement resembling::
 
            SELECT EXISTS (SELECT id FROM some_table WHERE some_table = :param) AS anon_1
 
        .. seealso::
 
            :func:`_expression.select` - general purpose
            method which allows for arbitrary column lists.
 
        rrrŒrŒrrsz Exists.selectrAr\rBcs | ¡}| ‡fdd„¡|_|S)zžApply correlation to the subquery noted by this
        :class:`_sql.Exists`.
 
        .. seealso::
 
            :meth:`_sql.ScalarSelect.correlate`
 
        cs
|jˆŽSr‹)r¢r·©rCrŒrr%rz"Exists.correlate.<locals>.<lambda>©r+rYr­©rŽrCr=rŒrZrr¢s
 
ÿzExists.correlatecs | ¡}| ‡fdd„¡|_|S)z¥Apply correlation to the subquery noted by this
        :class:`_sql.Exists`.
 
        .. seealso::
 
            :meth:`_sql.ScalarSelect.correlate_except`
 
        cs
|jˆŽSr‹)rFr·rZrŒrr8rz)Exists.correlate_except.<locals>.<lambda>r[r\rŒrZrrF)s
 
ÿzExists.correlate_exceptr…r?cs | ¡}| ‡fdd„¡|_|S)aÝReturn a new :class:`_expression.Exists` construct,
        applying the given
        expression to the :meth:`_expression.Select.select_from`
        method of the select
        statement contained.
 
        .. note:: it is typically preferable to build a :class:`_sql.Select`
           statement first, including the desired WHERE clause, then use the
           :meth:`_sql.SelectBase.exists` method to produce an
           :class:`_sql.Exists` object at once.
 
        cs
|jˆŽSr‹)rr·©r¶rŒrrJrz$Exists.select_from.<locals>.<lambda>r[)rŽr¶r=rŒr]rr<s zExists.select_fromrrzcs | ¡}| ‡fdd„¡|_|S)aºReturn a new :func:`_expression.exists` construct with the
        given expression added to
        its WHERE clause, joined to the existing clause via AND, if any.
 
 
        .. note:: it is typically preferable to build a :class:`_sql.Select`
           statement first, including the desired WHERE clause, then use the
           :meth:`_sql.SelectBase.exists` method to produce an
           :class:`_sql.Exists` object at once.
 
        cs
|jˆŽSr‹rr·©rprŒrrZrzExists.where.<locals>.<lambda>r[)rŽrpr=rŒr^rrMs z Exists.where)N)r‘r’r“r¯ršrærTrXr”r4rYrr¢rFrrrŒrŒrŒrrPÍs
    ü
rPc@sôeZdZUdZdZeZdejfdej    fge
j Z de d<dZdZdZd0d    d
d d d œdd„Zd1d    dd d d œdd„Zeddœdd„ƒZejddœdd„ƒZdddœdd„Zddœdd„Zed d!d"d#œd$d%„ƒZd&d'œd(d)d d*œd+d,„Zd-dœd.d/„Zd&S)2Ú TextualSelectaFWrap a :class:`_expression.TextClause` construct within a
    :class:`_expression.SelectBase`
    interface.
 
    This allows the :class:`_expression.TextClause` object to gain a
    ``.c`` collection
    and other FROM-like capabilities such as
    :meth:`_expression.FromClause.alias`,
    :meth:`_expression.SelectBase.cte`, etc.
 
    The :class:`_expression.TextualSelect` construct is produced via the
    :meth:`_expression.TextClause.columns`
    method - see that method for details.
 
    .. versionchanged:: 1.4 the :class:`_expression.TextualSelect`
       class was renamed
       from ``TextAsFrom``, to more correctly suit its role as a
       SELECT-oriented object and not a FROM clause.
 
    .. seealso::
 
        :func:`_expression.text`
 
        :meth:`_expression.TextClause.columns` - primary creation interface.
 
    Ztextual_selectr­Ú column_argsrSrOTFr~z$List[_ColumnExpressionArgument[Any]]r£r¨)rñr)Ú
positionalrŠcCs| |dd„|Dƒ|¡dS)NcSsg|]}t tj|¡‘qSrŒ)rrßrZLabeledColumnExprRoler5rŒrŒrrã’sÿz*TextualSelect.__init__.<locals>.<listcomp>)r¯©rŽrñr)rarŒrŒrrTˆsþùzTextualSelect.__init__zList[NamedColumn[Any]]cCs||_||_||_dSr‹)r­r`rarbrŒrŒrr¯™szTextualSelect._initz.ColumnCollection[str, KeyedColumnElement[Any]]r‰cCstdd„|jDƒƒ ¡S)amA :class:`_expression.ColumnCollection`
        representing the columns that
        this SELECT statement or similar construct returns in its result set,
        not including :class:`_sql.TextClause` constructs.
 
        This collection differs from the :attr:`_expression.FromClause.columns`
        collection of a :class:`_expression.FromClause` in that the columns
        within this collection cannot be directly nested inside another SELECT
        statement; a subquery must be applied first which provides for the
        necessary parenthesization required by SQL.
 
        For a :class:`_expression.TextualSelect` construct, the collection
        contains the :class:`_expression.ColumnElement` objects that were
        passed to the constructor, typically via the
        :meth:`_expression.TextClause.columns` method.
 
 
        .. versionadded:: 1.4
 
        css|]}|j|fVqdSr‹r‘r5rŒrŒrr$»sz1TextualSelect.selected_columns.<locals>.<genexpr>)r;r`r-rrŒrŒrrB£sÿzTextualSelect.selected_columnsržcCs|jSr‹)r`rrŒrŒrr¡¿sz#TextualSelect._all_selected_columnsrHrJcCs|Sr‹rŒrLrŒrŒrr¡ÃszTextualSelect.set_label_stylecCs|Sr‹rŒrrŒrŒrrTÆsz)TextualSelect._ensure_disambiguated_nameszBindParameter[Any]rr\)ÚbindsÚbind_as_valuesrŠcOs|jj||Ž|_|Sr‹)r­Ú
bindparams)rŽrcrdrŒrŒrreÉszTextualSelect.bindparamsNrCr…rE)r¥rDrŠcsZtrtˆtƒst‚|r:ˆj ‡fdd„t|j|ƒDƒ¡nˆj ‡fdd„|jDƒ¡dS)Nc3s |]\}}|jˆ|dVqdS))rKNr)rár&rMr#rŒrr$ÞsÿzDTextualSelect._generate_fromclause_column_proxies.<locals>.<genexpr>c3s|]}| ˆ¡VqdSr‹rr5r#rŒrr$ås)rrkrúr7rþr%r¯r`)rŽr¥rDrŒr#rr©Òsÿþ
ÿz1TextualSelect._generate_fromclause_column_proxieszUnion[TypeEngine[Any], Any]cCs |jdjSr§)r`r8rrŒrŒrrOészTextualSelect._scalar_type)F)F)r‘r’r“r¯rÐrJrærTr¤rør*r³rOræZ _is_textualZis_textrUrTr¯rYrBrXr”r¡r¡rTr5rer©rOrŒrŒrŒrr_^s4
þý üü
úr_cs8eZdZdddœ‡fdd„ Zejddœdd    „ƒZ‡ZS)
ÚAnnotatedFromClauserr¨rc s4tƒjf|Ž| dd¡r0|j}|jj |¡|_dS)NZind_cols_on_fromclauseF)rqrrrþÚ_Annotated__elementrr&Úfget)rŽraÚeerurŒrrròs z#AnnotatedFromClause._copy_internalsr'r‰cCs |j}|jS)aoproxy the .c collection of the underlying FromClause.
 
        Originally implemented in 2008 as a simple load of the .c collection
        when the annotated construct was created (see d3621ae961a), in modern
        SQLAlchemy versions this can be expensive for statements constructed
        with ORM aliases.   So for #8796 SQLAlchemy 2.0 we instead proxy
        it, which works just as well.
 
        Two different use cases seem to require the collection either copied
        from the underlying one, or unique to this AnnotatedFromClause.
 
        See test_selectable->test_annotated_corresponding_column
 
        )rgr&)rŽrirŒrŒrr&ùszAnnotatedFromClause.c)r‘r’r“rrrXrDr&r§rŒrŒrurrfñsrf)âr¯Ú
__future__rr•Úenumrr\Útypingrrržrrrr    r
r r r rrrrrrrrrrr}rrrrrrrÚ_typingr r!r"r$r%r&r'r(Ú
annotationr)r*Úbaser+r,r.r0r1r2r4r5r7r8r9r:r;r<r=r>r?r@rArBrCrDršrErFrGrHrIrJrKrLrMrNrOrPrQZsqltypesrRrSrTrUrWrXrYZ util.typingrZr[r\r…r]r_r`rarbrcrdrerfrgrhrirjrkrlrmrnrorprqZ_TCCArrrsrtrurvr¾rwZdmlrxryrzr{r|r}r~rÐrrÿr€rr‚rƒr„Z_ColumnsClauseElementrÝrÎr‡róZ_OnClauseElementZ_ForUpdateOfArgumentZ_SetupJoinsElementržr'r—r³rœr´r·r¸rÔrèríZAnonymizedFromClauseRoler…r rHrƒrJrKrLrÆrMZ DMLTableRolerr¨rºr¬r½rÆrÀr¿rrõrÒrÞrßrårÙrØrúrWrr r£rrZ InElementRoler0r=rýZ DMLSelectRoleržrürVrWr^Z
plugin_forrr”r›r-Úsetattrr¼Z MemoizedSlotsrérøZ HasCacheKeyZHasCopyInternalsZ TraversiblerúrrRrPr_Z
TextAsFromrfrŒrŒrŒrÚ<module>s.                                                                                                                            ÿ
 ÿûþ 
ýÿ TP4/c0,cû#\$8!:
ú5!0
=;
"E(
ùE _p
    L
f
ÿ:
ù
 
ÿ$