diff --git a/Language/SQL/SimpleSQL/Parse.lhs b/Language/SQL/SimpleSQL/Parse.lhs index 3540411..8853d4a 100644 --- a/Language/SQL/SimpleSQL/Parse.lhs +++ b/Language/SQL/SimpleSQL/Parse.lhs @@ -2118,6 +2118,7 @@ It is only allowed when all the strings are quoted with ' atm. > identifierTok :: [String] -> Parser (Maybe (String,String), String) > identifierTok blackList = mytoken (\tok -> > case tok of +> L.Identifier q@(Just {}) p -> Just (q,p) > L.Identifier q p | map toLower p `notElem` blackList -> Just (q,p) > _ -> Nothing) diff --git a/TODO b/TODO index 87fde32..b3d9254 100644 --- a/TODO +++ b/TODO @@ -4,6 +4,38 @@ 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 + +do more examples +what are the use cases? + sql generator - queries + sql generator - ddl + parsing some sql - for what purpose + generating documentation of ddl + write some sort of trivial sql engine or wrapper around something? + write something that takes sql, modifies it, and outputs the result + lint checker? + +do an example of adding some new syntax +-> seems quite a few people are using this + and there are some feature requests + try to give people a path to implement features themselves + +goals: + +1. if someone might want to use this, give them some toy examples to +help bootstrap them + +2. see if can encourage people who want some missing sql to add it +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/tools/Language/SQL/SimpleSQL/ScalarExprs.lhs b/tools/Language/SQL/SimpleSQL/ScalarExprs.lhs index 3152c91..d143de0 100644 --- a/tools/Language/SQL/SimpleSQL/ScalarExprs.lhs +++ b/tools/Language/SQL/SimpleSQL/ScalarExprs.lhs @@ -50,6 +50,7 @@ Tests for parsing scalar expressions > [("iden1", Iden [Name Nothing "iden1"]) > --,("t.a", Iden2 "t" "a") > ,("\"quoted identifier\"", Iden [Name (Just ("\"","\"")) "quoted identifier"]) +> ,("\"period\"", Iden [Name (Just ("\"","\"")) "period"]) > ] > star :: TestItem @@ -413,3 +414,4 @@ target_string > ] > where > t fn = TestScalarExpr ansi2011 (fn ++ "(a)") $ App [Name Nothing fn] [Iden [Name Nothing "a"]] + diff --git a/website/index.asciidoc b/website/index.asciidoc index 7a8bb34..5f226e7 100644 --- a/website/index.asciidoc +++ b/website/index.asciidoc @@ -401,4 +401,7 @@ generally available to work on these, so you should either make a pull request, or find someone willing to write the fixes and make a pull request. +I wrote a tutorial on parsing SQL here: +http://jakewheat.github.io/intro_to_parsing/ +