├── .github └── workflows │ ├── build.yml │ └── preview.yml ├── .gitignore ├── .gitmodules ├── ADQL.tex ├── ADQL.vor ├── LICENSE.txt ├── Makefile ├── README.md ├── adql-bnf.html ├── adql.bnf ├── bnf2html.LICENSE ├── bnf2html.pl ├── ivoa-cite.tex ├── notes ├── 20160501-01-adqltex-build.txt ├── 20160501-02-adqltex-updates.txt ├── 20160501-03-adql-xmatch.txt ├── 20160501-04-adql-boolean.txt ├── 20160501-05-adql-cast.txt ├── 20160501-06-adql-hex.txt ├── 20160501-07-adql-bitwise.txt ├── 20160501-08-adql-with.txt ├── 20160501-09-adql-offset.txt ├── 20160501-10-adql-union.txt ├── 20160501-11-maxrec-top.txt ├── 20160501-12-adql-optional.txt ├── 20160501-13-adql-draft.txt ├── 20160501-14-table-names.txt ├── 20171024-01-typo-fixes.txt └── 20171227-01-ivoatex-fixes.txt ├── role_diagram.pdf ├── role_diagram.svg └── role_diagram.xml /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | # This file generated from a template file maintained in the ivoatex repository. 2 | # To create and install it into a project repository, do: 3 | # make github-preview 4 | # git commit 5 | # git push 6 | # 7 | name: Check the IVOA document 8 | 9 | env: 10 | doc_name: ADQL 11 | 12 | on: 13 | pull_request: 14 | types: [opened, synchronize, reopened] 15 | 16 | jobs: 17 | build: 18 | 19 | runs-on: ubuntu-latest 20 | 21 | steps: 22 | 23 | - name: Checkout the repository 24 | uses: actions/checkout@v4 25 | with: 26 | submodules: true 27 | 28 | - name: Setup dependencies 29 | run: | 30 | sudo apt update 31 | sudo apt install texlive-latex-base texlive-latex-recommended \ 32 | texlive-latex-extra texlive-fonts-recommended \ 33 | pdftk xsltproc latexmk cm-super 34 | 35 | - name: Build the document 36 | run: make 37 | 38 | - name: Check the output 39 | run: | 40 | test -f ${{ env.doc_name }}.pdf 41 | test -f ${{ env.doc_name }}.bbl 42 | 43 | - name: Keep the PDF artefact 44 | uses: actions/upload-artifact@v4 45 | with: 46 | name: PDF Preview 47 | path: ${{ env.doc_name }}.pdf 48 | -------------------------------------------------------------------------------- /.github/workflows/preview.yml: -------------------------------------------------------------------------------- 1 | # This file generated from a template file maintained in the ivoatex repository. 2 | # To create and install it into a project repository, do: 3 | # make github-preview 4 | # git commit 5 | # git push 6 | # 7 | name: Update PDF Preview 8 | 9 | env: 10 | doc_name : ADQL 11 | branch_name: ${{ github.head_ref || github.ref_name }} 12 | tag_preview: auto-pdf-preview 13 | 14 | on: 15 | push: 16 | branches: 17 | - master 18 | 19 | jobs: 20 | build: 21 | 22 | runs-on: ubuntu-latest 23 | 24 | steps: 25 | 26 | - name: Checkout the repository 27 | uses: actions/checkout@v4 28 | with: 29 | submodules: true 30 | 31 | - name: Setup dependencies 32 | run: | 33 | sudo apt install texlive-latex-base texlive-latex-recommended \ 34 | texlive-latex-extra texlive-fonts-recommended \ 35 | pdftk xsltproc latexmk cm-super 36 | 37 | - name: Build the document 38 | run: make biblio ${{ env.doc_name }}-draft.pdf 39 | 40 | - name: Check the output 41 | run: | 42 | test -f ${{ env.doc_name }}-draft.pdf 43 | test -f ${{ env.doc_name }}.bbl 44 | 45 | - name: Remove the former PDF preview 46 | run: | 47 | gh release delete ${{ env.tag_preview }} --cleanup-tag --yes 48 | env: 49 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 50 | 51 | - name: Upload the new PDF preview 52 | run: | 53 | RELEASE_NOTES="This release aims to provide a PDF preview of the last commit applied on this repository. 54 | It will be updated automatically after each merge of a PullRequest. 55 | **DO NOT PUBLISH THIS PRE-RELEASE!** 56 | _Corresponding commit: ${{ github.sha }}_" 57 | 58 | gh release create ${{ env.tag_preview }} \ 59 | ${{ env.doc_name }}-draft.pdf \ 60 | --prerelease \ 61 | --target "${{ env.branch_name }}" \ 62 | --title 'Auto PDF Preview' \ 63 | --notes "$RELEASE_NOTES" 64 | env: 65 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 66 | 67 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ADQL.aux 2 | ADQL.html 3 | ADQL.log 4 | ADQL.out 5 | ADQL.pdf 6 | ADQL.toc 7 | ivoatexmeta.tex 8 | *.swp 9 | *.bbl 10 | *.blg 11 | *.fdb_latexmk 12 | *.fls 13 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "ivoatex"] 2 | path = ivoatex 3 | url = https://github.com/ivoa-std/ivoatex.git 4 | ignore = dirty 5 | -------------------------------------------------------------------------------- /ADQL.vor: -------------------------------------------------------------------------------- 1 | 16 | 17 | Astronomical Data Query Language ADQL 18 | ADQL 19 | ivo://ivoa.net/std/ADQL 20 | doi:10.5479/ADS/bib/2008ivoa.spec.1030O 21 | 22 | IVOA 23 | 24 | 25 | Mantelet, G. 26 | 27 | 28 | Morris, D. 29 | 30 | Demleitner, M. 31 | Dowler, P. 32 | Lusted, J. 33 | Nieto-Santisteban, M.A. 34 | Ohishi, M. 35 | O’Mullane, W. 36 | Ortiz, I. 37 | Osuna, P. 38 | Shirasaki, Y. 39 | Szalay, A. 40 | 41 | 2021-05-28 42 | 2.1 43 | 44 | IVOA Data Access Layer Working Group 45 | dal@ivoa.net 46 | 47 | 48 | 49 | virtual-observatories 50 | 51 | 52 | This document describes the Astronomical Data Query Language (ADQL). ADQL 53 | has been developed based on SQL92. This document describes the subset of 54 | the SQL grammar supported by ADQL. Special restrictions and extensions to 55 | SQL92 have been defined in order to support generic and astronomy 56 | specific operations. 57 | 58 | https://ivoa.net/documents/latest/ADQL.html 59 | Other 60 | Research 61 | 62 | 63 | 2.1 64 | 65 | 66 | v2.0 67 | Version 2.0 of ADQL (2008). Version 1 was unreleased. 68 | 69 | 70 | 71 | v2.1 72 | Version 2.1 of ADQL (2023) 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Attribution-ShareAlike 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More_considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution-ShareAlike 4.0 International Public 58 | License 59 | 60 | By exercising the Licensed Rights (defined below), You accept and agree 61 | to be bound by the terms and conditions of this Creative Commons 62 | Attribution-ShareAlike 4.0 International Public License ("Public 63 | License"). To the extent this Public License may be interpreted as a 64 | contract, You are granted the Licensed Rights in consideration of Your 65 | acceptance of these terms and conditions, and the Licensor grants You 66 | such rights in consideration of benefits the Licensor receives from 67 | making the Licensed Material available under these terms and 68 | conditions. 69 | 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Adapter's License means the license You apply to Your Copyright 84 | and Similar Rights in Your contributions to Adapted Material in 85 | accordance with the terms and conditions of this Public License. 86 | 87 | c. BY-SA Compatible License means a license listed at 88 | creativecommons.org/compatiblelicenses, approved by Creative 89 | Commons as essentially the equivalent of this Public License. 90 | 91 | d. Copyright and Similar Rights means copyright and/or similar rights 92 | closely related to copyright including, without limitation, 93 | performance, broadcast, sound recording, and Sui Generis Database 94 | Rights, without regard to how the rights are labeled or 95 | categorized. For purposes of this Public License, the rights 96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 97 | Rights. 98 | 99 | e. Effective Technological Measures means those measures that, in the 100 | absence of proper authority, may not be circumvented under laws 101 | fulfilling obligations under Article 11 of the WIPO Copyright 102 | Treaty adopted on December 20, 1996, and/or similar international 103 | agreements. 104 | 105 | f. Exceptions and Limitations means fair use, fair dealing, and/or 106 | any other exception or limitation to Copyright and Similar Rights 107 | that applies to Your use of the Licensed Material. 108 | 109 | g. License Elements means the license attributes listed in the name 110 | of a Creative Commons Public License. The License Elements of this 111 | Public License are Attribution and ShareAlike. 112 | 113 | h. Licensed Material means the artistic or literary work, database, 114 | or other material to which the Licensor applied this Public 115 | License. 116 | 117 | i. Licensed Rights means the rights granted to You subject to the 118 | terms and conditions of this Public License, which are limited to 119 | all Copyright and Similar Rights that apply to Your use of the 120 | Licensed Material and that the Licensor has authority to license. 121 | 122 | j. Licensor means the individual(s) or entity(ies) granting rights 123 | under this Public License. 124 | 125 | k. Share means to provide material to the public by any means or 126 | process that requires permission under the Licensed Rights, such 127 | as reproduction, public display, public performance, distribution, 128 | dissemination, communication, or importation, and to make material 129 | available to the public including in ways that members of the 130 | public may access the material from a place and at a time 131 | individually chosen by them. 132 | 133 | l. Sui Generis Database Rights means rights other than copyright 134 | resulting from Directive 96/9/EC of the European Parliament and of 135 | the Council of 11 March 1996 on the legal protection of databases, 136 | as amended and/or succeeded, as well as other essentially 137 | equivalent rights anywhere in the world. 138 | 139 | m. You means the individual or entity exercising the Licensed Rights 140 | under this Public License. Your has a corresponding meaning. 141 | 142 | 143 | Section 2 -- Scope. 144 | 145 | a. License grant. 146 | 147 | 1. Subject to the terms and conditions of this Public License, 148 | the Licensor hereby grants You a worldwide, royalty-free, 149 | non-sublicensable, non-exclusive, irrevocable license to 150 | exercise the Licensed Rights in the Licensed Material to: 151 | 152 | a. reproduce and Share the Licensed Material, in whole or 153 | in part; and 154 | 155 | b. produce, reproduce, and Share Adapted Material. 156 | 157 | 2. Exceptions and Limitations. For the avoidance of doubt, where 158 | Exceptions and Limitations apply to Your use, this Public 159 | License does not apply, and You do not need to comply with 160 | its terms and conditions. 161 | 162 | 3. Term. The term of this Public License is specified in Section 163 | 6(a). 164 | 165 | 4. Media and formats; technical modifications allowed. The 166 | Licensor authorizes You to exercise the Licensed Rights in 167 | all media and formats whether now known or hereafter created, 168 | and to make technical modifications necessary to do so. The 169 | Licensor waives and/or agrees not to assert any right or 170 | authority to forbid You from making technical modifications 171 | necessary to exercise the Licensed Rights, including 172 | technical modifications necessary to circumvent Effective 173 | Technological Measures. For purposes of this Public License, 174 | simply making modifications authorized by this Section 2(a) 175 | (4) never produces Adapted Material. 176 | 177 | 5. Downstream recipients. 178 | 179 | a. Offer from the Licensor -- Licensed Material. Every 180 | recipient of the Licensed Material automatically 181 | receives an offer from the Licensor to exercise the 182 | Licensed Rights under the terms and conditions of this 183 | Public License. 184 | 185 | b. Additional offer from the Licensor -- Adapted Material. 186 | Every recipient of Adapted Material from You 187 | automatically receives an offer from the Licensor to 188 | exercise the Licensed Rights in the Adapted Material 189 | under the conditions of the Adapter's License You apply. 190 | 191 | c. No downstream restrictions. You may not offer or impose 192 | any additional or different terms or conditions on, or 193 | apply any Effective Technological Measures to, the 194 | Licensed Material if doing so restricts exercise of the 195 | Licensed Rights by any recipient of the Licensed 196 | Material. 197 | 198 | 6. No endorsement. Nothing in this Public License constitutes or 199 | may be construed as permission to assert or imply that You 200 | are, or that Your use of the Licensed Material is, connected 201 | with, or sponsored, endorsed, or granted official status by, 202 | the Licensor or others designated to receive attribution as 203 | provided in Section 3(a)(1)(A)(i). 204 | 205 | b. Other rights. 206 | 207 | 1. Moral rights, such as the right of integrity, are not 208 | licensed under this Public License, nor are publicity, 209 | privacy, and/or other similar personality rights; however, to 210 | the extent possible, the Licensor waives and/or agrees not to 211 | assert any such rights held by the Licensor to the limited 212 | extent necessary to allow You to exercise the Licensed 213 | Rights, but not otherwise. 214 | 215 | 2. Patent and trademark rights are not licensed under this 216 | Public License. 217 | 218 | 3. To the extent possible, the Licensor waives any right to 219 | collect royalties from You for the exercise of the Licensed 220 | Rights, whether directly or through a collecting society 221 | under any voluntary or waivable statutory or compulsory 222 | licensing scheme. In all other cases the Licensor expressly 223 | reserves any right to collect such royalties. 224 | 225 | 226 | Section 3 -- License Conditions. 227 | 228 | Your exercise of the Licensed Rights is expressly made subject to the 229 | following conditions. 230 | 231 | a. Attribution. 232 | 233 | 1. If You Share the Licensed Material (including in modified 234 | form), You must: 235 | 236 | a. retain the following if it is supplied by the Licensor 237 | with the Licensed Material: 238 | 239 | i. identification of the creator(s) of the Licensed 240 | Material and any others designated to receive 241 | attribution, in any reasonable manner requested by 242 | the Licensor (including by pseudonym if 243 | designated); 244 | 245 | ii. a copyright notice; 246 | 247 | iii. a notice that refers to this Public License; 248 | 249 | iv. a notice that refers to the disclaimer of 250 | warranties; 251 | 252 | v. a URI or hyperlink to the Licensed Material to the 253 | extent reasonably practicable; 254 | 255 | b. indicate if You modified the Licensed Material and 256 | retain an indication of any previous modifications; and 257 | 258 | c. indicate the Licensed Material is licensed under this 259 | Public License, and include the text of, or the URI or 260 | hyperlink to, this Public License. 261 | 262 | 2. You may satisfy the conditions in Section 3(a)(1) in any 263 | reasonable manner based on the medium, means, and context in 264 | which You Share the Licensed Material. For example, it may be 265 | reasonable to satisfy the conditions by providing a URI or 266 | hyperlink to a resource that includes the required 267 | information. 268 | 269 | 3. If requested by the Licensor, You must remove any of the 270 | information required by Section 3(a)(1)(A) to the extent 271 | reasonably practicable. 272 | 273 | b. ShareAlike. 274 | 275 | In addition to the conditions in Section 3(a), if You Share 276 | Adapted Material You produce, the following conditions also apply. 277 | 278 | 1. The Adapter's License You apply must be a Creative Commons 279 | license with the same License Elements, this version or 280 | later, or a BY-SA Compatible License. 281 | 282 | 2. You must include the text of, or the URI or hyperlink to, the 283 | Adapter's License You apply. You may satisfy this condition 284 | in any reasonable manner based on the medium, means, and 285 | context in which You Share Adapted Material. 286 | 287 | 3. You may not offer or impose any additional or different terms 288 | or conditions on, or apply any Effective Technological 289 | Measures to, Adapted Material that restrict exercise of the 290 | rights granted under the Adapter's License You apply. 291 | 292 | 293 | Section 4 -- Sui Generis Database Rights. 294 | 295 | Where the Licensed Rights include Sui Generis Database Rights that 296 | apply to Your use of the Licensed Material: 297 | 298 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 299 | to extract, reuse, reproduce, and Share all or a substantial 300 | portion of the contents of the database; 301 | 302 | b. if You include all or a substantial portion of the database 303 | contents in a database in which You have Sui Generis Database 304 | Rights, then the database in which You have Sui Generis Database 305 | Rights (but not its individual contents) is Adapted Material, 306 | 307 | including for purposes of Section 3(b); and 308 | c. You must comply with the conditions in Section 3(a) if You Share 309 | all or a substantial portion of the contents of the database. 310 | 311 | For the avoidance of doubt, this Section 4 supplements and does not 312 | replace Your obligations under this Public License where the Licensed 313 | Rights include other Copyright and Similar Rights. 314 | 315 | 316 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 317 | 318 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 319 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 320 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 321 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 322 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 323 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 324 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 325 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 326 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 327 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 328 | 329 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 330 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 331 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 332 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 333 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 334 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 335 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 336 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 337 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 338 | 339 | c. The disclaimer of warranties and limitation of liability provided 340 | above shall be interpreted in a manner that, to the extent 341 | possible, most closely approximates an absolute disclaimer and 342 | waiver of all liability. 343 | 344 | 345 | Section 6 -- Term and Termination. 346 | 347 | a. This Public License applies for the term of the Copyright and 348 | Similar Rights licensed here. However, if You fail to comply with 349 | this Public License, then Your rights under this Public License 350 | terminate automatically. 351 | 352 | b. Where Your right to use the Licensed Material has terminated under 353 | Section 6(a), it reinstates: 354 | 355 | 1. automatically as of the date the violation is cured, provided 356 | it is cured within 30 days of Your discovery of the 357 | violation; or 358 | 359 | 2. upon express reinstatement by the Licensor. 360 | 361 | For the avoidance of doubt, this Section 6(b) does not affect any 362 | right the Licensor may have to seek remedies for Your violations 363 | of this Public License. 364 | 365 | c. For the avoidance of doubt, the Licensor may also offer the 366 | Licensed Material under separate terms or conditions or stop 367 | distributing the Licensed Material at any time; however, doing so 368 | will not terminate this Public License. 369 | 370 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 371 | License. 372 | 373 | 374 | Section 7 -- Other Terms and Conditions. 375 | 376 | a. The Licensor shall not be bound by any additional or different 377 | terms or conditions communicated by You unless expressly agreed. 378 | 379 | b. Any arrangements, understandings, or agreements regarding the 380 | Licensed Material not stated herein are separate from and 381 | independent of the terms and conditions of this Public License. 382 | 383 | 384 | Section 8 -- Interpretation. 385 | 386 | a. For the avoidance of doubt, this Public License does not, and 387 | shall not be interpreted to, reduce, limit, restrict, or impose 388 | conditions on any use of the Licensed Material that could lawfully 389 | be made without permission under this Public License. 390 | 391 | b. To the extent possible, if any provision of this Public License is 392 | deemed unenforceable, it shall be automatically reformed to the 393 | minimum extent necessary to make it enforceable. If the provision 394 | cannot be reformed, it shall be severed from this Public License 395 | without affecting the enforceability of the remaining terms and 396 | conditions. 397 | 398 | c. No term or condition of this Public License will be waived and no 399 | failure to comply consented to unless expressly agreed to by the 400 | Licensor. 401 | 402 | d. Nothing in this Public License constitutes or may be interpreted 403 | as a limitation upon, or waiver of, any privileges and immunities 404 | that apply to the Licensor or You, including from the legal 405 | processes of any jurisdiction or authority. 406 | 407 | 408 | ======================================================================= 409 | 410 | Creative Commons is not a party to its public 411 | licenses. Notwithstanding, Creative Commons may elect to apply one of 412 | its public licenses to material it publishes and in those instances 413 | will be considered the “Licensor.” The text of the Creative Commons 414 | public licenses is dedicated to the public domain under the CC0 Public 415 | Domain Dedication. Except for the limited purpose of indicating that 416 | material is shared under a Creative Commons public license or as 417 | otherwise permitted by the Creative Commons policies published at 418 | creativecommons.org/policies, Creative Commons does not authorize the 419 | use of the trademark "Creative Commons" or any other trademark or logo 420 | of Creative Commons without its prior written consent including, 421 | without limitation, in connection with any unauthorized modifications 422 | to any of its public licenses or any other arrangements, 423 | understandings, or agreements concerning use of licensed material. For 424 | the avoidance of doubt, this paragraph does not form part of the 425 | public licenses. 426 | 427 | Creative Commons may be contacted at creativecommons.org. 428 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # ivoatex Makefile. The ivoatex/README for the targets available. 2 | 3 | # short name of your document (edit $DOCNAME.tex; would be like RegTAP) 4 | DOCNAME = ADQL 5 | 6 | # count up; you probably do not want to bother with versions <1.0 7 | DOCVERSION = 2.1 8 | 9 | # Publication date, ISO format; update manually for "releases" 10 | DOCDATE = 2023-11-07 11 | 12 | # What is it you're writing: NOTE, WD, PR, or REC 13 | DOCTYPE = PR 14 | 15 | # IVOA group submitting this document 16 | IVOA_GROUP = DAL 17 | 18 | # An e-mail address of the person doing the submission to the document 19 | # repository (can be empty until a make upload is being made) 20 | #AUTHOR_EMAIL= 21 | 22 | # Source files for the TeX document (but the main file must always 23 | # be called $(DOCNAME).tex 24 | SOURCES = $(DOCNAME).tex ivoa-cite.tex role_diagram.pdf 25 | 26 | # List of pixel image files to be included in submitted package 27 | FIGURES = role_diagram.svg 28 | 29 | # List of PDF figures (for vector graphics) 30 | VECTORFIGURES = 31 | 32 | include ivoatex/Makefile 33 | 34 | # Shortcut aliases 35 | pdf: $(DOCNAME).pdf 36 | 37 | draft: $(DOCNAME)-draft.pdf 38 | 39 | html: $(DOCNAME).html 40 | 41 | zip: package 42 | 43 | bnf: adql-bnf.html 44 | 45 | # Custom target for generating a hyperlinked HTML version of the BNF. 46 | # This is not currently run by default during the build. 47 | BNFHTML_INTRO = \ 48 |

