add support for 'table t' syntax
This commit is contained in:
parent
4308acb982
commit
72b67166d9
6 changed files with 63 additions and 64 deletions
tools/Language/SQL/SimpleSQL
|
@ -263,17 +263,3 @@ select page reference
|
|||
> ,"SELECT distributors.* WHERE distributors.name = 'Westward';"
|
||||
|
||||
> ]
|
||||
|
||||
|
||||
> {-f = mapM_ (putStrLn . either peFormattedError show . parseQueryExpr "" Nothing)
|
||||
> ["SELECT * FROM t1 CROSS JOIN t2;"
|
||||
> ,"SELECT * FROM t1 INNER JOIN t2 ON t1.num = t2.num;"
|
||||
> ,"SELECT * FROM t1 INNER JOIN t2 USING (num);"
|
||||
> ,"SELECT * FROM t1 NATURAL INNER JOIN t2;"
|
||||
> ,"SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num;"
|
||||
> ,"SELECT * FROM t1 LEFT JOIN t2 USING (num);"
|
||||
> ,"SELECT * FROM t1 RIGHT JOIN t2 ON t1.num = t2.num;"
|
||||
> ,"SELECT * FROM t1 FULL JOIN t2 ON t1.num = t2.num;"
|
||||
> ,"SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num AND t2.value = 'xxx';"
|
||||
> - ,"SELECT * FROM t1 LEFT JOIN t2 ON t1.num = t2.num WHERE t2.value = 'xxx';"]-}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ These are a few misc tests which don't fit anywhere else.
|
|||
> ,combos
|
||||
> ,withQueries
|
||||
> ,values
|
||||
> ,tables
|
||||
> ]
|
||||
|
||||
|
||||
|
@ -199,3 +200,8 @@ These are a few misc tests which don't fit anywhere else.
|
|||
> ,Values [[NumLit "1", NumLit "2"]
|
||||
> ,[NumLit "3", NumLit "4"]])
|
||||
> ]
|
||||
|
||||
> tables :: TestItem
|
||||
> tables = Group "tables" $ map (uncurry TestQueryExpr)
|
||||
> [("table tbl", Table "tbl")
|
||||
> ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue