1
Fork 0

add support for count(*)

This commit is contained in:
Jake Wheat 2013-12-13 14:21:25 +02:00
parent c29176f08e
commit 52b9f3f4f4
3 changed files with 13 additions and 2 deletions

View file

@ -71,7 +71,10 @@ to be.
> app :: P ScalarExpr
> app = App <$> identifierString <*> parens (commaSep scalarExpr')
> app = App <$> identifierString
> -- support for count(*)
> <*> parens (choice[(:[]) <$> try star
> ,commaSep scalarExpr'])
> scase :: P ScalarExpr
> scase =

2
TODO
View file

@ -14,6 +14,8 @@ position annotation
emacs parse error formatting
haddock
= sql support
count(*)

View file

@ -199,7 +199,13 @@
> fullQueries :: TestItem
> fullQueries = Group "queries" $ map (uncurry TestQueryExpr)
> [("select a, sum(c+d) as s\n\
> [("select count(*) from t"
> ,makeSelect
> {qeSelectList = [(Nothing, App "count" [Star])]
> ,qeFrom = [SimpleTableRef "t"]
> }
> )
> ,("select a, sum(c+d) as s\n\
> \ from t,u\n\
> \ where a > 5\n\
> \ group by a\n\