1
Fork 0

Introduction of Comment in syntax, to facilitate comments in programatically generated SQL

This commit is contained in:
Han Joosten 2015-03-14 12:40:35 +01:00
parent ba331af24b
commit 258eff5298
4 changed files with 34 additions and 15 deletions
tools/Language/SQL/SimpleSQL

View file

@ -144,24 +144,24 @@ These are a few misc tests which don't fit anywhere else.
> combos :: TestItem
> combos = Group "combos" $ map (uncurry (TestQueryExpr SQL2011))
> [("select a from t union select b from u"
> ,CombineQueryExpr ms1 Union SQDefault Respectively ms2)
> ,CombineQueryExpr ms1 Union SQDefault Respectively ms2 [])
> ,("select a from t intersect select b from u"
> ,CombineQueryExpr ms1 Intersect SQDefault Respectively ms2)
> ,CombineQueryExpr ms1 Intersect SQDefault Respectively ms2 [])
> ,("select a from t except all select b from u"
> ,CombineQueryExpr ms1 Except All Respectively ms2)
> ,CombineQueryExpr ms1 Except All Respectively ms2 [])
> ,("select a from t union distinct corresponding \
> \select b from u"
> ,CombineQueryExpr ms1 Union Distinct Corresponding ms2)
> ,CombineQueryExpr ms1 Union Distinct Corresponding ms2 [])
> ,("select a from t union select a from t union select a from t"
> -- TODO: union should be left associative. I think the others also
> -- so this needs to be fixed (new optionSuffix variation which
> -- handles this)
> ,CombineQueryExpr ms1 Union SQDefault Respectively
> (CombineQueryExpr ms1 Union SQDefault Respectively ms1))
> (CombineQueryExpr ms1 Union SQDefault Respectively ms1 []) [])
> ]
> where
> ms1 = makeSelect