1
Fork 0

refactor dialect into a non enum and separate to own file

This commit is contained in:
Jake Wheat 2016-02-12 12:51:06 +02:00
parent 2b73907119
commit 1b4eefc431
22 changed files with 304 additions and 252 deletions
tools/Language/SQL/SimpleSQL

View file

@ -18,20 +18,20 @@ limit syntax
[LIMIT {[offset,] row_count | row_count OFFSET offset}]
> backtickQuotes :: TestItem
> backtickQuotes = Group "backtickQuotes" (map (uncurry (TestValueExpr MySQL))
> backtickQuotes = Group "backtickQuotes" (map (uncurry (TestValueExpr mysql))
> [("`test`", Iden [DQName "`" "`" "test"])
> ]
> ++ [ParseValueExprFails SQL2011 "`test`"]
> ++ [ParseValueExprFails ansi2011 "`test`"]
> )
> limit :: TestItem
> limit = Group "queries" ( map (uncurry (TestQueryExpr MySQL))
> limit = Group "queries" ( map (uncurry (TestQueryExpr mysql))
> [("select * from t limit 5"
> ,sel {qeFetchFirst = Just (NumLit "5")}
> )
> ]
> ++ [ParseQueryExprFails MySQL "select a from t fetch next 10 rows only;"
> ,ParseQueryExprFails SQL2011 "select * from t limit 5"]
> ++ [ParseQueryExprFails mysql "select a from t fetch next 10 rows only;"
> ,ParseQueryExprFails ansi2011 "select * from t limit 5"]
> )
> where
> sel = makeSelect