@@ -18,11 +18,15 @@ spec = do
1818 it "correctly renders a simple SELECT query" $ do
1919 renderQuery (select (sumAndCol1 `from` (table1 `where_` true)))
2020 `shouldBe`
21− "SELECT col1+col2 AS sum, col1 AS col1 FROM table1 WHERE TRUE"
21+ "SELECT col1+col2 AS sum, col1 AS col1 FROM table1 WHERE TRUE;"
2222 it "combines WHEREs using AND" $ do
2323 renderQuery (select (sumAndCol1 `from` (table1 `where_` true `where_` false)))
2424 `shouldBe`
25− "SELECT col1+col2 AS sum, col1 AS col1 FROM table1 WHERE TRUE AND FALSE"
25+ "SELECT col1+col2 AS sum, col1 AS col1 FROM table1 WHERE TRUE AND FALSE;"
26+ it "performs subSELECTs" $ do
27+ renderQuery (select (star `from` subselect (sumAndCol1 `from` table1)))
28+ `shouldBe`
29+ "SELECT * FROM SELECT col1+col2 AS sum, col1 AS col1 FROM table1;"
2630
2731type Columns =
2832 '[ '("col1", 'PGInt4)