The SELECT statement is found at \ 49 | \<query_specification\>. \ 50 |

51 | 52 | adql-bnf.html: adql.bnf 53 | @( echo "ADQL ${DOCVERSION}"; cat $< ) \ 54 | | perl bnf2html.pl \ 55 | | sed -e's/#xref- */#xref-/g' \ 56 | -e's/href="# */href="#/g' \ 57 | -e's/name=" */name="/g' \ 58 | -e's/< */\</g' \ 59 | | sed -e"s%%\n$(BNFHTML_INTRO)%" \ 60 | > $@ && echo "=> HTML version of BNF successfully generated in: $@" 61 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![ADQL version](https://img.shields.io/badge/ADQL-REC--2.1-green.svg) 2 | [![CI build of the ADQL standard](../../actions/workflows/build.yml/badge.svg)](../../actions/workflows/build.yml) 3 | [![PDF-Preview](https://img.shields.io/badge/Preview-PDF-blue)](../../releases/download/auto-pdf-preview/ADQL-draft.pdf) 4 | 5 | # ADQL 6 | 7 | ## What is it? 8 | 9 | ADQL: **A**stronomical **D**ata **Q**uery **L**anguage 10 | 11 | ADQL is the language used by the [IVOA](http://www.ivoa.net/) to represent 12 | astronomical queries posted to VO services (e.g. 13 | [TAP](http://www.ivoa.net/documents/TAP/)). It is based on the Structured Query 14 | Language (SQL), especially on [SQL-92](https://en.wikipedia.org/wiki/SQL-92) 15 | (see also an online 16 | [BNF version](https://ronsavage.github.io/SQL/sql-92.bnf.html) for an easy 17 | navigation). The VO has a number of tabular data sets and many of them are 18 | stored in relational databases, making SQL a convenient access means. Thus, a 19 | subset of the SQL grammar has been extended to support queries that are 20 | specific to astronomy. 21 | 22 | ## Status? 23 | 24 | The last stable version is 25 | **[REC-2.1](http://www.ivoa.net/documents/latest/ADQL.html)**. 26 | 27 | See also the section 28 | [Releases](https://github.com/ivoa-std/ADQL/releases) of this GitHub Repository. 29 | 30 | ## What about this repository? 31 | 32 | This GitHub repository contains the sources of the IVOA document describing 33 | ADQL. 34 | 35 | Only the LaTeX version is available here. No output version (e.g. PDF, HTML, 36 | DOC) should be stored in this repository. 37 | 38 | A PDF preview is automatically generated by a GitHub workflow. It is accessible 39 | either by clicking of the above "Preview" badge or by looking at the 40 | pre-release 41 | ["Auto updated PDF"](../../releases/tag/auto-pdf-preview). 42 | 43 | An HTML version of the BNF is also directly available in this repository: 44 | check out [adql-bnf.html](adql-bnf.html). It is generated from 45 | [adql.bnf](adql.bnf) by the Makefile target named `bnf`. This latter uses the 46 | Perl script [bnf2html.pl](bnf2html.pl), originally coming 47 | and customized for the ADQL purpose. 48 | Thanks to Mark Taylor for his research, time and efforts for providing this 49 | generator. _Note that the HTML version of the BNF may be later automatically 50 | generated by a GitHub workflow._ 51 | 52 | ## Want to contribute? 53 | 54 | 1. [Raise a GitHub Issue](https://github.com/ivoa-std/ADQL/issues/new) on this 55 | repository 56 | 57 | 2. Fork this repository _(eventually clone it on your machine if you want to)_ 58 | 59 | 3. Create a branch in your forked repository ; this branch should be named after the issue(s) to fix (for instance: `issue-7-add-license`) 60 | 61 | 4. Commit suggested changes inside this branch 62 | 63 | 5. Create a Pull Request on the official repository _(note: a `git push` is needed first, if you are working on a clone)_ 64 | 65 | 6. Wait for someone to review your Pull Request and accept it 66 | 67 | _This process has been described and demonstrated during the IVOA Interoperability Meeting of Oct. 2019 in Groningen ; see [slides](https://wiki.ivoa.net/internal/IVOA/InterOpOct2019GitHub/IVOA_Github.pdf))_ 68 | 69 | ## License 70 | 71 | [![Creative Commons License](https://i.creativecommons.org/l/by-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-sa/4.0/) 72 | This work is licensed under a 73 | [Creative Commons Attribution-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-sa/4.0/). 74 | 75 | -------------------------------------------------------------------------------- /adql.bnf: -------------------------------------------------------------------------------- 1 | ::= 2 | 3 | | 4 | | 5 | 6 | ::= 7 | ABS 8 | | ACOS 9 | | AREA 10 | | ASIN 11 | | ATAN 12 | | ATAN2 13 | | BIGINT 14 | | BOX 15 | | CEILING 16 | | CENTROID 17 | | CIRCLE 18 | | CONTAINS 19 | | COORD1 20 | | COORD2 21 | | COORDSYS 22 | | COS 23 | | COT 24 | | DEGREES 25 | | DISTANCE 26 | | EXP 27 | | FLOOR 28 | | ILIKE 29 | | INTERSECTS 30 | | IN_UNIT 31 | | LOG 32 | | LOG10 33 | | MOD 34 | | OFFSET 35 | | PI 36 | | POINT 37 | | POLYGON 38 | | POWER 39 | | RADIANS 40 | | REGION 41 | | RAND 42 | | ROUND 43 | | SIN 44 | | SQRT 45 | | TOP 46 | | TAN 47 | | TRUNCATE 48 | 49 | ::= 50 | | 51 | 52 | ::= 53 | ABSOLUTE | ACTION | ADD | ALL 54 | | ALLOCATE | ALTER | AND 55 | | ANY | ARE 56 | | AS | ASC 57 | | ASSERTION | AT 58 | | AUTHORIZATION | AVG 59 | | BEGIN | BETWEEN | BIT | BIT_LENGTH 60 | | BOTH | BY 61 | | CASCADE | CASCADED | CASE | CAST 62 | | CATALOG 63 | | CHAR | CHARACTER | CHAR_LENGTH 64 | | CHARACTER_LENGTH | CHECK | CLOSE 65 | | COALESCE | COLLATE | COLLATION 66 | | COLUMN | COMMIT 67 | | CONNECT 68 | | CONNECTION | CONSTRAINT 69 | | CONSTRAINTS | CONTINUE 70 | | CONVERT | CORRESPONDING | COUNT | CREATE | CROSS 71 | | CURRENT 72 | | CURRENT_DATE | CURRENT_TIME 73 | | CURRENT_TIMESTAMP | CURRENT_USER | CURSOR 74 | | DATE | DAY | DEALLOCATE 75 | | DECIMAL | DECLARE | DEFAULT | DEFERRABLE 76 | | DEFERRED | DELETE | DESC | DESCRIBE | DESCRIPTOR 77 | | DIAGNOSTICS 78 | | DISCONNECT | DISTINCT | DOMAIN | DOUBLE | DROP 79 | | ELSE | END | END-EXEC | ESCAPE 80 | | EXCEPT | EXCEPTION 81 | | EXEC | EXECUTE | EXISTS 82 | | EXTERNAL | EXTRACT 83 | | FALSE | FETCH | FIRST | FLOAT | FOR 84 | | FOREIGN | FOUND | FROM | FULL 85 | | GET | GLOBAL | GO | GOTO 86 | | GRANT | GROUP 87 | | HAVING | HOUR 88 | | IDENTITY | IMMEDIATE | IN | INDICATOR 89 | | INITIALLY | INNER | INPUT 90 | | INSENSITIVE | INSERT | INT | INTEGER | INTERSECT 91 | | INTERVAL | INTO | IS 92 | | ISOLATION 93 | | JOIN 94 | | KEY 95 | | LANGUAGE | LAST | LEADING | LEFT 96 | | LEVEL | LIKE | LOCAL | LOWER 97 | | MATCH | MAX | MIN | MINUTE | MODULE 98 | | MONTH 99 | | NAMES | NATIONAL | NATURAL | NCHAR | NEXT | NO 100 | | NOT | NULL 101 | | NULLIF | NUMERIC 102 | | OCTET_LENGTH | OF 103 | | ON | ONLY | OPEN | OPTION | OR 104 | | ORDER | OUTER 105 | | OUTPUT | OVERLAPS 106 | | PAD | PARTIAL | POSITION | PRECISION | PREPARE 107 | | PRESERVE | PRIMARY 108 | | PRIOR | PRIVILEGES | PROCEDURE | PUBLIC 109 | | READ | REAL | REFERENCES | RELATIVE | RESTRICT 110 | | REVOKE | RIGHT 111 | | ROLLBACK | ROWS 112 | | SCHEMA | SCROLL | SECOND | SECTION 113 | | SELECT 114 | | SESSION | SESSION_USER | SET 115 | | SIZE | SMALLINT | SOME | SPACE | SQL | SQLCODE 116 | | SQLERROR | SQLSTATE 117 | | SUBSTRING | SUM | SYSTEM_USER 118 | | TABLE | TEMPORARY 119 | | THEN | TIME | TIMESTAMP 120 | | TIMEZONE_HOUR | TIMEZONE_MINUTE 121 | | TO | TRAILING | TRANSACTION 122 | | TRANSLATE | TRANSLATION | TRIM | TRUE 123 | | UNION | UNIQUE | UNKNOWN | UPDATE | UPPER | USAGE 124 | | USER | USING 125 | | VALUE | VALUES | VARCHAR | VARYING | VIEW 126 | | WHEN | WHENEVER | WHERE | WITH | WORK | WRITE 127 | | YEAR 128 | | ZONE 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 | ::= E 156 | 157 | ::= 158 | REAL 159 | | DOUBLE PRECISION 160 | 161 | ::= AREA 162 | 163 | ::= [ AS ] 164 | 165 | ::= * 166 | 167 | ::= 168 | [ NOT ] BETWEEN 169 | AND 170 | 171 | ::= [ NOT ] 172 | 173 | ::= 174 | 175 | | 176 | 177 | ::= 178 | 179 | | AND 180 | 181 | ::= 182 | BOX 183 | [ ] 184 | 185 | 186 | 187 | 188 | 189 | ::= 190 | 191 | | 192 | 193 | ::= 194 | CAST AS 195 | 196 | ::= 197 | 198 | | 199 | | 200 | | 201 | 202 | ::= 203 | 204 | ::= 205 | CENTROID 206 | 207 | 208 | 209 | ::= 210 | 211 | ::= 212 | 213 | | 214 | 215 | ::= | 216 | 217 | ::= 218 | [ ... ] 219 | 220 | ::= 221 | CHAR [ ] 222 | | VARCHAR [ ] 223 | 224 | ::= | 225 | 226 | ::= 227 | CIRCLE 228 | [ ] 229 | 230 | 231 | 232 | 233 | ::= 234 | 235 | | 236 | 237 | ::= ^ 238 | 239 | ::= 240 | COALESCE 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 | CONTAINS 280 | 281 | 282 | 283 | ::= COORD1 284 | 285 | ::= COORD2 286 | 287 | ::= 288 | 289 | ::= | 290 | 291 | ::= 292 | 293 | ::= 294 | 295 | ::= 296 | 297 | ::= 298 | 299 | ::= [ AS ] 300 | 301 | ::= TIMESTAMP 302 | 303 | ::= (see text) 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 | ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 330 | 331 | ::= 332 | DISTANCE 333 | 334 | 335 | 336 | | DISTANCE 337 | 338 | 339 | 340 | 341 | 342 | 343 | ::= ".." 344 | 345 | ::= """ 346 | 347 | ::= 348 | 349 | ::= "=" 350 | 351 | ::= 352 | [ [ ] ] 353 | | 354 | 355 | ::= EXISTS 356 | 357 | ::= 358 | 359 | ::= 360 | COORDSYS 361 | 362 | 363 | 364 | ::= 365 | SMALLINT 366 | | INTEGER 367 | | BIGINT 368 | 369 | ::= [ ] 370 | 371 | ::= 372 | LOWER 373 | | UPPER 374 | 375 | ::= 376 | FROM 377 | [ { }... ] 378 | 379 | ::= 380 | 381 | ::= 382 | 383 | [ ] 384 | 385 | 386 | ::= 387 | POINT 388 | | CIRCLE 389 | | POLYGON 390 | 391 | ::= 392 | | 393 | 394 | ::= 395 | 396 | | 397 | | 398 | | 399 | | 400 | | 401 | | 402 | 403 | ::= ">" 404 | 405 | ::= ">=" 406 | 407 | ::= GROUP BY 408 | 409 | ::= 410 | 411 | | 412 | 413 | ::= 414 | 415 | [ { }... ] 416 | 417 | ::= HAVING 418 | 419 | ::= | 420 | 421 | ::= 422 | [ NOT ] IN 423 | 424 | ::= 425 | | 426 | 427 | ::= 428 | IN_UNIT 429 | 430 | 431 | 432 | ::= 433 | { } ... 434 | 435 | ::= 436 | INTERSECTS 437 | 438 | 439 | 440 | ::= 441 | 442 | ::= ON 443 | 444 | ::= | 445 | 446 | ::= 447 | INNER | [ OUTER ] 448 | 449 | ::= 450 | | 451 | 452 | ::= | 453 | 454 | ::= "[" 455 | 456 | ::= ( 457 | 458 | ::= "<" 459 | 460 | ::= "<=" 461 | 462 | ::= 463 | [ NOT ] LIKE 464 | | [ NOT ] ILIKE 465 | 466 | ::= 467 | 468 | ::= 469 | 470 | ::= 471 | ABS 472 | | CEILING 473 | | DEGREES 474 | | EXP 475 | | FLOOR 476 | | LOG 477 | | LOG10 478 | | MOD 479 | 480 | 481 | | PI 482 | | POWER 483 | 484 | 485 | | RADIANS 486 | | RAND [ ] 487 | | ROUND 488 | [ ] 489 | 490 | | SQRT 491 | | TRUNCATE 492 | 493 | [ ] 494 | 495 | 496 | ::= - 497 | 498 | ::= 499 | USING 500 | 501 | 502 | 503 | ::= 504 | 505 | ::= 506 | 507 | | 508 | | 509 | | 510 | 511 | ::= 512 | 513 | | 514 | | 515 | 516 | ::= any character except " 517 | 518 | ::= any character except ' 519 | 520 | ::= | 521 | 522 | ::= "<>" 523 | 524 | ::= "!=" 525 | 526 | ::= IS [ NOT ] NULL 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 | ::= OFFSET 552 | 553 | ::= ORDER BY 554 | 555 | ::= ASC | DESC 556 | 557 | ::= 558 | 559 | | 560 | | 561 | 562 | ::= 563 | [ ] 564 | 565 | ::= 566 | [ { }... ] 567 | 568 | ::= LEFT | RIGHT | FULL 569 | 570 | ::= 571 | 572 | ::= % 573 | 574 | ::= "." 575 | 576 | ::= + 577 | 578 | ::= 579 | POINT 580 | [ ] 581 | 582 | 583 | 584 | ::= | | 585 | 586 | ::= 587 | POLYGON 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 | [ NATURAL ] [ ] JOIN 615 | [ ] 616 | 617 | ::= | 618 | 619 | ::= 620 | 621 | | 622 | 623 | ::= 624 | 625 | ::= 626 | 627 | | UNION [ ALL ] 628 | | EXCEPT [ ALL ] 629 | 630 | ::= 631 | 632 | | 633 | 634 | ::= 635 | 636 | | INTERSECT [ ALL ] 637 | 638 | ::= 639 | [ ] 640 | 641 | 642 | ::= ? 643 | 644 | ::= ' 645 | 646 | ::= 647 | 648 | ::= 649 | 650 | ::= 651 | REGION 652 | 653 | ::= 654 | ... 655 | [ { | | }... ] 656 | 657 | ::= "]" 658 | 659 | ::= ) 660 | 661 | ::= [ ] 662 | 663 | ::= 664 | 665 | | OR 666 | 667 | ::= 668 | 669 | [ ] 670 | [ ] 671 | 672 | ::= 673 | 674 | | [ { }... ] 675 | 676 | ::= 677 | SELECT 678 | [ ] 679 | [ ] 680 | 681 | 682 | [ ] 683 | [ ] 684 | [ ] 685 | 686 | ::= | 687 | 688 | ::= ; 689 | 690 | ::= 691 | COUNT 692 | | 693 | 694 | ::= AVG | MAX | MIN | SUM | COUNT 695 | 696 | ::= TOP 697 | 698 | ::= DISTINCT | ALL 699 | 700 | ::= | 701 | 702 | ::= [ ] 703 | 704 | ::= 705 | 706 | | 707 | 708 | ::= 709 | a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z 710 | 711 | ::= 712 | A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|V|W|X|Y|Z 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 | ACOS 750 | | ASIN 751 | | ATAN 752 | | ATAN2 753 | 754 | 755 | | COS 756 | | COT 757 | | SIN 758 | | TAN 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 | NULL 795 | | 796 | | 797 | | 798 | 799 | ::= 800 | 801 | | 802 | | 803 | | 804 | | 805 | | 806 | 807 | ::= "|" 808 | 809 | ::= WHERE 810 | 811 | ::= 812 | WITH {, } ... 813 | 814 | := 815 | AS () 816 | -------------------------------------------------------------------------------- /bnf2html.LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Ron Savage 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /bnf2html.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # 3 | # @(#)$Id: bnf2html.pl,v 3.16 2017/11/14 06:53:22 jleffler Exp $ 4 | # 5 | # Convert SQL-92, SQL-99 BNF plain text file into hyperlinked HTML. 6 | 7 | use strict; 8 | use warnings; 9 | use POSIX qw(strftime); 10 | #use Data::Dumper; 11 | 12 | use constant debug => 0; 13 | 14 | my(%rules); # Indexed by rule names w/o angle-brackets; each entry is a ref to a hash. 15 | my(%keywords); # Index by keywords; each entry is a ref to a hash. 16 | my(%names); # Indexed by rule names w/o angle-brackets; each entry is a ref to an array of line numbers 17 | 18 | sub top 19 | { 20 | print "

Top

\n\n"; 21 | } 22 | 23 | # Usage: add_rule_name(\%names, $rulename, $.); 24 | sub add_rule_name 25 | { 26 | my($reflist, $lhs, $line) = @_; 27 | #print "\nrulename = $lhs; line = $line\n"; 28 | if (defined ${$reflist}{$lhs}) 29 | { 30 | #print Data::Dumper->Dump([ ${$reflist}{$lhs} ], qw[ ${$reflist}{$lhs} ]); 31 | #print Data::Dumper->Dump([ \@{${$reflist}{$lhs}} ], qw[ \@{${$reflist}{$lhs}} ]); 32 | my @lines = @{${$reflist}{$lhs}}; 33 | print STDERR "\n$0: Rule <$lhs> at line $line already seen at line(s) ", join(", ", @lines), "\n\n"; 34 | } 35 | else 36 | { 37 | ${$reflist}{$lhs} = []; 38 | } 39 | push @{${$reflist}{$lhs}}, $line; 40 | } 41 | 42 | # Usage: add_entry(\%keywords, $keyword, $rule); 43 | # Usage: add_entry(\%rules, $rhs, $rule); 44 | sub add_entry 45 | { 46 | my($reflist, $lhs, $rhs) = @_; 47 | ${$reflist}{$lhs} = {} unless defined ${$reflist}{$lhs}; 48 | ${$reflist}{$lhs}{$rhs} = 1; 49 | } 50 | 51 | sub add_refs 52 | { 53 | my($def, $tail) = @_; 54 | print "\n\n" if debug; 55 | return if $tail =~ m/^!!/; 56 | return if $tail =~ m/^&(?:lt|gt|amp);$/; 57 | while ($tail) 58 | { 59 | $tail =~ s/^\s*//; 60 | if ($tail =~ m%^\<([-:/\w\s]+)\>%) 61 | { 62 | print "\n" if debug; 63 | add_entry(\%rules, $1, $def); 64 | $tail =~ s%^\<([-:/\w\s]+)\>%%; 65 | } 66 | elsif ($tail =~ m%^([-:/\w]+)%) 67 | { 68 | my($token) = $1; 69 | print "\n" if debug; 70 | add_entry(\%keywords, $token, $def) if $token =~ m%[[:alpha:]][[:alpha:]]% || $token eq 'C'; 71 | $tail =~ s%^[-:/\w]+%%; 72 | } 73 | else 74 | { 75 | # Otherwise, it is punctuation (such as the BNF metacharacters). 76 | $tail =~ s%^[^-:/\w]%%; 77 | } 78 | } 79 | } 80 | 81 | # NB: webcode replaces tabs with blanks! 82 | # open( my $WEBCODE, "-|", "webcode @ARGV") or die "$!"; 83 | 84 | # Replace the above lines to avoid dependency on webcode 85 | # (which is a small C utility). Output is the same, at least for 86 | # the current version of the ADQL BNF. 87 | # Could also do this using regexs in perl. 88 | my $escape_html = "sed -e's/&/\\&/g' -e's//\\>/g'"; 89 | open( my $WEBCODE, "-|", "$escape_html @ARGV") or die "$!"; 90 | 91 | # Read first line of file - use as title in head and in H1 heading in body 92 | $_ = <$WEBCODE>; 93 | exit 0 unless defined($_); 94 | chomp; 95 | 96 | # Is it wicked to use double quoting with single quotes, as in qq'text'? 97 | # It is used quite extensively in this script - beware! 98 | print qq'\n'; 99 | print "\n"; 100 | print "\n\n"; 101 | print " $_ \n\n\n\n"; 102 | print "

$_

\n\n"; 103 | print qq' \n'; 104 | 105 | print "
\n"; 106 | print qq' Cross-Reference: rules \n'; 107 | print "
\n"; 108 | print qq' Cross-Reference: keywords \n'; 109 | print "
\n"; 110 | 111 | sub rcs_id 112 | { 113 | my($id) = @_; 114 | $id =~ s%^(@\(#\))?\$[I]d: %%o; 115 | $id =~ s% \$$%%o; 116 | $id =~ s%,v % %o; 117 | $id =~ s%\w+ Exp( \w+)?$%%o; 118 | my(@words) = split / /, $id; 119 | my($version) = "file $words[0] version $words[1] dated $words[2] $words[3]"; 120 | return $version; 121 | } 122 | 123 | sub iso8601_format 124 | { 125 | my($tm) = @_; 126 | my $today = strftime("%Y-%m-%d %H:%M:%S+00:00", gmtime($tm)); 127 | return($today); 128 | } 129 | 130 | # Print hrefs for non-terminals and keywords. 131 | # Also substitute /* Nothing */ for an absence of productions between alternatives. 132 | sub print_tail 133 | { 134 | my($tail, $tcount) = @_; 135 | while ($tail) 136 | { 137 | my($newtail); 138 | if ($tail =~ m%^\s+%) 139 | { 140 | my($spaces) = $&; 141 | $newtail = $'; 142 | print "\n" if debug; 143 | $spaces =~ s% {4,8}%    %g; 144 | print $spaces; 145 | # Spaces are not a token - don't count them! 146 | } 147 | elsif ($tail =~ m%^'[^']*'% || $tail =~ m%^"[^"]*"% || $tail =~ m%^!!.*$%) 148 | { 149 | # Quoted literal - print and ignore. 150 | # Or meta-expression... 151 | my($quote) = $&; 152 | $newtail = $'; 153 | print "\n" if debug; 154 | $quote =~ s%!!.*% $quote %; 155 | print $quote; 156 | $tcount++; 157 | } 158 | elsif ($tail =~ m%^\<([-:/\w\s]+)\>%) 159 | { 160 | my($nonterm) = $&; 161 | $newtail = $'; 162 | print "\n" if debug; 163 | $nonterm =~ s%\<([-:/\w\s]+)\>%\<$1\>%; 164 | print " $nonterm"; 165 | $tcount++; 166 | } 167 | elsif ($tail =~ m%^[\w_]([-._\w]*[\w_])?%) 168 | { 169 | # Keyword 170 | my($keyword) = $&; 171 | $newtail = $'; 172 | print "\n" if debug; 173 | print(($keyword =~ m/^\d\d+$/) ? $keyword : qq' $keyword '); 174 | $tcount++; 175 | } 176 | else 177 | { 178 | # Metacharacter, string literal, etc. 179 | $tail =~ m%\S+%; 180 | my($symbol) = $&; 181 | $newtail = $'; 182 | print "\n" if debug; 183 | if ($symbol eq '|') 184 | { 185 | print "/* Nothing */ " if $tcount == 0; 186 | $tcount = 0; 187 | } 188 | else 189 | { 190 | $symbol =~ s%...omitted...%/* $& */%i; 191 | $tcount++; 192 | } 193 | print " $symbol"; 194 | } 195 | $tail = $newtail; 196 | } 197 | return($tcount); 198 | } 199 | 200 | sub undo_web_coding 201 | { 202 | my($line) = @_; 203 | $line =~ s%>%>%g; 204 | $line =~ s%<%<%g; 205 | $line =~ s%&%&%g; 206 | return $line; 207 | } 208 | 209 | my $hr_count = 0; 210 | my $tcount = 0; # Ick! 211 | my $def; # Current rule 212 | 213 | # Don't forget - the input has been web-encoded! 214 | 215 | while (<$WEBCODE>) 216 | { 217 | chomp; 218 | next if /^===*$/o; 219 | s/\s+$//o; # Remove trailing white space 220 | if (/^$/) 221 | { 222 | print "\n"; 223 | } 224 | elsif (/^---*$/) 225 | { 226 | print "
\n"; 227 | } 228 | elsif (/^--@@\s*(.*)$/) 229 | { 230 | my $comment = undo_web_coding($1); 231 | print "\n"; 232 | } 233 | elsif (/^@.#..Id:/) 234 | { 235 | # Convert what(1) string identifier into version information 236 | my $id = '$Id: bnf2html.pl,v 3.16 2017/11/14 06:53:22 jleffler Exp $'; 237 | my($v1) = rcs_id($_); 238 | my $v2 = rcs_id($id); 239 | print "

\n"; 240 | print "Derived from $v1\n"; 241 | my $today = iso8601_format(time); 242 | print "
\n"; 243 | print "Generated on $today by $v2\n"; 244 | print "

\n"; 245 | } 246 | elsif (/\s+::=/) 247 | { 248 | # Definition line 249 | $def = $_; 250 | $def =~ s%\<([-:/()\w\s]+)\>.*%$1%; 251 | my($tail) = $_; 252 | $tail =~ s%.*::=\s*%%; 253 | print qq'

<$def>    ::='; 254 | $tcount = 0; 255 | add_rule_name(\%names, $def, $.); 256 | if ($def eq "vertical bar") 257 | { 258 | # Needs special case attention to avoid a /* Nothing */ comment appearing. 259 | # Problem pointed out by Jens Odborg (jho1965us@gmail.com) 2016-04-14. 260 | # This builds knowledge of the SQL language definition into this script; 261 | # ugly, but trying to fix it in the print_tail function is probably worse. 262 | print "  |"; 263 | } 264 | elsif ($tail) 265 | { 266 | add_refs($def, $tail); 267 | print "  "; 268 | $tcount = print_tail($tail, $tcount); 269 | } 270 | print "\n"; 271 | } 272 | elsif (/^\s/) 273 | { 274 | # Expansion line 275 | add_refs($def, $_); 276 | print "
"; 277 | $tcount = print_tail($_, $tcount); 278 | } 279 | elsif (m/^--[\/]?(\w+)/) 280 | { 281 | # Pseudo-directive line in lower-case 282 | # Print a 'Top' link before


tags except first. 283 | top if /--hr/ && $hr_count++ > 0; 284 | s%--(/?[a-z][a-z\d]*)%<$1>%; 285 | s%\<([-:/\w\s]+)\>%\<$1\>%g; 286 | print "$_\n"; 287 | } 288 | elsif (m%^--##%) 289 | { 290 | $_ = undo_web_coding($_); 291 | s%^--##\s*%%; 292 | print "$_\n"; 293 | } 294 | elsif (m/^--%start\s+(\w+)/) 295 | { 296 | # Designated start symbol 297 | my $start = $1; 298 | print qq'

Start symbol: $start

\n'; 299 | } 300 | else 301 | { 302 | # Anything unrecognized passed through unchanged! 303 | print "$_\n"; 304 | } 305 | } 306 | 307 | close $WEBCODE; 308 | 309 | # Print index of initial letters for keywords. 310 | sub print_index_key 311 | { 312 | my($prefix, @keys) = @_; 313 | my %letters = (); 314 | foreach my $keyword (@keys) 315 | { 316 | my $initial = uc substr $keyword, 0, 1; 317 | $letters{$initial} = 1; 318 | } 319 | foreach my $letter ('A' .. 'Z') 320 | { 321 | if (defined($letters{$letter})) 322 | { 323 | print qq' $letter \n'; 324 | } 325 | else 326 | { 327 | print qq'$letter\n'; 328 | } 329 | } 330 | print "\n"; 331 | } 332 | 333 | ### Generate cross-reference tables 334 | 335 | { 336 | print "
\n\n"; 337 | print "
\n"; 338 | print qq'\n'; 339 | print "

Cross-Reference Table: Rules

\n"; 340 | 341 | print_index_key("rules", keys %rules); 342 | 343 | print "\n"; 344 | print "\n"; 345 | my %letters = (); 346 | 347 | foreach my $rule (sort { uc $a cmp uc $b } keys %rules) 348 | { 349 | my $initial = uc substr $rule, 0, 1; 350 | my $label = ""; 351 | if (!defined($letters{$initial})) 352 | { 353 | $letters{$initial} = 1; 354 | $label = qq' '; 355 | } 356 | print qq'\n \n\n"; 364 | } 365 | print "
Rule (non-terminal) Rules using it
$label $rule '; 357 | my $pad = ""; 358 | foreach my $ref (sort { uc $a cmp uc $b } keys %{$rules{$rule}}) 359 | { 360 | print qq'$pad <$ref> \n'; 361 | $pad = " "; 362 | } 363 | print "
\n"; 366 | print "
\n"; 367 | top; 368 | } 369 | 370 | { 371 | print "
\n"; 372 | print qq'\n'; 373 | print "

Cross-Reference Table: Keywords

\n"; 374 | 375 | print_index_key("keywords", keys %keywords); 376 | 377 | print "\n"; 378 | print "\n"; 379 | my %letters = (); 380 | foreach my $keyword (sort { uc $a cmp uc $b } keys %keywords) 381 | { 382 | my $initial = uc substr $keyword, 0, 1; 383 | my $label = ""; 384 | if (!defined($letters{$initial})) 385 | { 386 | $letters{$initial} = 1; 387 | $label = qq' '; 388 | } 389 | print qq'\n \n\n"; 397 | } 398 | print "
Keyword Rules using it
$label $keyword '; 390 | my $pad = ""; 391 | foreach my $ref (sort { uc $a cmp uc $b } keys %{$keywords{$keyword}}) 392 | { 393 | print qq'$pad <$ref> \n'; 394 | $pad = " "; 395 | } 396 | print "
\n"; 399 | print "
\n"; 400 | top; 401 | print "
\n"; 402 | } 403 | 404 | printf "%s\n", q'Please send feedback to Jonathan Leffler:'; 405 | printf "%s\n", q' jonathan.leffler@gmail.com .'; 406 | 407 | print "\n\n\n"; 408 | 409 | __END__ 410 | 411 | =pod 412 | 413 | =head1 PROGRAM 414 | 415 | bnf2html - Convert (ISO SQL) BNF Notation to Hyperlinked HTML 416 | 417 | =head1 SYNTAX 418 | 419 | bnf2html [file ...] 420 | 421 | =head1 DESCRIPTION 422 | 423 | The bnf2html filters the annotated BNF (Backus-Naur Form) from its input 424 | files and converts it into HTML on standard output. 425 | 426 | The HTML is heavily hyperlinked. 427 | Each rule (LHS) links to a table of other rules where it is used on the 428 | RHS. 429 | Similarly, each symbol on the RHS is linked to the rule that defines it. 430 | Thus, it is possible to find where items are used and defined quite 431 | easily. 432 | 433 | =head1 INPUT FORMAT 434 | 435 | This script is adapted to the BNF notation using in the SQL standard 436 | (ISO/IEC 9075:2003, for example). 437 | It also takes various forms of annotations. 438 | 439 | The first line of the file is used as the title in the head section. 440 | It is also used as the text for a H1 header at the top of the body. 441 | 442 | Lines consisting of two or more equal signs are ignored. 443 | 444 | Lines consisting of two or more dashes are converted to a horizontal 445 | rule. 446 | 447 | Lines starting with the SCCS identification string '@(#)' are used to 448 | print version information about the file converted and the script doing 449 | the converting. 450 | 451 | Lines containing space, colon, colon, equals are treated as rules. 452 | 453 | Lines starting with white space are treated as continuations of a rule. 454 | 455 | Lines starting dash, dash, (optionally a slash) and then one or more tag 456 | letters are converted into an HTML start or end tag. 457 | 458 | Any line starting dash, dash, hash, hash has any HTML entities 459 | introduced by the WEBCODE program removed. 460 | 461 | The should be at most one line starting '--%start'; this indicates the 462 | start symbol for the bnf2yacc converter, but is effectively ignored by 463 | bnf2html. 464 | 465 | Any other line is passed through verbatim. 466 | 467 | =head1 AUTHOR 468 | 469 | Jonathan Leffler 470 | 471 | =cut 472 | -------------------------------------------------------------------------------- /ivoa-cite.tex: -------------------------------------------------------------------------------- 1 | % 2 | % Useful macros for referring to IVOA standards and notes in a consistent style. 3 | % $Rev: 4639 $ 4 | % $Date: 2017-12-28 21:06:03 +0000 (Thu, 28 Dec 2017) $ 5 | % $URL: https://volute.g-vo.org/svn/trunk/projects/dal/ADQL/ADQL.tex $ 6 | % 7 | % Example: 8 | % Use \VOTableSpec to refer to the VOTable standard in your document. 9 | % The first time this occurs in your document it will be expanded into a full citation: 10 | % VOTable specification (Ochsenbein and Taylor et al. (2013)) 11 | % Any subsequent occurrences will be expanded into just the name of the standard: 12 | % VOTable specification 13 | % 14 | 15 | \def\definestandard#1#2#3{% 16 | \expandafter\def\csname#1\endcsname{% 17 | \expandafter\ifx\csname#1cited\endcsname\relax #3 \citep{#2}% 18 | \expandafter\def\csname#1cited\endcsname{#1}% 19 | \else #3\fi}} 20 | 21 | \definestandard{VOArch} {2010ivoa.rept.1123A} {IVOA Architecture} 22 | 23 | \definestandard{VOTableSpec} {2013ivoa.spec.0920O} {VOTable specification} 24 | \definestandard{DALISpec} {2017ivoa.spec.0517D} {DALI specification} 25 | \definestandard{VOSISpec} {2017ivoa.spec.0524G} {VOSI specification} 26 | \definestandard{VOUnitSpec} {2014ivoa.spec.0523D} {VOUnits specification} 27 | 28 | \definestandard{RegTAPSpec} {2014ivoa.spec.1208D} {RegTAP specification} 29 | 30 | \definestandard{TAPSpec} {2019ivoa.spec.0927D} {TAP specification} 31 | \definestandard{TAPRegSpec} {2012ivoa.spec.0827D} {TAPRegExt specification} 32 | 33 | \definestandard{STCSpec} {2007ivoa.spec.1030R} {STC specification} 34 | \definestandard{STCSAppendix} {2010ivoa.spec.0327D} {(non-normative) section 6 of TAP 1.0 specification} 35 | \definestandard{ObsCoreSpec} {2017ivoa.spec.0509L} {ObsCore specification} 36 | 37 | \definestandard{CatalogueUDF} {2021ivoa.spec.0310C} {Catalogue of ADQL User Defined Functions} 38 | 39 | % 40 | % Useful macros for referring to figures, sections and appendices in a consistent style. 41 | \newcommand{\FigureRef}[1]{Figure \ref{#1}} 42 | \newcommand{\SectionRef}[1]{Section \ref{#1}} 43 | \newcommand{\SectionSee}[1]{(see Section \ref{#1})} 44 | \newcommand{\AppendixRef}[1]{Appendix \ref{#1}} 45 | -------------------------------------------------------------------------------- /notes/20160501-01-adqltex-build.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | # ----------------------------------------------------- 24 | # Create our settings for the ADQL document. 25 | #[user@desktop] 26 | 27 | if [ ! -e "${HOME:?}/adqltex.settings" ] 28 | then 29 | cat > "${HOME:?}/adqltex.settings" << EOF 30 | VOLUTE_HOME=/var/local/projects/edinburgh/volute/svn 31 | ADQLTEXT_CODE=\${VOLUTE_HOME:?}/ADQL 32 | EOF 33 | fi 34 | 35 | # ----------------------------------------------------- 36 | # Update our ADQL document source. 37 | #[user@desktop] 38 | 39 | source "${HOME:?}/adqltex.settings" 40 | pushd "${ADQLTEXT_CODE:?}" 41 | 42 | svn update 43 | 44 | popd 45 | 46 | # ----------------------------------------------------- 47 | # Run an ivoatext container and build the document. 48 | #[user@desktop] 49 | 50 | source "${HOME:?}/adqltex.settings" 51 | pushd "${ADQLTEXT_CODE:?}" 52 | 53 | docker run -it \ 54 | -e "useruid=$(id -u)" \ 55 | -v "$(pwd):/texdata" \ 56 | 'ivoa/ivoatex' 57 | 58 | make clean 59 | make biblio 60 | make 61 | 62 | exit 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /notes/20160501-02-adqltex-updates.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | # ----------------------------------------------------- 24 | # Boolean Type 25 | 26 | Boolean text 27 | 28 | Table 3 - add BOOLEAN 29 | 30 | A boolean literals are expressed using one or other of the boolean keywords, 31 | TRUE, FALSE or true, false. 32 | 33 | Boolean literals are defined in BNF as follows : 34 | 35 | ::= TRUE | FALSE | true | false 36 | 37 | Boolean literals are NOT case sensitive. 38 | 39 | Text from original proposal 40 | 41 | "If the backend database contains columns of type boolean, a comparison of those 42 | against the literal strings True and False must be true and false when the column 43 | is true and false, respectively." 44 | 45 | Does this say anything more than the literal True is true and the 46 | literal False is false ? 47 | 48 | "The comparison to other literals is undefined by this specification." 49 | 50 | Excludes comparison with 1 and 0 ? 51 | 52 | "Clients should note that the strings have to be entered exactly as given here, 53 | without changing case, adding whitespace, or any other modification." 54 | 55 | Better to be leniant where possible. 56 | Check with list. 57 | 58 | Text from SQL-2011 59 | 60 | "The data type boolean comprises the distinct truth values True and False. 61 | Unless prohibited by a NOT NULL constraint, the boolean data type also 62 | supports the truth value Unknown as the null value. This specification 63 | does not make a distinction between the null value of the boolean data 64 | type and the truth value Unknown that is the result of an SQL , 65 | , or ; they may be used 66 | interchangeably to mean exactly the same thing." 67 | 68 | 69 | "All boolean values and SQL truth values are comparable and all are 70 | assignable to a site of type boolean. The value True is greater than the 71 | value False, and any comparison involving the null value or an Unknown truth 72 | value will return an Unknown result. The values True and False may be assigned 73 | to any site having a boolean data type; assignment of Unknown, or the null 74 | value, is subject to the nullability characteristic of the target." 75 | 76 | ** Need to test boolean literals on Cosmpoterix. 77 | ** Need to test boolean unknown on Cosmpoterix. 78 | 79 | ** Need to discuss unknown on mailing list. 80 | 81 | ** Do we want to be able to do this .. (not in current BNF) 82 | SELECT (ra BETWEEN 10 AND 20) AS test FROM alpha_source ; 83 | 84 | ** Good enough !! 85 | 86 | Boolean BNF 87 | 88 | ::= 89 | 90 | | 91 | + | 92 | | 93 | 94 | + ::= 95 | 96 | | 97 | | 98 | 99 | + ::= TRUE | FALSE | true | false 100 | 101 | + ::= # Placeholder 102 | 103 | # ----------------------------------------------------- 104 | # Hexadecimal literals 105 | 106 | Text needs work .. 107 | 108 | Hexadecimal text 109 | 110 | 2.1.3.2.x Hexadecimal 111 | 112 | Hexadecimal literals are only valid for integer data types, SMALLINT, INTEGER and BIGINT. 113 | 114 | Hexadecimal literals are expressed using the 'C' style notation, e.g. 0xFF. 115 | 116 | Hexadecimal literals are defined in BNF as follows : 117 | 118 | ::= 0x... 119 | 120 | hex_digit ::= | a | b | c | d | e | f | A | B | C | D | E | F 121 | 122 | Hexadecimal literals are NOT case sensitive. 123 | 124 | Numeric BNF (updated) 125 | 126 | ::= [] 127 | 128 | ::= 129 | 130 | | 131 | 132 | ::= 133 | [ []] 134 | | 135 | | 136 | | 137 | 138 | ::= E 139 | 140 | ::= 141 | 142 | ::= 143 | 144 | ::= [] 145 | 146 | ::= ... 147 | 148 | ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 149 | 150 | ::= | 151 | 152 | 153 | Hexadecimal BNF 154 | 155 | ::= 0x... 156 | 157 | hex_digit ::= | a | b | c | d | e | f | A | B | C | D | E | F 158 | 159 | # ----------------------------------------------------- 160 | # Bitwise operators 161 | 162 | BNF needs work 163 | 164 | Bitwise operators 165 | 166 | Remove the functions 167 | 168 | An ADQL service implementation MAY include support for the following 169 | optional bitwise operators: 170 | 171 | * BIT_NOT ~ x 172 | * BIT_AND x & y 173 | * BIT_OR x | y 174 | * BIT_XOR x ^ y <-- Note potential conflict with PostgreSQL exponentiation. 175 | 176 | Add 177 | "The the bitwise operations are only valid for integer numeric values, 178 | SMALLINT, INTEGER or BIGINT. If the operands are not integer values, 179 | then the result of the bitwise AND operation is undefined. 180 | 181 | Del 182 | "The function and operator form of each bitwise operation are treated as 183 | a pair. If an ADQL implementation declares support for one of the bitwise 184 | operations, it MUST support both the function and operator form of the 185 | bitwise operation." 186 | 187 | Update the operators to match. 188 | 189 | .... 190 | 191 | Bitwise BNF 192 | 193 | ::= 194 | 195 | | 196 | | 197 | | 198 | 199 | ::= # integer return type only 200 | 201 | # is this the right place for it ? 202 | ::= 203 | 204 | | 205 | | 206 | | 207 | 208 | # ----------------------------------------------------- 209 | # Hierarchical queries 210 | 211 | WITH feature 212 | 213 | WITH 214 | Language feature 215 | type: ivo://ivoa.net/std/TAPRegExt#features-adql-hierarchical 216 | name: WITH 217 | 218 | Common table expressions define temporary views that exist only for the duration of the query. 219 | 220 | Ordinary common table expressions help to make queries easier to understand by factoring 221 | subqueries out of the main SQL statement. 222 | 223 | WITH alpha_subset AS 224 | ( 225 | SELECT 226 | * 227 | FROM 228 | alpha_source 229 | WHERE 230 | id % 10 = 0 231 | ) 232 | SELECT 233 | * 234 | FROM 235 | alpha_subset 236 | WHERE 237 | ra BETWEEN 10 AND 20 238 | 239 | Recursive common table expressions provide the ability to iterate recursive queries of trees and graphs. 240 | 241 | We have not accepted RECURSIVE as an option (yet). 242 | 243 | Do we want to include RECURSIVE CTEs ? 244 | 245 | Need to test WITH on Cosmpoterix. 246 | 247 | WITH BFN 248 | 249 | ::= 250 | becomes 251 | ::= 252 | 253 | add 254 | 255 | := 256 | WITH [, ...] 257 | 258 | 259 | := 260 | 261 | [ ( [,...]) ] AS () 262 | 263 | ::= 264 | 265 | # ----------------------------------------------------- 266 | # OFFSET 267 | 268 | OFFSET text 269 | 270 | OFFSET 271 | Language feature 272 | type: ivo://ivoa.net/std/TAPRegExt#features-adql-offset 273 | name: OFFSET 274 | 275 | Text based on SQL 2011 276 | 277 | 278 | OFFSET BNF 279 | 280 | ::= 281 | 282 | [ ] 283 | [ ] 284 | [ ] 285 | [ ] 286 | + [ ] 287 | 288 | + ::= [OFFSET ] 289 | 290 | # ----------------------------------------------------- 291 | # CAST 292 | 293 | CAST feature 294 | 295 | CAST 296 | type: ivo://ivoa.net/std/TAPRegExt#features-adql-type 297 | name: CAST 298 | 299 | Feature name is wrong 300 | - name: IN_UNIT 301 | + name: CAST 302 | 303 | 304 | CAST BNF 305 | 306 | ::= 307 | 308 | | 309 | | 310 | | .... 311 | 312 | ::= 313 | | CAST( AS ) 314 | 315 | ::= SHORTINT | INTEGER | BIGINT | REAL | DOUBLE 316 | 317 | # ----------------------------------------------------- 318 | # DISTANCE 319 | 320 | DISTANCE text 321 | 322 | The DISTANCE function computes the arc length along a great circle between two 323 | points and returns a numeric value expression in degrees. 324 | 325 | The specification defines two versions of the DISTANCE function, one that 326 | accepts accept two geometries, and one that accepts four separate numeric 327 | values. 328 | 329 | If an ADQL service implementation declares support for DISTANCE, 330 | then it must implement both the two parameter and four parameter 331 | forms of the function. 332 | 333 | .... 334 | 335 | If the two arguments to the two parameter form are expressed in different 336 | coordinate systems, the function is responsible for converting one (or both). 337 | If it cannot do so, it SHOULD throw an error message, to be defined by 338 | the service making use of ADQL. 339 | 340 | It is assumed that the arguments for the four parameter form all use 341 | the same coordinate system. 342 | 343 | 344 | DISTANCE BNF 345 | 346 | ::= 347 | DISTANCE 348 | 349 | 350 | 351 | | DISTANCE 352 | 353 | 354 | 355 | 356 | 357 | 358 | # ----------------------------------------------------- 359 | # UNION 360 | 361 | Check BNF is correct 362 | 363 | ::= 364 | 365 | | UNION [ ALL ] 366 | | EXCEPT [ ALL ] 367 | 368 | # ----------------------------------------------------- 369 | # INTERSECT 370 | 371 | Check BNF is correct 372 | 373 | ::= 374 | 375 | | 376 | 377 | ::= 378 | 379 | | INTERSECT [ ALL ] 380 | 381 | # ----------------------------------------------------- 382 | # Check BNF is done for all 383 | 384 | \item BFN udf (TODO) 385 | \item BFN sets (TODO) 386 | \item BFN boolean (TODO) 387 | \item BFN cast (TODO) 388 | \item BFN bitwise (TODO) 389 | \item BFN hex (TODO) 390 | \item BFN cast (TODO) 391 | \item BFN with (TODO) 392 | 393 | # ----------------------------------------------------- 394 | # Syntax checks 395 | 396 | http://mail.ivoa.net/pipermail/dal/2015-July/007172.html 397 | 398 | *Note*: The usage of {} in the EBNF in this specification follows the 399 | usage in SQL92, i.e., it is used for grouping. It is *not* used as 400 | a zero-or-more operator as frequently done in other kinds of EBNF. 401 | 402 | # ----------------------------------------------------- 403 | # Online BNF 404 | 405 | Deprecate or update 406 | http://wiki.ivoa.net/internal/IVOA/IvoaVOQL/adql-bnf-v2.0.html 407 | 408 | # ----------------------------------------------------- 409 | # TapNotes 2014 410 | 411 | http://wiki.ivoa.net/twiki/bin/view/IVOA/TapNotes20140718 412 | 413 | # ----------------------------------------------------- 414 | # URI change ? 415 | 416 | Change the URI fragment for the geometric features 417 | ivo://ivoa.net/std/TAPRegExt#features-adql-geo 418 | 419 | from 420 | #features-adql-geo 421 | to 422 | #features-adql-geom 423 | 424 | Because one day we might need #features-adql-geog. 425 | 426 | # ----------------------------------------------------- 427 | # Overload all the geometry functions ? 428 | 429 | http://mail.ivoa.net/pipermail/dal/2016-April/007435.html 430 | Patrick Dowler 431 | 432 | I think that we should redefine all the geometry functions 433 | without coord sys now 434 | 435 | http://mail.ivoa.net/pipermail/dal/2016-April/007437.html 436 | Arnold Rots 437 | 438 | agree - drop coord sys 439 | 440 | # ----------------------------------------------------- 441 | # Commit diffs 442 | 443 | Added boolean type. 444 | https://volute.g-vo.org/viewvc/volute/trunk/projects/dal/ADQL/ADQL.tex?r1=3363&r2=3364 445 | 446 | Removed bitwise functions and updated the operators. 447 | https://volute.g-vo.org/viewvc/volute/trunk/projects/dal/ADQL/ADQL.tex?r1=3364&r2=3365 448 | 449 | Changed 'hierarchical queries' to 'common table expressions'. 450 | https://volute.g-vo.org/viewvc/volute/trunk/projects/dal/ADQL/ADQL.tex?r1=3365&r2=3366 451 | 452 | Added OFFSET clause. 453 | https://volute.g-vo.org/viewvc/volute/trunk/projects/dal/ADQL/ADQL.tex?r1=3366&r2=3367 454 | 455 | Added four parameter DISTANCE. 456 | https://volute.g-vo.org/viewvc/volute/trunk/projects/dal/ADQL/ADQL.tex?r1=3369&r2=3370 457 | 458 | Added hexadecimal literals. 459 | https://volute.g-vo.org/viewvc/volute/trunk/projects/dal/ADQL/ADQL.tex?r1=3373&r2=3374 460 | 461 | 462 | 463 | -------------------------------------------------------------------------------- /notes/20160501-03-adql-xmatch.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | 24 | 25 | 26 | http://mail.ivoa.net/pipermail/dal/2016-February/007293.html 27 | Marco Molinaro 28 | 29 | question - XMATCH(POINT, POINT, radius) 30 | question - XMATCH(FLOAT, FLOAT, FLOAT, FLOAT,radius) 31 | 32 | http://mail.ivoa.net/pipermail/dal/2016-February/007295.html 33 | Mark Taylor 34 | 35 | no - XMATCH(POINT, POINT, radius) 36 | yes - XMATCH(FLOAT, FLOAT, FLOAT, FLOAT,radius) 37 | 38 | 39 | http://mail.ivoa.net/pipermail/dal/2016-February/007296.html 40 | Arnold Rots 41 | 42 | I don't think I am the only one who is not enamored of these 43 | brute-force unnuanced cross-matches, but I wonder whether 44 | it would be helpful to improve them by allowing two radii. 45 | 46 | http://mail.ivoa.net/pipermail/dal/2016-February/007297.html 47 | Mark Taylor 48 | 49 | ....... 50 | ....... 51 | ....... 52 | ....... 53 | ....... 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | http://mail.ivoa.net/pipermail/dal/2016-April/007420.html 70 | Marco Molinaro 71 | 72 | summary 73 | 74 | no - XMATCH(POINT, POINT, radius) 75 | no - XMATCH(FLOAT, FLOAT, FLOAT, FLOAT,radius) 76 | 77 | yes - DISTANCE(POINT, POINT) 78 | yes - DISTANCE(FLOAT, FLOAT, FLOAT, FLOAT) 79 | 80 | 81 | http://mail.ivoa.net/pipermail/dal/2016-April/007421.html 82 | Walter Landry 83 | 84 | new - POINT literal {a,b} -> POINT('ICRS GEOCENTER',a,b) 85 | 86 | http://mail.ivoa.net/pipermail/dal/2016-April/007422.html 87 | Markus Demleitner 88 | 89 | meh - POINT literal 90 | new - DISTANCE(FLOAT, FLOAT, FLOAT, FLOAT) 91 | 92 | http://mail.ivoa.net/pipermail/dal/2016-April/007423.html 93 | Arnold Rots 94 | 95 | yes - POINT literal 96 | 97 | http://mail.ivoa.net/pipermail/dal/2016-April/007424.html 98 | Tom McGlynn 99 | 100 | yes - POINT literal 101 | yes - DISTANCE(FLOAT, FLOAT, FLOAT, FLOAT) 102 | 103 | http://mail.ivoa.net/pipermail/dal/2016-April/007427.html 104 | Mark Taylor 105 | 106 | maybe - POINT literal 107 | maybe - DISTANCE(FLOAT, FLOAT, FLOAT, FLOAT) 108 | new - SKYDISTANCE(FLOAT, FLOAT, FLOAT, FLOAT) 109 | 110 | http://mail.ivoa.net/pipermail/dal/2016-April/007435.html 111 | Patrick Dowler 112 | 113 | keep - DISTANCE(POINT, POINT) 114 | no - POINT literal 115 | no - DISTANCE(FLOAT, FLOAT, FLOAT, FLOAT) 116 | 117 | new - I think that we should redefine all the geometry functions 118 | without coord sys now 119 | 120 | http://mail.ivoa.net/pipermail/dal/2016-April/007437.html 121 | Arnold Rots 122 | 123 | agree - drop coord sys 124 | 125 | not - DISTANCE(POINT, POINT) 126 | 127 | new - ANGULAR_DISTANCE(POINT, POINT) 128 | new - SPHERICAL_DISTANCE(POINT, POINT) 129 | 130 | http://mail.ivoa.net/pipermail/dal/2016-April/007438.html 131 | Mark Taylor 132 | 133 | not DISTANCE(POINT, POINT) 134 | prefer DISTANCE(FLOAT, FLOAT, FLOAT, FLOAT) 135 | 136 | http://mail.ivoa.net/pipermail/dal/2016-April/007439.html 137 | Mark Taylor 138 | 139 | ObsCore 1.1 specifies no POINT-valued columns 140 | 141 | http://mail.ivoa.net/pipermail/dal/2016-April/007441.html 142 | Patrick Dowler 143 | 144 | DISTANCE (clear and simple xmatch) is generally 145 | needed for catalogues and not ObsCore 146 | 147 | ObsCore does have a point-valued CENTROID(s_region) 148 | 149 | http://mail.ivoa.net/pipermail/dal/2016-April/007440.html 150 | Markus Demleitner 151 | 152 | both - DISTANCE(POINT, POINT) and DISTANCE(FLOAT, FLOAT, FLOAT, FLOAT) 153 | new - BNF for both 154 | 155 | nice, but no - ANGULAR_DISTANCE 156 | 157 | http://mail.ivoa.net/pipermail/dal/2016-April/007442.html 158 | Patrick Dowler 159 | 160 | both - DISTANCE(POINT, POINT) and DISTANCE(FLOAT, FLOAT, FLOAT, FLOAT) 161 | 162 | So we are talking about keeping the existing DISTANCE(point, point) 163 | and overloading it with a 4-arg version? I can live with that. 164 | 165 | http://mail.ivoa.net/pipermail/dal/2016-April/007443.html 166 | Walter Landry 167 | 168 | nicer - DISTANCE(POINT, POINT) 169 | 170 | http://mail.ivoa.net/pipermail/dal/2016-April/007450.html 171 | Mark Taylor 172 | 173 | keep DISTANCE(FLOAT, FLOAT, FLOAT, FLOAT) 174 | new ANGULAR_DISTANCE(POINT, POINT) 175 | 176 | TAPRegExt - name needs to be distinct ? 177 | 178 | http://mail.ivoa.net/pipermail/dal/2016-April/007451.html 179 | Alex Szalay 180 | 181 | new Distance2(POINT, POINT) 182 | new Distance4(FLOAT, FLOAT, FLOAT, FLOAT) 183 | 184 | http://mail.ivoa.net/pipermail/dal/2016-April/007453.html 185 | Arnold Rots 186 | 187 | new Distance2P(POINT, POINT) 188 | new Distance4C(FLOAT, FLOAT, FLOAT, FLOAT) 189 | 190 | http://mail.ivoa.net/pipermail/dal/2016-April/007458.html 191 | Markus Demleitner 192 | 193 | TAPRegExt - both or none 194 | 195 | http://mail.ivoa.net/pipermail/dal/2016-April/007459.html 196 | Mark Taylor 197 | 198 | TAPRegExt - need version 199 | 200 | http://mail.ivoa.net/pipermail/dal/2016-April/007444.html 201 | Walter Landry 202 | 203 | add - POINT literal 204 | 205 | http://mail.ivoa.net/pipermail/dal/2016-April/007461.html 206 | Patrick Dowler 207 | 208 | yes - TAPRegExt, needs version 209 | 210 | http://mail.ivoa.net/pipermail/dal/2016-April/007462.html 211 | Mark Taylor 212 | 213 | ok - TAPRegExt, needs version 214 | 215 | 216 | 217 | 218 | -------------------------------------------------------------------------------- /notes/20160501-04-adql-boolean.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | -------------------------------------------------------------------------------- /notes/20160501-05-adql-cast.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | -------------------------------------------------------------------------------- /notes/20160501-06-adql-hex.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | -------------------------------------------------------------------------------- /notes/20160501-07-adql-bitwise.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | -------------------------------------------------------------------------------- /notes/20160501-08-adql-with.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | -------------------------------------------------------------------------------- /notes/20160501-09-adql-offset.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | 24 | http://mail.ivoa.net/pipermail/dal/2016-January/007237.html 25 | Markus Demleitner 26 | 27 | 28 | -------------------------------------------------------------------------------- /notes/20160501-10-adql-union.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | -------------------------------------------------------------------------------- /notes/20160501-11-maxrec-top.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | http://mail.ivoa.net/pipermail/dal/2015-August/007176.html 24 | 25 | http://mail.ivoa.net/pipermail/dal/2015-September/007182.html 26 | -------------------------------------------------------------------------------- /notes/20160501-12-adql-optional.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | 24 | http://mail.ivoa.net/pipermail/dal/2015-September/007209.html 25 | 26 | -------------------------------------------------------------------------------- /notes/20160501-13-adql-draft.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | 24 | http://mail.ivoa.net/pipermail/dal/2015-May/007115.html 25 | 26 | http://mail.ivoa.net/pipermail/dal/2015-May/007116.html 27 | 28 | http://mail.ivoa.net/pipermail/dal/2015-June/007136.html 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /notes/20160501-14-table-names.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2016, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | 24 | http://mail.ivoa.net/pipermail/dal/2015-April/007063.html 25 | -------------------------------------------------------------------------------- /notes/20171024-01-typo-fixes.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # 5 | # List all the words in the document 6 | # https://stackoverflow.com/a/15400670 7 | 8 | cat ADQL.tex | sed 's|[^a-zA-Z0-9]| |g' | sed 's| *| |g' | tr ' ' '\n' | sort | uniq -c > words.txt 9 | 10 | 11 | # 12 | # Spellcheck the words in OpenOffice 13 | 14 | 15 | # 16 | # Replace bad spellings 17 | 18 | compliancy ? 19 | 20 | Acknowledgments|Acknowledgements 21 | th|the 22 | AQDL|ADQL 23 | consitent|consistent 24 | langauge|language 25 | cartesian|cartesian 26 | insensitiveness|insensitive 27 | condtion|condition 28 | definative|definitive 29 | functons|functions 30 | bondaries|boundaries 31 | begining|beginning 32 | expresson|expression 33 | placeholder|place holder 34 | insensitiveness|insensitive 35 | 36 | nontrivial|non-trivial 37 | nonterminal|non-terminal 38 | 39 | 40 | subqueries 41 | subquery 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /notes/20171227-01-ivoatex-fixes.txt: -------------------------------------------------------------------------------- 1 | # 2 | # 3 | # 4 | # Copyright (c) 2017, ROE (http://www.roe.ac.uk/) 5 | # 6 | # This information is free software: you can redistribute it and/or modify 7 | # it under the terms of the GNU General Public License as published by 8 | # the Free Software Foundation, either version 3 of the License, or 9 | # (at your option) any later version. 10 | # 11 | # This information is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | # GNU General Public License for more details. 15 | # 16 | # You should have received a copy of the GNU General Public License 17 | # along with this program. If not, see . 18 | # 19 | # 20 | # 21 | # 22 | 23 | 24 | # 25 | # Updating ADQL document based on recommendations in the IvoatexDoc note. 26 | # http://ivoa.net/documents/Notes/IVOATex/20160430/NOTE-ivoatexDoc-1.1-20160430.pdf 27 | 28 | make biblio # update the bibliography 29 | make forcetex # make a PDF ignoring timestamps 30 | make ivoatexDoc.html # make an html document 31 | make package # make a zipfile for IVOA submission 32 | 33 | # 34 | # Generating the archdiag using the ivoatex tools. 35 | # (produces a very bland image, no clipart) 36 | 37 | docker run \ 38 | --rm \ 39 | --tty \ 40 | --interactive \ 41 | --user "$(id -u):$(id -g)" \ 42 | --volume "$(pwd):/texdata" \ 43 | ivoa/ivoatex:1.2 44 | 45 | make clean 46 | make archdiag.pdf 47 | 48 | # 49 | # ADQL TODO 50 | 51 | Revert the author list to support publishing in ADS. 52 | 53 | First citation references for other standards. 54 | 55 | VOTable 2013ivoa.spec.0920O 2009ivoa.spec.1130O 2004ivoa.spec.0811O 56 | TAP 2010ivoa.spec.0327D 57 | DALI 2017ivoa.spec.0517D 58 | VOSI 2017ivoa.spec.0524G 59 | VOUnits 2014ivoa.spec.0523D 60 | ObsCore 2017ivoa.spec.0509L 2011ivoa.spec.1028T 61 | Registry 2009ivoa.spec.1104B 62 | RegTAP 2014ivoa.spec.1208D 63 | TAPRegExt 2012ivoa.spec.0827D 64 | VOResource 2008ivoa.spec.0222P 65 | STC 2007ivoa.spec.1030R 66 | STC-S WD only 67 | 68 | Use existing ivoatex macros 69 | xmlel 70 | vorent 71 | code 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /role_diagram.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ivoa-std/ADQL/f8d53bd4d63bc7332f3681b8e485eea690efdc3c/role_diagram.pdf -------------------------------------------------------------------------------- /role_diagram.svg: -------------------------------------------------------------------------------- 1 | 2 | IVOA Architecture DiagramThis image shows the architecture of the Virtual Observatory 40 | (cf. http://ivoa.net), together with the relevant standards.UsersComputersProvidersRegistryData Access ProtocolsUser LayerUsingResource LayerSharingVOCoreFindingGettingDesktop AppsIn-BrowserAppsUserProgramsData and Metadata CollectionStorageComputationSemanticsDataModelsVO QueryLanguagesFormats 41 | DALI 42 | TAPRegExt 43 | TAP 44 | ADQL 45 | 46 | -------------------------------------------------------------------------------- /role_diagram.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | --------------------------------------------------------------------------------