move the typed literal parser around
implement unique predicate, match predicate change the representation of quantified comparison predicates
This commit is contained in:
parent
0d3f552ede
commit
d38a5a743a
5 changed files with 126 additions and 33 deletions
Language/SQL/SimpleSQL
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue