add support for count(*)
This commit is contained in:
parent
c29176f08e
commit
52b9f3f4f4
|
@ -71,7 +71,10 @@ to be.
|
||||||
|
|
||||||
|
|
||||||
> app :: P ScalarExpr
|
> 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 :: P ScalarExpr
|
||||||
> scase =
|
> scase =
|
||||||
|
|
2
TODO
2
TODO
|
@ -14,6 +14,8 @@ position annotation
|
||||||
|
|
||||||
emacs parse error formatting
|
emacs parse error formatting
|
||||||
|
|
||||||
|
haddock
|
||||||
|
|
||||||
= sql support
|
= sql support
|
||||||
|
|
||||||
count(*)
|
count(*)
|
||||||
|
|
|
@ -199,7 +199,13 @@
|
||||||
|
|
||||||
> fullQueries :: TestItem
|
> fullQueries :: TestItem
|
||||||
> fullQueries = Group "queries" $ map (uncurry TestQueryExpr)
|
> 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\
|
> \ from t,u\n\
|
||||||
> \ where a > 5\n\
|
> \ where a > 5\n\
|
||||||
> \ group by a\n\
|
> \ group by a\n\
|
||||||
|
|
Loading…
Reference in a new issue