1
Fork 0

add support for full table aliases

This commit is contained in:
Jake Wheat 2013-12-14 00:37:34 +02:00
parent d005dc1706
commit 15c83555ff
4 changed files with 11 additions and 6 deletions
Language/SQL/SimpleSQL

View file

@ -157,7 +157,9 @@ back into SQL source text. It attempts to format the output nicely.
> ,nest 4 $ commaSep $ map tr ts]
> where
> tr (SimpleTableRef t) = text t
> tr (JoinAlias t a) = tr t <+> text "as" <+> text a
> tr (JoinAlias t a cs) =
> tr t <+> text "as" <+> text a
> <+> maybe empty (\cs' -> parens $ commaSep $ map text cs') cs
> tr (JoinParens t) = parens $ tr t
> tr (JoinQueryExpr q) = parens $ queryExpr q
> tr (JoinTableRef jt t0 t1 jc) =