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
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
//! What a record means, once every rule has been checked — the shape [`crate::emit`] turns into
//! tokens.
//!
//! A record's key is FLAT and it is `lineage ⊕ id`: the full path from the root, root-first, then
//! the record's own id. Root-first is load-bearing rather than cosmetic: root attribution reads the
//! leading column, and the blob address the key walks into nests its parents as directories, so a
//! lineage-scoped removal is one prefix. [`Lineage::fields`] therefore preserves the order it was
//! given.
//!
//! [`RecordModel`] is PLAIN: public fields, no constructor of its own, and nothing that parses. A
//! derive builds one from a decorated declaration; `ingraph-compiler` will later build the same
//! one from a manifest entry. Both reach the same emitter, and neither is this crate's business —
//! which is also where VALIDATION lives, with whoever holds the source spans to report against.
//!
//! Emitted NAMES are resolved before they get here: the model says what each type is called, and
//! the emitter does not decide. The convention those names default to lives here all the same
//! ([`default_key_name`], [`default_lineage_name`]) so that every front end defaults alike rather
//! than each keeping its own copy of the suffix rule.
use fmt;
use ToSnakeCase as _;
use format_ident;
use IdentExt as _;
use crate::;
/// WHICH NODE a declaration is — one word per derive, carried past validation because the emission
/// reads it too.
///
/// One node holds ONE storage and the MACRO IS the storage declaration, so the word answers both
/// halves of that law at once: which storage family this declaration was allowed to name, and
/// whether the emission mints the marker that makes a second one unspellable.
///
/// [`NodeKind::Operator`] is the base and every other kind is it plus a store, which is the order
/// they are written in.
///
/// The last three are the DERIVED INDEXES, and what separates them from the RECORD FAMILY is not
/// their storage but their KEY: each mints no `id` at all and carries its upstream's key instead,
/// which is [`NodeKind::derives_its_key`] below. That is why they arrived with `upstream(…)` and
/// could not have arrived before it — a kind with no way to name an upstream would have had no key
/// to carry.
///
/// [`NodeKind::Entity`] and [`NodeKind::Record`] are the RECORD FAMILY's two upper rungs, and they
/// differ in the storage essence alone: an entity bears an identity, an operator's whole compute
/// surface and a WIRE FACE, and holds no rows. It is the tier the 22 declarations that wrote no
/// storage block were already using without a word for it — measured on the way in — so it is the
/// rowless path given its own macro rather than a new code path.
///
/// [`NodeKind::Aggregate`] is the record family's THIRD member and it names an upstream like a
/// derived index does, which is why it sits between the two halves rather than in either. Its
/// storage answers are the record's to the letter — rows, bare store words, a wire face, a key it
/// mints — because its storage IS a record: the macro mints the `(group…, measure…)` row shape and
/// hands it to the record pass, the `journal` pattern. What is its own is the GRAMMAR that fills
/// those rows, and a grammar is not a storage fact.
///
/// That grammar has since ARRIVED and its EMISSION has not, which is the state worth stating rather
/// than leaving a reader to infer: `#[ingraph::aggregate(…)]` mints [`NodeKind::Aggregate`], reads
/// the whole declaration and refuses every rule it breaks by name — and then refuses an ACCEPTED one
/// too, with a sentence saying the expansion that mounts the node is the task after it. So the word
/// rows below are reached by an author's declaration now, and the only thing no caller reaches is an
/// emission. They were answered before either half existed, and answered truthfully, because they
/// are what the grammar got built AGAINST — a kind that reached a front end and only then discovered
/// its own storage law would have been discovering it a task too late.
/// A validated record: what it is called, what it emits, and every field it declares.
/// The LEVEL a node's spans open at — the closed vocabulary `tracing(level = …)` writes.
///
/// A CLOSED unit enum, because the vocabulary is `tracing`'s own five and nothing else can be a
/// level: a sixth word would name something no subscriber could filter on. That is the same test
/// [`Label`] and [`DatabaseKind`] are measured by, and the reason this is an enum where an engine or
/// a backend is a trait.
///
/// It mirrors `ingraph`'s own `TracingLevel` word for word, which is what makes the emission
/// mechanical: the model's variant is the framework's variant, spelled through
/// [`as_str`](Self::as_str) into the path an expansion writes. The DEFAULT lives at the framework
/// end alone — `Declared::TRACING`'s own — so this type has none, and a model carrying `None` is a
/// declaration that wrote no word rather than one that wrote the default.
/// The `poll(…)` entries: a node's own clocks, entry by entry.
///
/// DECLARATION ORDER IS THE CONTRACT. A poll source is a POSITION in the runtime's schedule, and
/// the position an entry lands at is the order it was written in — so the emitted `<Node>Due`
/// translates one into the other and an author never counts.
/// ONE `poll(…)` entry: the name it MINTS, and the clock it runs on.
/// WHO runs one poll entry's ticks — the two roads a clock's mandatory body word names.
///
/// # A closed vocabulary, so an enum
///
/// The house rule, and this seat is where it had been paid for with an `Option<syn::Path>` instead.
/// `None` meant *the entry wrote `light`* rather than *nothing is known*, which the grammar
/// guarantees with three refusals — an entry naming neither word, an entry naming both, and a
/// `light` entry in a detached mode — so no unstated state ever reached the model. What the `Option`
/// cost was that the guarantee lived in a comment: a reader of the field had to be told which of
/// two meanings the empty case carried, and a caller writing `entry.handler.is_none()` was spelling
/// *light* in a way nothing checked.
///
/// The arms say it instead. `Light` is a WORD and not an absence, and [`Citizen`](Self::Citizen)
/// carries the one thing the other road has to name.
/// WHERE one poll entry's tick runs — the mandatory word, and the whole of the vocabulary.
///
/// # A closed unit enum, and the framework-open law is why rather than an exception
///
/// The five words are the 2×2 of WORLD (sync / async) by PLACE (here / elsewhere), plus the one
/// engine that earned a word of its own. What is OPEN is the ENGINE behind each detached word —
/// `Spawn` and `AsyncSpawn` are seams a third-party pool implements and a deployment
/// installs — so a new executor costs no word here. That is the same division the store engines
/// keep: the vocabulary is the grammar's, the implementation is the seam's.
/// The clock ONE poll entry runs on — an interval, or a calendar expression.
///
/// An enum rather than two options, because the grammar makes them exclusive: an entry writes
/// `every = "…"` or `cron = "…"` and never both or neither, so a pair of `Option`s would leave two
/// states nothing means.
/// The `write` word: the stores ONE poll entry granted its ticks, grant by grant.
///
/// DECLARATION ORDER IS THE CONTRACT here too, for a different reason than [`Polls`]': a poll entry's
/// order is the position its ticks arrive under, and a grant's order is the order that clock's
/// emitted context takes its type parameters and constructor arguments in. Reordering the word
/// therefore reorders a `new` call, which is why it is the declaration's order and not a sorted one
/// — the author reads their own list back.
/// ONE `write` grant: the node it names, and the accessor that names it back.
/// The `subscribe(…)` container: a node's whole FAN-IN, entry by entry.
///
/// One [`Upstream`] per `upstream(…)` inside it, in the order written — which is the order the
/// emitted `In` enum's variants take, and the order a keyed group's payloads sit in.
/// ONE entry of a `subscribe(…)` container: an upstream, how it arrives, and which of its products
/// this edge carries.
/// A CHANGE FEED as an edge's intake: which database's feed, and whose hand fills it.
///
/// # The feeder is part of the word, because it is the one fact a feed cannot report
///
/// A change feed says what arrived; it never says who put it there. So *somebody lands into that
/// store* is a claim the declaration makes and the launch walk holds it to — absent `external` it is
/// a claim about THIS graph, and a deployment where nothing lands into the watched store earns the
/// three-road refusal rather than a listener that waits forever reporting nothing.
///
/// `external` says the hand is outside this process, and with that the two-process shape is a
/// first-class citizen: the dependence reads in the declaration, and the check stands down because
/// the answer is somewhere the walk cannot look.
///
/// # The database is NAMED, and a bare `changes` is refused
///
/// Which databases an upstream stores in is the UPSTREAM's declaration, and two macro expansions
/// cannot see each other — so a bare `changes` would be a word this grammar could not resolve and
/// would have to guess at. The refusal says so, which is the same wall every referring word in this
/// grammar is on the other side of.
/// WHAT an edge is opened as, as the declaration wrote it — the framework's own
/// [`ChannelOptions`](https://docs.rs/ingraph) vocabulary, mirrored here because the front end cannot
/// depend on the crate it emits for.
///
/// Two words and no third: the closed vocabulary is the whole of the channel axis, an overflow
/// posture belonging to the policy seam and a wait discipline to the engine.
/// The shelf field ONE variant word takes — its snake case, kept spellable where that is a keyword.
///
/// A free function beside [`Upstream::shelf`] because the front end needs it BEFORE an `Upstream`
/// exists: two entries whose shelf names would collide are refused while the list is still being
/// built, and refusing them requires the name the collision is about.
/// `emits`: the products a node puts on its edges.
///
/// SELF-DECLARED, and it has to be: two derives cannot see each other, so a node's downstream
/// cannot tell it what it produces, and a subscription is a CONNECTION rather than a declaration of
/// what flows. What the word buys is the sum a multi-product node's `Out` becomes, the vocabulary
/// naming its arms, and the per-product edges its wire set holds.
/// ONE product: the type that travels, and the word that names it.
/// How a node with several upstreams RELATES to them — the mode the bare word `key` selects.
///
/// One word, two topologies, and the difference is what a message coming out means. Written, the
/// upstreams JOIN: their messages make one output, whose identity descends from the designated
/// parent. Absent, they are INDEPENDENT: each upstream's messages make their own outputs, and which
/// upstream a row came from is part of its address.
///
/// An enum rather than two options, because the two are exclusive by construction — the designation
/// is present or it is not — and a pair of `Option`s would leave a fourth state nothing means.
/// Several upstreams producing INDEPENDENT outputs — M×N, N ≤ M.
///
/// The body stays a struct, because the payload is uniform: what differs between two of this node's
/// messages is where it came from, not what it holds. So the variation lives entirely in the
/// LINEAGE, which becomes a choice among the upstreams rather than a path through one.
/// One upstream of a fan-in: the node, and the word that names it everywhere a discriminant is
/// spelled.
/// A FUSING node's upstreams: the several messages that jointly make one output, and which of them
/// this node's identity descends from.
///
/// Provenance of the upstreams that are NOT the key parent needs nothing here, and the absence is
/// the ruling: it is opt-in, spelled as ordinary `ref = "…"` fields, which is the reference grammar
/// every record already has. Deriving a column from a topology fact is the one thing this grammar
/// never does.
/// One lineage column, and the field of the parent's key it equals.
/// The key MongoDB stores a record's id under.
///
/// The SERVER's name and not this framework's: MongoDB mints an `_id` for every document that
/// arrives without one and indexes it uniquely, so a document carrying that beside a declared `id`
/// would be one row with two identities and the wrong one indexed.
///
/// It is a `&str` here and again in `ingraph`'s own `comparison::mongo::ID`, which are two crates
/// and therefore two constants — the emitter cannot name a runtime item of the framework in a
/// string literal, and the framework cannot depend on the emitter. What keeps them one fact is that
/// each has ONE reader: this one is spent by `DatabaseBackend::external`, and that one by
/// `field_key`. `ingraph-codegen`'s own `tests::the_mongo_document_reads_the_id_out_of_underscore_id`
/// reads the emitted spelling back.
pub const MONGO_ID: &str = "_id";
/// The refusal a fallible crossing answers with when the declaration named none.
///
/// The honest default: a row's columns may each fail differently and no type names all of them.
/// `core`'s blanket `From` over it is also what makes an undeclared `?` compile without anybody
/// writing a bound — and it is the boundary `sqlx`'s own `ColumnDecode` presents, so a decode and
/// a crossing report through one shape.
///
/// One home, because a second family of crossings defaults to the same type — an interface's
/// computed field is fallible on its own terms and answers with this where its declaration says
/// nothing — and two spellings of one default is how one of them drifts.
/// The type ONE DATABASE stores a column at: the declared pin, or the domain type.
///
/// The uniform domain→row mapping, and the ONE place it is decided. A declaration that writes no
/// `type = "…"` for a database stores the type the field itself carries — which is what a row's own
/// field takes, and what an INTERFACE's row equation reads that field back at. Two readings of one
/// default would be two things that can come to disagree about a column nobody renamed.
pub const
/// One REVERSE position: a record that points at this one, under the name this record calls it by.
///
/// There is no Rust field for one, ever — no storage, no field, no lie. The declaration names a
/// SOURCE and the framework already knows how the two meet, because the source's own declaration
/// said so; what this adds is the name the position is reached under and, where the source points
/// back through several fields, which of them this position means.
/// One ARTIFACT position: a blob family derived from this record's messages, under the name this
/// record answers an address for it by.
///
/// [`Derived`]'s reverse-container sibling, and it exists on the ENTITY for a reason that is about
/// COHERENCE rather than taste. The address is a field of THIS record's wire face, so somebody's
/// expansion has to write it; a blob node's own macro writing a field into a `#[Object]` it does not
/// own is the impl-collision wall, measured. The owning expansion writes it into its own object, and
/// the wall never arises — which is only possible if the declaration that names the family is the
/// one being expanded, and that is this word.
///
/// There is no Rust field for one, as there is none for a reverse position: the record carries no
/// column holding an artifact, because the artifact is somebody else's storage and its address is
/// rendered from the key this record already has.
/// The wire field one artifact position's `data` ask mints.
///
/// # It carries a NAME and nothing else, and the absent name is the DEFAULT
///
/// `<domain-word>Data` — `thumb` → `thumbData` — in the framework's own camelCase, resolved at the
/// wire face where that rule has its one home. The alternative was resolving it in the front end and
/// storing a string, which would put a second authority on what a client sees beside
/// `emit::wire::wire_member`; the two would then be free to disagree about a word like `key_frame`.
///
/// So [`None`] is *nothing was written* rather than *nothing is known*, exactly as
/// [`Graphql::output`]'s empty rename is.
/// Which of a declaration's emitted types one is — the phrase a refusal names it by.
///
/// A vocabulary rather than a description built at the site, so the sentence a front end writes
/// about a type has one author. [`method::Owner`](crate::method::Owner) asks a neighbouring
/// question and is deliberately not this: it names the types that host METHODS, so it carries the
/// record itself — which no emission declares — and lacks the wire key, which declares none.
///
/// # It is NOT [`Copy`], and the two variants that took that away are the ones that had to
///
/// Every role above [`Election`](Self::Election) names a type a declaration has AT MOST ONE of, so
/// the variant alone identified it. A derived index mints one marker per ELECTION and one per
/// `(field × engine)` SLOT, so *a slot's marker* names as many types as the declaration has slots —
/// and a refusal that could not say WHICH would leave an author with two markers of one name and no
/// way to tell which pair minted either. The identifying tokens therefore ride the variants, which
/// costs the trait's bit-copy and buys the sentence.
/// Which CROSSING a declared error covers — one IMPL FAMILY each, reached through the words the
/// field blocks already speak.
///
/// No new vocabulary: a declaration that writes `sqlite(try_into = "…")` on a field names
/// the crossing whose refusal `sqlite(try_into(error = "…"))` types, and the correspondence
/// is the word rather than a table a reader has to hold.
///
/// # `persist` names TWO of them, and a cell rides its LEG
///
/// A row's read and its write are different impls with different callers — `TryFrom<Row> for E` and
/// `TryFrom<E> for Row` — so one cell over both would say either that they share an error or that
/// the question had not been asked. The BLOCK word is the same for the two and the LEG word is what
/// tells them apart, which is why [`as_str`](Self::as_str) is not injective and why nothing reads it
/// to identify a cell: the identity is this enum's own value.
/// ONE CELL of the record's declared conversion errors: which crossing, which database, and the type
/// its fallible impls answer with.
///
/// Two axes rather than one, and the second is what the flat shape could not express: a record's row
/// decode and its crossing onto the wire are different impls with different callers, so a
/// declaration may want them to answer differently — and every cell is independent, an absent one
/// taking the boxed refusal on its own.
/// One TYPE an emission declares, and what it is.
/// The emitted key type: `lineage ⊕ id`, flat, root-first.
/// A record's ancestry, and the name of the type that carries it.
/// The two things a lineage can BE, and therefore the two types that can be emitted for one.
///
/// The split is the topology's, not a convenience: a node with one ancestry has a PATH, and every
/// row of it carries the same columns; a node drawing from several independent upstreams has a
/// CHOICE, and which columns a row carries depends on which upstream it came from. A struct with
/// nullable columns would express the second, and would make the invalid states representable —
/// which is the whole reason the storage layout beneath it splits too.
/// One field of the RECORD, and how its own accessors are shaped.
/// The CONDITION a field is DECLARED UNDER — the `#[cfg(…)]` attributes written on it.
///
/// # The macro never learns whether the predicate holds, and that IS the mechanism
///
/// A proc macro has no API for asking whether a `cfg` predicate is satisfied, and in the REWRITE
/// mode the field never reaches the compiler at all — so nothing here evaluates anything. What the
/// seat does is CARRY the author's own tokens onto every artifact the field mints, and leave the
/// answer to the one party that has it. The family is stripped in a single pass, by the compiler,
/// or it is kept whole.
///
/// # Two kinds of artifact, and the seat serves them differently
///
/// | artifact | how the condition reaches it |
/// |---|---|
/// | an item, a struct field, a variant, a match arm, an array element | the attribute verbatim — [`gate`](Self::gate) |
/// | a POSITION among the present columns — a bind ordinal, a fence index | [`present`](Self::present), summed in a `const` the compiler folds AFTER stripping |
///
/// The second is the whole reason this type is not just a list of attributes. An expansion that
/// wrote a bind ordinal as the literal `2` would be naming a position the build no longer has the
/// moment a column before it is configured out, and a literal is exactly what an emitter reaching
/// for `enumerate()` produces. So where any column is conditional, every ordinal is written as a
/// running sum of these — `0`, `0 + p₀`, `0 + p₀ + p₁` — and the compiler folds it after it has
/// answered the predicates.
///
/// # `cfg` reaches the FAMILY and `cfg_attr` reaches ONE artifact, because they ask different things
///
/// `#[cfg]` is about EXISTENCE, and existence is what the whole family follows — a column, a filter
/// seat and a reader for a field the build removed are the disease this seat cures, so the gate has
/// to reach every one of them.
///
/// `#[cfg_attr(pred, …)]` removes nothing. It conditionally DECORATES, so it has no presence to
/// account for and nothing to strip, and repeating it across the family would put an author's
/// `serde(rename = "…")` on a method. It rides the one artifact that STANDS IN for the field: the
/// echoed field itself in an ordinary declaration, where the host already forwards it verbatim and
/// this type never sees it; the READER in a rewrite, beside the doc comments that migrate there for
/// the same reason — see [`decorations`](Self::decorations).
///
/// Where its payload is this grammar's OWN word, it is refused instead: a macro that cannot read
/// `pred` cannot know whether `#[ingraph(id)]` was written. See `ingraph_derive::attribute`.
/// What fills a SKIPPED field when a row is raised back into the record.
///
/// # `Default` is the floor, and the author may name the fill instead
///
/// A skipped column has no stored value to read, so a read supplies one. The default is
/// `Default::default()` — `E0277` at the `skip` word where the field's type has no `Default`, and
/// PER-DATABASE PRECISE, since only the raise of a database that actually skips the column asks for
/// one. `skip(default = "path::to::fn")` names the filler instead, and the spelling is serde's own
/// `default = "…"` verbatim: the path is a `fn() -> T`.
/// ONE field a database's row does not carry, and what its raise supplies instead.
///
/// The per-database half of [`Fill`]. The record-wide half needs no such pairing — a `skip`ped field
/// is reached through the record's own field list, where its type and its fill sit together — and
/// this one is stated per [`Storage`], so the field it is about has to travel with it.
/// A field's `ref(…)`: the record it names, and how the referring value is reached from the field's
/// own type.
/// WHERE the referring value sits inside the field's declared type.
///
/// A DECLARATION decides it, never the type's spelling: a collection is the field's collection
/// LABEL and an absent value is its `optional` marker, which is the same rule the whole projection
/// layer runs on — a macro sees tokens, and `type MaybeCover = Option<Uuid7>` is exactly the case
/// that proves a spelling cannot be trusted.
///
/// What the emission does with it is NOT a token operation either: [`Held`](Self::Held) is written
/// `<T as State<Extracted<Inner>>>::Output`, so an alias is as transparent one level in as it is at
/// the field, and a downstream container joins by writing that one impl.
/// One column of one emitted type.
///
/// A column is SCOPED: the same record field reaches the key type and the lineage type as two
/// separate columns, which may carry different names. That is not a quirk — the key's columns
/// become the record table's, the lineage's become the degraded table's, and two tables may name
/// their columns differently.
/// How a column is handed out by an accessor.
///
/// One marker, one projection — the variants are mutually exclusive by construction, which is why
/// this is an enum rather than a set of flags. Nothing is INFERRED: an unmarked field takes
/// [`Projection::Borrowed`], and removing a marker changes an accessor's shape as a visible source
/// change rather than silently.
/// Where a record is stored, and what each database's row holds.
///
/// The declared DATABASES are the storage selection: `persist(sqlite, postgres(…))` stores the record
/// in those two and nowhere else, and a record with no `persist(…)` block has no [`Persist`] at all.
/// Nothing is inferred from a field's type or name — a column exists because a field carried the
/// marker.
///
/// # The NAMES and the SCHEMA are BOTH emitted now, and this is what closed the gap
///
/// A record's table name reaches the expansion: [`RecordModel::table_name`] resolves a database's
/// own `table = "…"` against the record's, and `emit::query`'s binding writes the result into
/// `SqlQuery::ADDRESS` and into the scope aliases beside it. So do the COLUMN names and their
/// shapes, through `SqlQuery::COLUMNS`, and the whole read and write lane is rendered over them.
///
/// The BLUEPRINT — `ingraph`'s `Describe<Db>`, whose `Table` carries the type each column is STORED
/// AT, whether it holds `NULL`, which fields take an index, which take a UNIQUE one, and which
/// collections hang an edge table off the row — **is emitted beside them**, one per declared ∩
/// compiled-in SQL dialect. So [`PersistColumn::nullable`], [`PersistColumn::indexed`] and
/// [`PersistColumn::unique`] reach a statement, and a record's schema is its declaration's rather
/// than a second text kept beside it. `emit::query`'s roster is where the emission and its one
/// condition are.
///
/// # The two obstacles this note recorded, and what each turned out to need
///
/// **There was no type WORD to emit.** A `Table`'s `Column` carries the dialect's own spelling —
/// `INTEGER`, `int8`, `BIGINT` — and nothing derived one from a field's Rust type. sqlx's own
/// `Type<Db>::type_info()` was the nearest existing authority and did not serve: its words are
/// `INT8`/`INT4`/`FLOAT8` on PostgreSQL where `information_schema.data_type` answers
/// `bigint`/`integer`/`double precision`, and `VARCHAR` with no length on MySQL, which that dialect
/// will not create — and the drift audit compares with `eq_ignore_ascii_case` and nothing else, so
/// an emission through those names would have failed its own audit on two dialects of three. What
/// closed it is a FOURTH FACE on the type rather than a table in this crate: `ingraph`'s
/// `StoredAs<Db>`, open the way `ColumnKind` is open, whose rows are written in each catalogue's own
/// reported spelling and measured against live servers. Every derive that mints a column type mints
/// its row with it — a vocabulary enum at its stored form's word, a flags set at the width its
/// dialect holds the bits at, a newtype at its inner type's, and a `fields(record)` fragment at the
/// CONCATENATION of its parts'.
///
/// **A composite column's name could not be spelled here.** A descriptor's columns were FLAT and a
/// row's are by FIELD, so a `tb: Timebase` would have had to arrive as `tb_num` and `tb_den` — a
/// string that exists nowhere, the segments being joined at RENDER time and never in a `const`. What
/// closed it is `Table::shaped`, which takes the row's own `ColumnShape` list and leaves every name
/// to the renderer, so the join stays exactly where the law already put it and this macro never has
/// to see that a field spans two columns.
///
/// # What the emission still cannot spell, and where each lands
///
/// Neither is a gap in this model, and both are stated at the point a reader meets them:
///
/// * a collection this database keeps in a COLUMN — a PostgreSQL array — has no word, the two
/// readers of one wanting two different strings. That database gets NO blueprint; it is a
/// documented SKIP on `emit::query`'s roster, not an error, so such a record keeps every lane it
/// had. `postgres(edge)` lands the schema.
/// * a field whose TYPE has no `StoredAs<Db>` row — `TimeRanged<T>`, whose arity depends on a type
/// parameter — is `E0277` at that field, spanned there. A macro reading tokens cannot skip on a
/// fact about a type, and the trait's own `#[diagnostic::on_unimplemented]` names the
/// `<db>(type = "…")` road out.
/// One database a record is stored in — as the backend it actually is.
///
/// A VARIANT per backend rather than one struct with a `kind` discriminant, so a backend's own
/// vocabulary is structural: `MongoDatabase` has a `collection` and no `schema`, and there is no
/// way to build a mongo backend carrying one. A shape that carried both and refused the wrong
/// combination at parse time could still represent it, and something downstream would eventually
/// have to ask.
///
/// A `Vec` of these on [`Persist`] rather than an `Option` per backend, because DECLARATION ORDER is
/// load-bearing: the rows emit in the order the author wrote them, so an expansion is stable and
/// diffable. Four `Option` fields would impose an arbitrary fixed order instead. The cost is that
/// a `Vec` can hold `Sqlite` twice where four `Option`s could not — so "one block per database"
/// moves from structural to CHECKED, and the parser's `set_once` on the block is now the only thing
/// between the model and a state it can represent. `refuses_a_repeated_persist_block_or_option` pins
/// that refusal, and a mutation proves the pin.
///
/// **Three of these four payloads are near-identical today**, and that is measured rather than
/// assumed: `table`/`collection` is one slot with two spellings, `schema` is the only SQL-only
/// option, and the FIELD-level option set (`rename`, `type`, `indexed`, `unique`, `copy`, the
/// conversions) diverges not at all. So `SqliteDatabase`, `PostgresDatabase` and `MySqlDatabase`
/// start as the same three fields.
///
/// They are separate anyway, and deliberately: the divergence that is coming is per BACKEND rather
/// than per family — MySQL's engine and charset, Postgres's index methods and tablespace, SQLite's
/// journal mode, Mongo's write concern. Splitting a shared `SqlDatabase` later would touch every
/// emission site that named it, where four small structs localise each arrival to one variant. The
/// duplication is four fields, which is cheap; the later split would not be. If that divergence
/// never arrives, this is the decision to reverse, and the measurement above is what to reverse it
/// against.
///
/// CLOSED, and not an oversight in a framework that otherwise refuses closed sets: codegen has to
/// KNOW a backend to emit its code — its derives, its rename attribute, its dialect — so a
/// third-party backend is a change to this crate whichever shape this takes. Openness for backends
/// lives where the spec puts it: traits, visitors, and a codegen plugin. `#[non_exhaustive]` so
/// adding the next variant is not a breaking change for anyone matching from outside.
/// What every backend carries, whatever its own vocabulary adds.
///
/// One struct embedded in each backend rather than six fields repeated four times — the emission
/// reads these and nothing else for most of its work, and a field that meant something different
/// per backend would not be here.
/// `<db>(alias(prefix = "__mine", depth = 16))` — one database's answer about the names its
/// nested scopes mint, in the two states each half has.
///
/// # Per DATABASE, because the emitted table already is
///
/// `ALIASES` rides one `SqlQuery<Db>` impl, so a record stored in two databases already carries two
/// of them; letting the two differ cost nothing that was not already there. And the user story is
/// per database too: one deployment's schema holds legacy tables inside the default namespace and
/// the others do not, so the override belongs on that database and nowhere else.
///
/// # DECLARED-or-not is kept, and the FENCE is what needs it
///
/// [`prefix_in`](Self::prefix_in) resolves to the MODEL's own
/// [`EmissionPrefix`](crate::prefix::EmissionPrefix) where nothing was written, which is what the
/// emission spends. What the fence needs is the other question — whether anything was written at
/// all — because it refuses the union of every DECLARED prefix plus the default wherever a database
/// still defaults. A record that overrode every one of its databases has handed `__ig*` back to its
/// author, and a model that had already collapsed the absent case into the default could not tell.
///
/// # The fallback is the MODEL's namespace and not this crate's constant
///
/// Two seats, one answer: `<db>(alias(prefix = …))` is what a DECLARATION moves, and
/// [`RecordModel::prefix`] is what a FRAMEWORK building the model moves. The declaration's word
/// wins where it is written, and where it is not the answer is the framework's own mark — so a
/// model `mediagraph-codegen` built defaults to `__mg` here, rather than to `ingraph`'s `__ig`
/// through a constant that has never heard of it.
/// SQLite's own options.
/// PostgreSQL's own options.
/// MySQL's own options.
/// MongoDB's own options.
///
/// A `collection` and no `schema`, which is the whole point of splitting the type: mongo's
/// vocabulary is not SQL's, and now it cannot be given SQL's.
/// ONE `<db>(unique(a, b, …))` — a COMPOSITE unique constraint, resolved to this database's own
/// column names.
///
/// # It is SQL's and it is per DATABASE, which is why it is not on [`Storage`]
///
/// `Storage` is what every backend carries. A composite unique is not: this crate's mongo emission
/// renders a collection and builds no index, so the word is refused there BY NAME rather than
/// carried and dropped — see `composite_unique` in `ingraph-derive`. Holding the list on the three
/// SQL structs is the same split [`MongoDatabase`] already makes for `schema`: mongo's vocabulary is
/// not SQL's, and now it cannot be given SQL's.
///
/// # The entries are COLUMN names, and the audit is already spent
///
/// What the declaration wrote are FIELD idents. By the time one is here it has been held against
/// this database's own column list — every entry names a field this record declares, this database
/// carries, and stores in a column of the row — so the emission reads this list and asks nothing.
/// A `rename` is already applied, because it is the emitted name that reaches a `CREATE UNIQUE
/// INDEX` and a check on the Rust name would walk straight past one.
/// One column of ONE database's row.
///
/// Per database rather than shared, because nearly everything about a column can differ between
/// backends: the same field may be a `BeU64` on one and a `Vec<u8>` on another, be called
/// `bit_rate` in one table and `bit_rate_v2` in the next, and be indexed in one alone.
/// How one side of a conversion is performed.
///
/// THREE states rather than a path beside a `fallible` flag, so `from`-xor-`try_from` cannot be
/// represented at all: a declaration that wrote both has no model to land in, and the refusal is a
/// parse-time report rather than a rule some later pass has to remember to check.
///
/// # The verb rule
///
/// **`from` BUILDS this projection; `into` LEAVES it.** Relative to the projection the block is
/// about, never to the domain — one rule across every family, rather than one convention per
/// family:
///
/// | declaration | direction | when |
/// |---|---|---|
/// | `<db>(from \| try_from)` | domain → row | a write |
/// | `<db>(into \| try_into)` | row → domain | a read |
/// | `graphql(input(into \| try_into))` | input → domain | |
/// | `graphql(output(from \| try_from))` | domain → output | |
///
/// It matches the emitted impls literally: `impl From<VideoTrack> for VideoTrackPostgres` IS "the
/// row from the domain", so the declaration that fills it is the row's `from`.
/// A crossing that can FAIL, and how its error reaches the record's own.
///
/// # The escape, and why the default is not one
///
/// A fallible leg is emitted as `f(value)?`, and the `?` is what asks the record's error to absorb
/// whatever `f` reports — `From`, which `core`'s own blanket already supplies for the boxed default.
/// Where that `From` cannot exist the `?` is `E0277` naming the offending function's error, which is
/// a better sentence than any wrapper this emitter could write, and it is the compiler's.
///
/// [`escape`](Self::escape) is the way out for the cases where the bound genuinely cannot hold: two
/// FOREIGN types either side of the impl (the orphan rule, which the comparison layer's own crossing
/// already documents), an error a caller wants to WRAP with context rather than absorb, and a
/// function whose error is not an `Error` at all. It is `fn(FnErr) -> RecordErr`, applied at the
/// crossing, so a signature that does not line up is `E0308` at the call.
/// A database a record may be stored in.
///
/// A CLOSED vocabulary, and deliberately so: this is the framework's own list of backends, and
/// each one's row carries a different derive, a different rename attribute and a different
/// dialect. An open seam belongs where a user extends the framework; a database the framework does
/// not ship an emitter for has nothing to be opened.
/// The record's PROGRESS ledger: which databases host it.
///
/// A ledger is a pair of control tables in the unit's OWN `persist` pool — `SqliteProgress::new` takes
/// that pool — so its hosts are the declared `persist` databases, and a record with no `persist(…)`
/// has no pool to live in. Nothing else has to be declared for one to exist: what it certifies is the
/// unit's close, which every stored record has. Derived from the storage alone, therefore, and never
/// asked for.
///
/// Its hosts are the `persist` databases that SHIP a ledger, which may be fewer than [`Persist::backends`]
/// and, for a record stored only in MySQL or MongoDB, none — leaving no [`Progress`] at all. A
/// SHORTER list rather than a refusal, because nothing here was asked for: a ledger is bookkeeping the
/// framework adds wherever a pool can hold it, so a database with no backend for one leaves out
/// nothing anybody declared.
///
/// It carries no root declaration. The ledger is keyed by the WORK's root, the `root` column's DDL
/// type is `<Root as Typed>::COLUMN`, and the root is the key's FIRST column — its leading lineage
/// step, or the id itself for a root record. Derived, therefore, and a declared one could only
/// disagree with the key it is minted for.
/// One database hosting a record's progress ledger.
///
/// TWO variants where [`DatabaseBackend`] has four, and that is a measurement rather than an
/// oversight: `store/progress/` contains `sqlite/` and `postgres/`, and there is no MySQL or MongoDB
/// ledger. What the missing two make unrepresentable is a ledger in a database that ships none. When a
/// third backend arrives, a variant lands here and [`of`](Self::of) gains an arm; nothing else moves.
/// SQLite's own ledger options — none yet. The control tables' names come from the store's
/// `ControlTables` at construction, and the `root` column's type from the root itself.
/// PostgreSQL's own ledger options — none yet, for [`SqliteProgress`]'s reason.
/// The record's WIRE face: which GraphQL backends render it, and what each one calls it.
///
/// Only the OUTPUT's members need a per-field declaration. The tree fixes the rest — the key object
/// is a mechanical projection of the key's columns, the filter of the stored ones, and the ARGUMENT
/// object mirrors the engine's own find surface — so this carries the four names and the exposed
/// fields, and nothing else.
/// One GraphQL backend's rendering of a record.
///
/// One variant today, and that is the extension point rather than a premature abstraction: the
/// shape is what keeps a second backend from being a redesign. CLOSED and `#[non_exhaustive]` for
/// the reasons [`DatabaseBackend`] gives — codegen must know a backend to emit its derives, so a
/// third-party one is a change to this crate whichever shape this takes.
/// The `async-graphql` backend's rendering.
/// One field of the wire face, in both of its schema positions.
/// ONE POSITION of a field's wire crossing: a leg per database, and the error a fallible one
/// answers with.
///
/// # The legs are PER DATABASE, where the wire form is not
///
/// A crossing has a row on one side of it, and a row is one database's. `output(sqlite(try_from =
/// "…"))` is handed what SQLite stores and answers with the wire form; the Postgres leg beside it is
/// handed what Postgres stores. What both answer WITH is the one type
/// [`GraphqlField::wire`](GraphqlField::wire) names, which is what keeps the schema from varying
/// with a deployment.
///
/// A database with NO leg takes the DEFAULT CHAIN — the column's own `persist` crossing composed
/// with the domain's wire face — so a declaration writes a leg exactly where the default is not what
/// it means.
/// ONE database's leg of a wire crossing.
/// Which INTERPRETATION a field's type is read under, when a declaration names one.
///
/// The inference it overrides answers per (type, position), never per field: two `Vec<String>`
/// columns in one crate read alike, because the row that decides a `Vec`'s reading is keyed on the
/// ELEMENT type. A column whose reading must differ from its neighbour's names it here instead.
///
/// What a marker reaches is the FILTER and nothing below it. It says what may be ASKED of a column
/// — whether `[1, 2]` and `[2, 1]` are one operand or two — and decides nothing about what a table
/// holds; the crossing from a filter into one database's comparison is a separate map, and it is
/// where storage enters.
/// The payload of [`Marker::Framework`]: one of the framework's own markers, written as the bare
/// word it is short for, and — where the word names a COLLECTION — the element's own word inside
/// it.
///
/// `FrameworkMarker` rather than the variant's own name, which would read as a framework rather
/// than as a marker. Fields are `pub` and constructed by literal, which is what every model type in
/// this crate carries — and `ingraph-derive` builds one of these from a parsed label, so a
/// crate-private constructor would not reach.
/// An interpretation the FRAMEWORK names — the words a declaration may write bare.
///
/// The vocabulary law in one type: what a declaration WRITES is a label, what it RESOLVES to is a
/// marker. So the words are here and the type-level artifacts they reach — `ScalarMarker`, the
/// `*FilterMarker` family traits, `DefaultMarker` — keep the other name, because nobody writes
/// them.
///
/// A CLOSED vocabulary, for the reason [`DatabaseKind`]'s is closed: these are the markers this
/// framework ships a word for, and one it does not is reached by [`Marker::Path`] rather than by a
/// word this list would have to grow. Nothing about the surface is closed by closing this.
///
/// # A word earns its place by DISAGREEING with the inference
///
/// The list carried the two COLLECTION words alone, and the argument for stopping there was that a
/// value reading is at most one per type: if a `String` could only ever be text, `string` on one
/// would be a second spelling of the default and no declaration could need it.
///
/// The marker layer is where that premise broke. A value reading is one trait per FAMILY —
/// `ScalarFilterMarker`, `StringFilterMarker`, `BytesFilterMarker` and their siblings — so a type
/// may answer several and mean all of them. `Vec<u8>` is a byte string and a list of small integers;
/// a downstream identifier can answer the string family and the enumeration one both. The INFERENCE
/// picks one, because a `DefaultMarker` row names one; a word is how a column picks another, which
/// is a declaration no other short form reaches.
///
/// So the rule stands and its answer changed: six value families and three collection positions.
///
/// The third collection word is the one that earns its place against a COLLECTION default rather
/// than against a value one. A `Vec<Tag>` infers `list`, and `quantified` is how a column says its
/// element has no literal form worth publishing — a different question from *is this ordered*, and
/// one no other short form reaches.
///
/// # What still has no word
///
/// `value` has none, and that absence IS the rule still holding — it would name whatever the type's
/// own row says, which is what omitting the option already means.
///
/// `nullable` has none for the same reason one level out: an `Option<T>` column infers whatever
/// `T`'s own reading says an `Option` of it is — the null test for a value family, the collection
/// itself for a collection one — from one blanket that reaches every `T`, so the word could only ever
/// restate the default. A column that wants the INNER reading changed says so with the inner word,
/// and the outer reading follows it.
///
/// That blanket is where a COLLECTION-classified column would land too, if the word did not route
/// around it first — see [`Label::collection`]. The two agree on the answer and differ in what
/// they can SEE: a word is tokens, and the blanket is types.
///
/// `map` has none because the framework ships no map filter for one to name.
/// One SCHEMA POSITION of one field: what it is CALLED there, and what rides on it verbatim.
///
/// The TYPE is not here and no longer can be. A position's type used to be its own, and it made two
/// things spellable that must not be: an input form differing from the output form, which is a
/// schema a client has to read twice, and — through the per-position conversions that went with it —
/// a wire form reached from the DOMAIN rather than from the row a deployment actually stores. Both
/// live on [`GraphqlField`] now, the form once and the crossings per database.
/// A GraphQL backend a record may be rendered by.
///
/// One variant today, and the vocabulary exists anyway: a closed framework-owned list, the same
/// shape [`DatabaseKind`] takes, so a second backend is an arm rather than a redesign.
/// What a record's wire output is called. ONE per record — the SDL is identical whichever Rust
/// library serves it, so the type carries cfg-gated derives per declared backend rather than
/// splitting into one type per backend.
///
/// `<Record>GraphqlOutput` rather than `<Record>Output`, because this type is now BOTH of what the
/// two names used to stand for: the object a client receives AND the half of the wire face
/// `Graphql::Output` binds. The carrier that held the second job was a `struct …(())` with the
/// members named on it and nothing in it; it has the members now, so a second name for one type
/// would be the only thing left to keep.
/// What a record's wire INPUT is called: `<Record>GraphqlInput`, the object a query's arguments
/// arrive in.
///
/// No rename knob, where the output has one — the grammar's `graphql(output(rename = "…"))` has no
/// twin here and is not being given one on demand. What a collision gets instead is the emitted-type
/// rule's refusal, naming this type and the one already in the scope.
/// What a SUBSCRIBING derived index's node is called: `<Decl>Indexer`, the launchable unit that
/// receives the upstream's messages and fills this declaration's corpora.
///
/// # It is a SECOND TYPE, and the alternative was refused rather than overlooked
///
/// Every other node macro makes the declaration ITSELF the unit — `impl Declared for Scene` beside
/// `impl Operator for Scene` — and a derived index cannot follow it. A node's resource demands are
/// `Shared<R>` FIELDS on the value its constructor builds, and this declaration's value is a
/// DOCUMENT: one per upstream message, built by `new`, handed to an engine and put on an edge.
/// Giving it store handles would put a mount inside every document that crosses a wire.
///
/// So the document stays what it is and the node is minted beside it. That also keeps the two roads
/// separable in the DEPLOYMENT: a root that mounts `MediaIndexer` runs the subscriber, and a root
/// that mounts `#[ingraph(fuse)] media: Media` alone gets the hand road, byte for byte as before.
/// What a record's key output is called. ONE per record — see [`default_output_name`].
/// What a COMPOUND record's key argument object is called IN RUST: `<Record>KeyInput`, the address a
/// client sends when the whole address is more than an id.
///
/// No rename knob, [`default_input_name`]'s reason unchanged: a rename word moves a FACE and this is
/// the Rust name, which no word moves.
///
/// The PUBLISHED name is not this one and is not derived here. GraphQL puts input and output types
/// in ONE namespace, and the output half publishes `<Record>Key` — the shorter word, because reading
/// an address is the commoner act — so the sending half has to differ by something, and it differs
/// by the `Input` suffix composed off the SAME base the output published. `emit::wire`'s
/// `published_key` is where that composition lives, and where the ruling that it is the one blessed
/// derivation is written down: `key(rename = "Address")` gives `Address` and `AddressInput`, and an
/// unrenamed record's two names are exactly what they always were.
/// What a record's filter is called. ONE per record — see [`Graphql::filter`].
///
/// At the FRAGMENT tier this is the FULL face's name — every field the declaration holds — and
/// [`default_column_filter_name`] is its twin.
/// What the STORED face of a fragment's predicate is called: `<base>ColumnFilter`.
///
/// # A second name because there are two truths, not because there are two spellings
///
/// *Each face tells its own truth* — the 2026-08-22 ruling. A fragment held by a record can be
/// compared only by the columns it is stored in, a `record(skip)`ped field's query-time value being
/// a raise's fill rather than anything a row carries; held by an entity it is compared by every
/// field it declares. A declaration activated for ONE kind emits one type and this composition is
/// the name it wears where that kind is the record; activated for both, it emits two and the names
/// part here.
///
/// `Column` is the marker word, ruled 2026-08-22 out of the family's own register — `stored_columns`,
/// the *存了才能发* law. It composes onto the same base [`default_filter_name`] does, so a base a
/// word moves carries both faces with it and neither can come to wear a stem the other has left.
/// What a record's order-by is called. ONE per record — see [`Graphql::filter`].
/// What a record's QUERY UNIT is called: `<Record>Queries`, the type a root folds to serve this
/// record's root fields.
///
/// PLURAL, because the type is the trio rather than one query — and unprefixed, like every other
/// emitted wire type, because it is visible vocabulary an application mounts. No rename word, for
/// [`default_input_name`]'s reason: what a collision gets is the emitted-type rule's refusal naming
/// both.
/// What one database's comparison type is called: the row's name, suffixed.
///
/// Named after the ROW because that is what it compares against, and per database because its
/// values are STORAGE-typed — the whole point of the layer.
/// What a record's row type is called in one database when nothing renamed it:
/// `<Record><Suffix>`.
/// What a record's key type is called when nothing renamed it: `<Record>Key`.
/// What a record's lineage type is called when nothing renamed it: `<Record>Lineage`.
/// What a node's FAN-IN sum is called: `<Node>In`.
///
/// No rename word, and its absence is the same ruling every emitted name here started from: a word
/// arrives when a declaration needs it. What a reader spells is the node's own name plus the
/// contract member it fills, which is what makes `type In = <Node>In` read as the tautology it is.
/// What a node's CHANNELS SHELF is called: `<Node>Channels`.
///
/// The fourth of the emitted per-node names beside `<Node>In`, `<Node>Out` and `<Node>Due`, and the
/// one a DEPLOYMENT names rather than a body: it is the type a `[node.channels]` block parses into,
/// mounted on the node's section beside its options.
/// What a node's PRODUCT sum is called: `<Node>Out`.
/// What a node's product VOCABULARY is called: `<Node>OutKind`.
///
/// The one emitted name a DOWNSTREAM declaration spells: `out = "Boxes"` becomes
/// `<upstream::Detector as Emits<{ upstream::DetectorOutKind::Boxes as usize }>>::Out`, built by
/// swapping the upstream path's last segment for this. That makes the convention load-bearing
/// across the two-derive wall, which is why it lives here — one function, and both sides of the
/// wall read it.
/// What a node's own DOWNSTREAM is called: `<Node>Downstream`.
///
/// The set of out-edges a node publishes into, one slot per declared product.
/// What a node's POLL vocabulary is called: `<Node>Due`.
///
/// The third of the rename-proof identity types, beside `<Node>In` and `<Node>Out`: a tick arrives
/// carrying a POSITION, and this is the word that position means. An author matches on the name
/// they minted, so reordering the entries moves the positions and changes no body.
/// What ONE CLOCK's grants context is called: `<Node><Poll>Grants`.
///
/// What a tick FROM THAT CLOCK is lent — one write socket per grant that entry wrote, and nothing
/// else, which is the whole of 路 A: a tick reaching for a store a SIBLING clock was granted is an
/// unsatisfied bound rather than a permission refused at run time.
///
/// The poll's own word is in the middle, and that is not decoration — it is what makes the refusal
/// self-explaining. `rustc` names the type in the `E0277` sentence and lists the impls that DO
/// exist beside the one that does not, so a sweep reaching past its clock reads
/// *`ReaperHourlyGrants<…>: AsyncLands<Transcript>` is not satisfied* with `ReaperNightlyGrants<…>`
/// named among the types that satisfy it. The clock holding the grant is in the sentence because it
/// is in the name.
///
/// The poll word arrives already in UPPER CAMEL — it is [`PollEntry::variant`], the same spelling
/// the `<Node>Due` arm takes — so a clock is spelled one way wherever it is spelled.
/// What a node's LENDING is called: `<Node>Polling`.
///
/// The value a DEPLOYMENT builds and hands to `Resident::polling` — one field per granting clock,
/// each holding that clock's own context, beside the citizen each mounted clock ticks and the
/// executor each detached one runs on. Only the runtime ever looks inside it.
///
/// It is named for the SEAM rather than for the permission, and that is the whole of the rename: the
/// value is what a node's POLLING needs, of which grants are one part — `Resident::polling(op,
/// ExporterPolling::new(…))` reads as its own sentence, where `ExporterGrants` claimed a word that
/// belongs to the per-clock contexts. Those keep it ([`poll_grants_name`]), because they hold
/// exactly grants and nothing else.
///
/// It is the fifth emitted per-node name beside `<Node>In`, `<Node>Out`, `<Node>Due` and
/// `<Node>Channels`, and it is named for the WORD rather than for the borrow: `Context` is spoken
/// for twice over in the framework (the resource map, and the emission buffer that gave the name
/// back).
/// What a node's SWEEP TRAIT is called: `<Node>Sweeps`.
///
/// Where an author writes a sweep, one ENTRY per `light` CLOCK, named by the word that clock
/// minted — a clock that wrote `handler = "…"` has no entry, because its body is a citizen the
/// deployment built. A node whose every clock mounted one emits no trait at all.
///
/// It carries ONE `Info` and ONE `Error` for the whole node, which is not a convenience — the
/// resident has one observation stream and one `Effect` table, so two clocks answering in two types
/// is a thing that cannot be true, and here it is a thing that cannot be WRITTEN (`E0201`, duplicate
/// definition). An INLINE mounted citizen is bound to the same pair on the route, so the law reaches
/// across the split.
///
/// The framework word one scope down, as `<Node>Due` and `<Node>Channels` are.
/// The item a storage node mints so that a second storage on the same type cannot be spelled.
///
/// Two macro expansions cannot see one another, so `#[ingraph::fulltext(…)]` beside
/// `#[ingraph::vector(…)]` is not detectable by either of them. What IS detectable is the
/// collision the two expansions make: each mints this name in the declaring scope, and two of them
/// are `E0428` — *the name `__ig_<Record>_holds_one_storage` is defined multiple times* — reported
/// at the offending type, with rustc's own note naming the second macro. The invariant is enforced
/// by construction rather than documented beside the code.
///
/// It carries the RECORD's name because the scope is the declarer's: two storage nodes in one
/// module are an ordinary program, and a marker that named only the framework would refuse it.
///
/// A `const` and not a unit struct, which would occupy the type namespace as well for no gain, and
/// PRIVATE, so a marker never joins the declaring crate's public API. Both of those and the
/// namespace mark are why the emission spends three `allow`s on it: it is dead by construction,
/// its name is neither upper case nor camel case, and nothing may make a declaration fail its own
/// `-D warnings` build over an item its author did not write.
///
/// It is PREFIXED rather than framed: the frame is the column law, and this is an item. It also
/// takes the model's own [`EmissionPrefix`], which is what makes two FRAMEWORKS' storage nodes on
/// one type an ordinary program — `__ig_Clip_holds_one_storage` and `__mg_Clip_holds_one_storage` are
/// two names, so the refusal stays what it is for, a SECOND storage under ONE framework.
/// What ONE ELECTION's marker type is called: `<Record>By<Field>`.
///
/// The name is the TYPE spelling of the method name beside it — `retrieve_by_image_embedding` and
/// `SegmentPairByImageEmbedding` are one election read two ways, so a reader who has found either has
/// found the other, and a declaration's elections and its per-election methods cannot drift apart in
/// spelling.
///
/// It carries the RECORD's name for [`one_storage_marker`]'s reason, which is the naming law every
/// item this family mints in the declarer's scope is under: the scope belongs to the author, two
/// declarations electing a field of the same name are an ordinary program, and a marker named after
/// the field alone would make the second one `E0428`.
///
/// A UNIT STRUCT and not a `const`, which is the one place it parts from the storage marker: this
/// name is spelled by the wiring — `SlotLane<E, T, SegmentPairByImageEmbedding>` — so the type namespace is
/// exactly where it is needed, and it takes the declaration's own visibility for the same reason the
/// retrieve methods do.
/// The FIELD a derived index carries its upstream's key in — the one field a macro in this family
/// adds to a declaration its author wrote.
///
/// *The key is not its to mint.* A derived index has no `id`, so `Identifiable::id_ref` and
/// `Transformer::key` have nothing in the declaration to answer from; this field is what they answer
/// from, and its TYPE is a projection — `<Upstream as Transformer>::Key` — so the upstream's own
/// declaration decides it and re-keying the upstream re-keys every index over it.
///
/// It is why the family is attribute macros. A derive is handed a copy and may only append, so a
/// field that is not in the source cannot exist; an attribute macro emits the item in the source's
/// place, and this is the field it puts there.
///
/// # THE FRAME LAW
///
/// Every name the framework mints into a declaration's own namespace wears `__ig` at the front, and
/// a FIELD wears `__` at both ends as well — which is what makes the injection safe rather than
/// merely conventional. `ingraph-derive`'s fence refuses a declared column inside either namespace,
/// so a user field called `__ig_key__` is refused at the declaration and can never be the field this
/// one collides with.
///
/// The tail of such a word must not look like `_<digits>__`. Where a mint is INDEXED the digits fuse
/// into the word — `__ig_ord0__`, never `__ig_ord_0__` — so that the index cannot be read as a
/// separate segment and two schemes cannot produce one name. Nothing minted today is indexed;
/// `upstream(…)`'s second entry is what will be, one source per key variant, and the law is stated
/// here because here is where a reader of the first mint will look for it.
///
/// The frame is [`EmissionPrefix::framed_ident`]'s, so the mark is the MODEL's rather than this
/// crate's: a declaration a domain framework expanded carries that framework's injected key, fenced
/// by that framework's own derive, and the law above holds unchanged one namespace over.
/// The field a FAN-IN node carries its lineage in — [`borrowed_key`]'s sibling, obeying the same
/// frame law and injected the same way.
///
/// A node drawing from several independent upstreams cannot DECLARE its ancestry as columns: which
/// columns a row has depends on which upstream it came from, and a struct with nullable columns
/// would make the invalid combinations representable. So the whole ancestry is one value of the
/// emitted choice, and the expansion puts the field there — the same reason `__ig_key__` exists one
/// tier over, arriving at a node that DOES mint an id.
///
/// It does not contradict *indexes inject, records declare*. That boundary is about a lineage a
/// declaration COULD spell: a fusing node's mirror columns are query surface and its declaration
/// names them. Here there is nothing to name — a variant is not a column — so the injection is the
/// only spelling there is.
///
/// It takes the model's [`EmissionPrefix`] for [`borrowed_key`]'s reason, and the two are the
/// whole of what a framework injects into a declaration's own struct.
/// The column that field becomes IN THE KEY.
///
/// A plain word rather than the framework's fenced one, because a key's columns are read by name
/// wherever an address is spelled and `__ig_lineage___ref` is not a name anyone should have to
/// type. A record declaring its own `lineage` field collides with it in the key type, which the
/// same-name rule already refuses, by name.