From 9f2ff37c541175e69497c09c8421bbdc7ac827e6 Mon Sep 17 00:00:00 2001 From: Jake Wheat Date: Sat, 31 Aug 2019 18:12:35 +0100 Subject: [PATCH] fix regression in extract function parsing, some small tweaks --- Language/SQL/SimpleSQL/Dialect.lhs | 4 ++-- Makefile | 2 +- TODO | 3 +-- changelog | 4 ++-- website/index.asciidoc | 7 ++----- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/Language/SQL/SimpleSQL/Dialect.lhs b/Language/SQL/SimpleSQL/Dialect.lhs index 710abe7..0fdfcf9 100644 --- a/Language/SQL/SimpleSQL/Dialect.lhs +++ b/Language/SQL/SimpleSQL/Dialect.lhs @@ -182,7 +182,7 @@ windows, etc.) > ,"cursor" -- keyword > ,"cycle" --keyword > ,"date" -- type -> ,"day" -- keyword? +> --,"day" -- keyword? - the parser needs it to not be a keyword to parse extract at the moment > ,"deallocate" -- keyword > ,"dec" -- type > ,"decimal" -- type @@ -237,7 +237,7 @@ windows, etc.) > ,"groups" > ,"having" > ,"hold" -> ,"hour" +> --,"hour" > ,"identity" > ,"in" > ,"indicator" diff --git a/Makefile b/Makefile index 62d9deb..6cde53c 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ build : .PHONY : test test : - cabal new-run test:Tests -- --hide-successes --ansi-tricks=false + cabal v2-run test:Tests -- --hide-successes --ansi-tricks=false .PHONY : website website : diff --git a/TODO b/TODO index b3d9254..3b204ac 100644 --- a/TODO +++ b/TODO @@ -4,6 +4,7 @@ review alters, and think about adding rename versions which are really common and useful, but not in ansi https://github.com/JakeWheat/simple-sql-parser/issues/20 +finish off going through the keyword list do more examples what are the use cases? @@ -33,8 +34,6 @@ themselves review main missing sql bits - focus on more mainstream things could also review main dialects -review the dialect support implementation - syntax from hssqlppp: query hints, join hints diff --git a/changelog b/changelog index ccf671b..f2fcb1c 100644 --- a/changelog +++ b/changelog @@ -1,6 +1,6 @@ 0.6.0 - checked - works with ghc 8.8.1 - but because of pretty-show, - the executable doesn't work with this ghc yet + checked with ghc 8.8.1 - but because of pretty-show, the + executable doesn't work with this ghc yet change the dialect handling - now a dialect is a bunch of flags plus a keyword list, and custom dialects are now feasible (still incomplete) diff --git a/website/index.asciidoc b/website/index.asciidoc index 1fa4b4b..ce303f6 100644 --- a/website/index.asciidoc +++ b/website/index.asciidoc @@ -13,7 +13,7 @@ formats output nicely. Current target is to parse most SQL:2011 queries, plus a good subset of DDL, non-query DML, transaction management, access control and session management. -This is the documentation for version 0.5.0. Documentation for other +This is the documentation for version 0.6.0. Documentation for other versions is available here: http://jakewheat.github.io/simple-sql-parser/. @@ -22,9 +22,6 @@ probably not very stable, since adding support for all the not-yet-supported ANSI SQL syntax, then other dialects of SQL is likely to change the abstract syntax types considerably. -Release 0.5.0 is a checkpoint release since there hasn't been a -release for a while. - Tested with GHC 8.8.1, 8.6.5, 8.4.4 and 8.2.1. == Links @@ -375,7 +372,7 @@ with --ansi-tricks=false so it works is a good option to use: ---- -cabal new-run test:Tests -- --hide-successes --ansi-tricks=false +cabal v2-run test:Tests -- --hide-successes --ansi-tricks=false ---- == Reporting bugs