220 lines
6.1 KiB
Plaintext
220 lines
6.1 KiB
Plaintext
continue 2003 review and tests
|
|
touch up the expr hack as best as can
|
|
left factor as much as possible (see below on notes)
|
|
table expression in syntax:
|
|
QueryExpr = Select SelectList (Maybe TableExpr)
|
|
and the TableExpr contains all the other bits?
|
|
finish off ansi 2003 support or specific subset
|
|
summarize todos
|
|
start looking at error messages
|
|
change the booleans in the ast to better types for less ambiguity
|
|
represent missing optional bits in the ast as nothing instead of the
|
|
default
|
|
look at fixing the expression parsing completely
|
|
represent natural and using/on in the syntax more close to the
|
|
concrete syntax - don't combine in the ast
|
|
|
|
|
|
left factor/try removal:
|
|
try in the interval literal
|
|
have to left factor with the typed literal "interval 'xxx'" syntax
|
|
+ with identifier
|
|
try in the prefix cast: LF with identifier
|
|
few tries in the specialopks: need review
|
|
+ left factor the start of these (e.g. for function style substring
|
|
and for keyword style substring)
|
|
not between: needs left factoring with a bunch of suffix operators
|
|
subqueries: need left factoring with all the stuff which starts with
|
|
open parens. The subquery ast needs rethink as well
|
|
typename: left factor with identifier
|
|
inSuffix in expr table: conflicts with 'in' keyword in precision -
|
|
left factor
|
|
the binary and postfix multi keyword ops need left factoring since
|
|
several share prefixes
|
|
app needs lf with parens, identifier, etc.
|
|
parens lf in nonJoinTref
|
|
name start lf in nonJoinTref
|
|
|
|
all of the above should help the error messages a lot
|
|
|
|
big feature summary:
|
|
all ansi sql queries
|
|
better expression tree parsing
|
|
error messages, left factor
|
|
dml, ddl, procedural sql
|
|
position annotation
|
|
type checker/ etc.
|
|
lexer
|
|
dialects
|
|
quasi quotes
|
|
typesafe sql dbms wrapper support for haskell
|
|
extensibility
|
|
performance analysis
|
|
|
|
|
|
= next release
|
|
|
|
try and use the proper css theme
|
|
create a header like in the haddock with simple-sql-parser +
|
|
contents link
|
|
change the toc gen so that it works the same as in haddock (same
|
|
div, no links on the actual titles
|
|
fix the page margins, and the table stuff: patches to the css?
|
|
|
|
release checklist:
|
|
hlint
|
|
haddock review
|
|
spell check
|
|
update changelog
|
|
update website text
|
|
regenerate the examples on the index.txt
|
|
|
|
= Later general tasks:
|
|
|
|
docs
|
|
|
|
add to website: pretty printed tpch, maybe other queries as
|
|
demonstration
|
|
|
|
add preamble to the rendered test page
|
|
|
|
add links from the supported sql page to the rendered test page for
|
|
each section -> have to section up the tests some more
|
|
|
|
testing
|
|
|
|
review tests to copy from hssqlppp
|
|
|
|
add lots more tests using SQL from the xb2 manual
|
|
|
|
much more table reference tests, for joins and aliases etc.?
|
|
|
|
review internal sql collection for more syntax/tests
|
|
|
|
other
|
|
|
|
review syntax to replace maybe and bool with better ctors
|
|
|
|
----
|
|
|
|
demo program: convert tpch to sql server syntax exe processor
|
|
|
|
review abstract syntax (e.g. combine App with SpecialOp?)
|
|
|
|
more operators
|
|
|
|
sql server top syntax
|
|
|
|
named windows
|
|
|
|
extended string literals, escapes and other flavours (like pg and
|
|
oracle custom delimiters)
|
|
|
|
run through other manuals for example queries and features: sql in a
|
|
nutshell, sql guide, sql reference guide, sql standard, sql server
|
|
manual, oracle manual, teradata manual + re-through postgresql
|
|
manual and make notes in each case of all syntax and which isn't
|
|
currently supported also.
|
|
|
|
check the order of exports, imports and functions/cases in the files
|
|
fix up the import namespaces/explicit names nicely
|
|
|
|
ast checker: checks the ast represents valid syntax, the parser
|
|
doesn't check as much as it could, and this can also be used to
|
|
check generated trees. Maybe this doesn't belong in this package
|
|
though?
|
|
|
|
= sql support
|
|
|
|
collate? -> postfix operator which binds very tightly:
|
|
a < 'foo' collate 'C'
|
|
->
|
|
Op "<" [Iden "a", SpecialOp "collate" [StringLit 'foo', StringLit
|
|
'C']]
|
|
also postfix in order by:
|
|
select a from t order by a collate 'C': add to order by syntax, one
|
|
collation per column
|
|
and on group by
|
|
a collation in ansi sql is a optional qualifier plus identifier, not a
|
|
string
|
|
have to do fixity for this to work
|
|
|
|
see what schema.fun(a) parses to and decide if this is correct
|
|
|
|
all ansi string literal syntax?
|
|
|
|
check ansi standard for operators (keywords and symbols)
|
|
|
|
proper character sets for identifiers, escapes, etc.
|
|
|
|
placeholder/positional arg
|
|
|
|
full number literals -> other bases?
|
|
apply, pivot
|
|
within group aggregate syntax
|
|
|
|
try to do full review of sql2003 query syntax
|
|
|
|
make ansi dialect which only supports ansi sql. Maybe there is a use
|
|
for a separate SQL 92, 99 and 2003 dialects?
|
|
|
|
string literals:
|
|
N'
|
|
B'
|
|
X'
|
|
U&' ?
|
|
looks like two string literals separated by any whitespace are
|
|
merged, which isn't what the postgres manual claims is the standard
|
|
plus something introducer, character set thing
|
|
union join?
|
|
corresponding by
|
|
from in substring is not optional in ansi
|
|
the keyword from is optional in trim iff there is neither
|
|
leading,etc. and explicit char
|
|
extract can accept 'timezone hour' and 'timezone minute' for the
|
|
extraction field. Could hardcode the complete allowed list in the
|
|
parser?
|
|
bunch of timezone keyword stuff
|
|
interval a to b
|
|
array specification int array or int array[5] - type name
|
|
typenames: scope, multiset,row type, ref type
|
|
unique subquery -> returns true if all the rows in the subquery are
|
|
distinct
|
|
match predicate <row value constructor> MATCH [ UNIQUE ] [ PARTIAL |
|
|
FULL ] <table subquery>
|
|
clob type: CLOB(4M) - M suffix on the precision
|
|
array element reference a[4]
|
|
regular expression substring function
|
|
between symmetric
|
|
unicode delimited identifier
|
|
character set postfix type op for string types + collate on string types
|
|
next value for
|
|
treat as
|
|
generalized invocation?
|
|
position using
|
|
multiset stuff
|
|
table sample
|
|
unnest
|
|
only
|
|
window frame exclusion: complete window support?
|
|
select t.* as (a,b,c) from t
|
|
search or cycle clause for ctes
|
|
normalized
|
|
|
|
other dialect targets:
|
|
postgres
|
|
oracle
|
|
teradata
|
|
ms sql server
|
|
mysql?
|
|
db2?
|
|
what other major dialects are there?
|
|
sqlite
|
|
sap dbmss (can't work out what are separate products or what are the
|
|
dialects)
|
|
|
|
maybe later: other dml
|
|
insert, update, delete, truncate, merge + set, show?
|
|
copy, execute?, explain?, begin/end/rollback?
|
|
|