UnQL

Check-in [66e597b565]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add an optional AS clause on the result set of a SELECT in the bubble diagrams.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 66e597b565355ebe3c9c1197ea41c922097801f9
User & Date: drh 2011-07-21 19:56:25
Context
2011-07-22
19:12
Add support for UNION, EXCEPT, INTERSECT. Doesn't work properly with ORDER BY yet. check-in: 2d74ebd10f user: dan tags: trunk
2011-07-21
19:56
Add an optional AS clause on the result set of a SELECT in the bubble diagrams. check-in: 66e597b565 user: drh tags: trunk
18:59
Add support for DISTINCT. check-in: 4e6e4ec201 user: dan tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to doc/syntax/bubble-generator-data.tcl.

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
       {loop {line select-core nil} {nil compound-operator nil}}
       {optx ORDER BY {loop expr ,}}
       {optx LIMIT expr {optx OFFSET expr}}
  }

  select-core {
     stack
       {line SELECT {opt DISTINCT} {opt expr}} 
       {optx FROM {loop { line data-source {opt AS /name} } ,}}
       {optx WHERE expr}
       {optx GROUP BY {loop expr ,} {optx HAVING expr}}
        
  }

  data-source {







|







32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
       {loop {line select-core nil} {nil compound-operator nil}}
       {optx ORDER BY {loop expr ,}}
       {optx LIMIT expr {optx OFFSET expr}}
  }

  select-core {
     stack
       {line SELECT {opt DISTINCT} {opt expr} {opt {line AS /name}}} 
       {optx FROM {loop { line data-source {opt AS /name} } ,}}
       {optx WHERE expr}
       {optx GROUP BY {loop expr ,} {optx HAVING expr}}
        
  }

  data-source {

Changes to doc/syntax/select-core.gif.

cannot compute difference between binary files

Changes to doc/syntax/select-core.ps.

1
2
3
4
5
6
7
8
9
10
11
12
...
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
...
746
747
748
749
750
751
752











































































































































































































































































753
754
755
756
757
758
759
....
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
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Tk Canvas Widget
%%For: 
%%Title: Window .c
%%BoundingBox: 102 266 511 527
%%Pages: 1
%%DocumentData: Clean7Bit
%%Orientation: Portrait
%%DocumentNeededResources: font Helvetica
%%+ font Helvetica-Bold
%%EndComments

................................................................................
%%IncludeResource: font Helvetica-Bold
%%EndSetup

%%Page: 1 1
save
306.0 396.0 translate
0.7273 0.7273 scale
-280 -178 translate
0 357 moveto 561 357 lineto 561 0 lineto 0 0 lineto closepath clip newpath
gsave
matrix currentmatrix
6 340 translate 3 3 scale 1 0 moveto 0 0 1 0 360 arc
setmatrix
0 setlinejoin 2 setlinecap
2 setlinewidth
[] 0 setdash
................................................................................
325 340 moveto
314.999 344.001 lineto
316.499124968758 341 lineto
316.499124968758 339 lineto
314.999 335.999 lineto
325 340 lineto
fill











































































































































































































































































grestore
gsave
/Helvetica-Bold findfont 15 scalefont ISOEncode setfont
0.000 0.000 0.000 setrgbcolor AdjustColor
101 251 [
[(FROM)]
] 21 -0.5 0.5 0 false DrawText
................................................................................
150.499124968758 252 lineto
150.499124968758 250 lineto
148.999 246.999 lineto
159 251 lineto
fill
grestore
gsave
422 340 moveto
440 340 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
matrix currentmatrix
440 331 translate 8.99999999999997 9 scale
0 0 1 0 90 arc
setmatrix
0 setlinecap
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
449 331 moveto
449 318.500250062484 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
449 313 moveto
453.001 323.001 lineto
450 321.500875031242 lineto
448 321.500875031242 lineto
444.999 323.001 lineto
449 313 lineto
fill
grestore
gsave
449 313 moveto
449 294 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
matrix currentmatrix
440 294 translate 8.99999999999997 9 scale
0 0 1 -90 0 arc
setmatrix
0 setlinecap
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
440 285 moveto
247.500250062484 285 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
242 285 moveto
252.001 280.999 lineto
250.500875031242 284 lineto
250.500875031242 286 lineto
252.001 289.001 lineto
242 285 lineto
fill
grestore
gsave
242 285 moveto
44 285 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke




|







 







|
|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
|









|









|
|






|
|
|
|
|
|



|
|









|









|
|






|
|
|
|
|
|



|







1
2
3
4
5
6
7
8
9
10
11
12
...
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
...
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
....
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
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: Tk Canvas Widget
%%For: 
%%Title: Window .c
%%BoundingBox: 64 266 549 527
%%Pages: 1
%%DocumentData: Clean7Bit
%%Orientation: Portrait
%%DocumentNeededResources: font Helvetica
%%+ font Helvetica-Bold
%%EndComments

................................................................................
%%IncludeResource: font Helvetica-Bold
%%EndSetup

%%Page: 1 1
save
306.0 396.0 translate
0.7273 0.7273 scale
-332 -178 translate
0 357 moveto 665 357 lineto 665 0 lineto 0 0 lineto closepath clip newpath
gsave
matrix currentmatrix
6 340 translate 3 3 scale 1 0 moveto 0 0 1 0 360 arc
setmatrix
0 setlinejoin 2 setlinecap
2 setlinewidth
[] 0 setdash
................................................................................
325 340 moveto
314.999 344.001 lineto
316.499124968758 341 lineto
316.499124968758 339 lineto
314.999 335.999 lineto
325 340 lineto
fill
grestore
gsave
531 340 moveto
532 340 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
/Helvetica-Bold findfont 15 scalefont ISOEncode setfont
0.000 0.000 0.000 setrgbcolor AdjustColor
491 318 [
[(AS)]
] 21 -0.5 0.5 0 false DrawText
grestore
gsave
matrix currentmatrix
480 318.5 translate 12 11.5 scale
0 0 1 90 270 arc
setmatrix
0 setlinecap
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
matrix currentmatrix
503 318.5 translate 12 11.5 scale
0 0 1 270 450 arc
setmatrix
0 setlinecap
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
480 330 moveto
503 330 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
480 307 moveto
503 307 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
/Helvetica findfont 15 scalefont ISOEncode setfont
0.000 0.000 0.000 setrgbcolor AdjustColor
567 318 [
[(name)]
] 20 -0.5 0.5 0 false DrawText
grestore
gsave
matrix currentmatrix
546 319 translate 11 11 scale
0 0 1 90 270 arc
setmatrix
0 setlinecap
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
matrix currentmatrix
589 319 translate 11 11 scale
0 0 1 270 450 arc
setmatrix
0 setlinecap
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
546 330 moveto
589 330 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
546 308 moveto
589 308 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
516 318 moveto
528.499749937516 318 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
534 318 moveto
523.999 322.001 lineto
525.499124968758 319 lineto
525.499124968758 317 lineto
523.999 313.999 lineto
534 318 lineto
fill
grestore
gsave
439 340 moveto
525.499749937516 340 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
531 340 moveto
520.999 344.001 lineto
522.499124968758 341 lineto
522.499124968758 339 lineto
520.999 335.999 lineto
531 340 lineto
fill
grestore
gsave
532 340 moveto
632 340 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
matrix currentmatrix
439 331 translate 9 9 scale
0 0 1 0 90 arc
setmatrix
0 setlinecap
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
457 318 moveto
461.499749937516 318 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
467 318 moveto
456.999 322.001 lineto
458.499124968758 319 lineto
458.499124968758 317 lineto
456.999 313.999 lineto
467 318 lineto
fill
grestore
gsave
602 318 moveto
607.499749937516 318 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
613 318 moveto
602.999 322.001 lineto
604.499124968758 319 lineto
604.499124968758 317 lineto
602.999 313.999 lineto
613 318 lineto
fill
grestore
gsave
matrix currentmatrix
457 327 translate 9 9 scale
0 0 1 180 270 arc
setmatrix
0 setlinecap
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
matrix currentmatrix
613 327 translate 9 9 scale
0 0 1 270 360 arc
setmatrix
0 setlinecap
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
matrix currentmatrix
631 331 translate 9 9 scale
0 0 1 90 180 arc
setmatrix
0 setlinecap
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
448 327 moveto
448 331 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
622 327 moveto
622 331 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
421 340 moveto
433.499749937516 340 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
439 340 moveto
428.999 344.001 lineto
430.499124968758 341 lineto
430.499124968758 339 lineto
428.999 335.999 lineto
439 340 lineto
fill
grestore
gsave
/Helvetica-Bold findfont 15 scalefont ISOEncode setfont
0.000 0.000 0.000 setrgbcolor AdjustColor
101 251 [
[(FROM)]
] 21 -0.5 0.5 0 false DrawText
................................................................................
150.499124968758 252 lineto
150.499124968758 250 lineto
148.999 246.999 lineto
159 251 lineto
fill
grestore
gsave
631 340 moveto
649 340 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
matrix currentmatrix
649 331 translate 9 9 scale
0 0 1 0 90 arc
setmatrix
0 setlinecap
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
658 331 moveto
658 318.500250062484 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
658 313 moveto
662.001 323.001 lineto
659 321.500875031242 lineto
657 321.500875031242 lineto
653.999 323.001 lineto
658 313 lineto
fill
grestore
gsave
658 313 moveto
658 294 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
matrix currentmatrix
649 294 translate 9 9 scale
0 0 1 -90 0 arc
setmatrix
0 setlinecap
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
grestore
gsave
649 285 moveto
351.500250062484 285 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke
346 285 moveto
356.001 280.999 lineto
354.500875031242 284 lineto
354.500875031242 286 lineto
356.001 289.001 lineto
346 285 lineto
fill
grestore
gsave
346 285 moveto
44 285 lineto
0 setlinecap
1 setlinejoin
2 setlinewidth
[] 0 setdash
0.000 0.000 0.000 setrgbcolor AdjustColor
stroke