diff --git a/website/make_website.sh b/website/make_website.sh index e06bf6e..5fb0ea2 100755 --- a/website/make_website.sh +++ b/website/make_website.sh @@ -13,7 +13,11 @@ cp website/ocean.css build # index asciidoctor website/index.asciidoc -o build/index.html #pandoc --from=markdown --to=html website/index.txt -o build/index.html -c main.css --title=simple-sql-parser --toc -pandoc --from=markdown --to=html website/supported_sql.txt -o build/supported_sql.html -c main.css '--title=simple-sql-parser supported SQL' --toc +asciidoctor website/supported_sql.asciidoc -o build/supported_sql.html +#pandoc --from=markdown --to=html website/supported_sql.txt -o build/supported_sql.html -c main.css '--title=simple-sql-parser supported SQL' --toc + + + # tpch sql file # pandoc src/tpch.sql -s --highlight-style kate -o tpch.sql.html # rendered test cases diff --git a/website/supported_sql.txt b/website/supported_sql.asciidoc similarity index 85% rename from website/supported_sql.txt rename to website/supported_sql.asciidoc index a175475..b085140 100644 --- a/website/supported_sql.txt +++ b/website/supported_sql.asciidoc @@ -1,10 +1,18 @@ -# simple-sql-parser supported SQL overview -[simple-sql-parser home](index.html) +:toc: right +:sectnums: +:toclevels: 10 +:source-highlighter: pygments + += simple-sql-parser supported SQL + +== Overview + +link:index.html[simple-sql-parser home] This page has more details on the supported SQL in simple-sql-parser. -See the [simple-sql-parser test cases](test_cases.html) page for +See the link:test_cases.html[simple-sql-parser test cases] page for examples. The target dialect of SQL at this time is ISO/ANSI SQL:2011. The @@ -24,19 +32,19 @@ Haskell uses, and any encoding/decoding is left to the system. I think this effectively means that you will usually be using utf-8 character set for the sql source. -# Queries +== Queries -## Select lists +=== Select lists Supports value expressions, aliases with optional 'as'. Doesn't support 'select * as (a,b,c) from t' yet. -## Set quantifiers on select +=== Set quantifiers on select Supports 'select distinct' and explicit 'select all'. -## From clause +=== From clause * aliases * subqueries @@ -50,32 +58,32 @@ Supports 'select distinct' and explicit 'select all'. - using lists - lateral -## Group by clause +=== Group by clause Supports value expressions, group by (), cube, rollup, grouping parentheses and grouping sets with nested grouping expressions. -## Order by clause +=== Order by clause Supports value expressions, asc/desc and nulls first/last. -## Offset and fetch +=== Offset and fetch Supports 'offset n rows' and 'fetch first n rows only'. -## Set operators +=== Set operators Union, except, intersect + all/distinct and corresponding. -## Table value constructor +=== Table value constructor For example: values (1,2),(3,4). -## Explicit table +=== Explicit table For example: 'table t', which is shorthand for 'select * from t'. -## Value expressions +=== Value expressions The value expressions type and parser is used in many contexts, including: @@ -93,8 +101,7 @@ grammars for most of these. The supported value expressions include: -* basic string literals in single quotes (escapes and other string - literal syntaxes coming soon) +* basic string literals in single quotes * number literals: digits.digitse+-exp * explicitly typed literal, e.g. int '3' * binary operators @@ -132,7 +139,7 @@ The supported value expressions include: * parentheses * quoted and unquoted identifiers * a.b qualified identifiers -* \*, a.\* +* \*, a.* * functions: f(a,b) * aggregates: agg(distinct a order by b) * window functions: sum(x) over (partition by y order by z) @@ -140,22 +147,22 @@ The supported value expressions include: * row constructors, e.g. where (a,b) = any (select a,b from t) * ? used in parameterized queries -# DDL +== DDL todo -# Non-query DML +== Non-query DML todo -# Access Control +== Access Control todo -# Transaction management +== Transaction management todo -# Session management +== Session management todo