1
Fork 0

move the typed literal parser around

implement unique predicate, match predicate
change the representation of quantified comparison predicates
This commit is contained in:
Jake Wheat 2014-04-17 22:35:43 +03:00
commit d38a5a743a
5 changed files with 126 additions and 33 deletions
Language/SQL/SimpleSQL

View file

@ -144,11 +144,25 @@ which have been changed to try to improve the layout of the output.
> (case ty of
> SqSq -> empty
> SqExists -> text "exists"
> SqAll -> text "all"
> SqSome -> text "some"
> SqAny -> text "any"
> SqUnique -> text "unique"
> ) <+> parens (queryExpr qe)
> valueExpr (QuantifiedComparison v c cp sq) =
> valueExpr v
> <+> name c
> <+> (text $ case cp of
> CPAny -> "any"
> CPSome -> "some"
> CPAll -> "all")
> <+> parens (queryExpr sq)
> valueExpr (Match v u sq) =
> valueExpr v
> <+> text "match"
> <+> (if u then text "unique" else empty)
> <+> parens (queryExpr sq)
> valueExpr (In b se x) =
> valueExpr se <+>
> (if b then empty else text "not")