@@ -147,7 +147,7 @@ simple query:
147>>> type Schema = '["tab" ::: 'Table ('[] :=> Columns)]
147>>> type Schema = '["tab" ::: 'Table ('[] :=> Columns)]
150− query :: Query (DBof (Public Schema)) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
150+ query :: Query '[] (Public Schema) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
151 query = select Star (from (table #tab))
151 query = select Star (from (table #tab))
152in printSQL query
152in printSQL query
@@ -157,7 +157,7 @@ restricted query:
160− query :: Query (DBof (Public Schema)) '[] '["sum" ::: 'NotNull 'PGint4, "col1" ::: 'NotNull 'PGint4]
160+ query :: Query '[] (Public Schema) '[] '["sum" ::: 'NotNull 'PGint4, "col1" ::: 'NotNull 'PGint4]
162 select_ ((#col1 + #col2) `as` #sum :* #col1)
162 select_ ((#col1 + #col2) `as` #sum :* #col1)
163 ( from (table #tab)
163 ( from (table #tab)
@@ -171,7 +171,7 @@ subquery:
174− query :: Query (DBof (Public Schema)) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
174+ query :: Query '[] (Public Schema) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
175 query = select Star (from (subquery (select Star (from (table #tab)) `as` #sub)))
175 query = select Star (from (subquery (select Star (from (table #tab)) `as` #sub)))
176in printSQL query
176in printSQL query
@@ -181,7 +181,7 @@ limits and offsets:
184− query :: Query (DBof (Public Schema)) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
184+ query :: Query '[] (Public Schema) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
185 query = select Star (from (table #tab) & limit 100 & offset 2 & limit 50 & offset 2)
185 query = select Star (from (table #tab) & limit 100 & offset 2 & limit 50 & offset 2)
186in printSQL query
186in printSQL query
@@ -191,7 +191,7 @@ parameterized query:
194− query :: Query (DBof (Public Schema)) '[ 'NotNull 'PGint4] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
194+ query :: Query '[] (Public Schema) '[ 'NotNull 'PGint4] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
195 query = select Star (from (table #tab) & where_ (#col1 .> param @1))
195 query = select Star (from (table #tab) & where_ (#col1 .> param @1))
196in printSQL query
196in printSQL query
@@ -201,7 +201,7 @@ aggregation query:
204− query :: Query (DBof (Public Schema)) '[] '["sum" ::: 'NotNull 'PGint4, "col1" ::: 'NotNull 'PGint4 ]
204+ query :: Query '[] (Public Schema) '[] '["sum" ::: 'NotNull 'PGint4, "col1" ::: 'NotNull 'PGint4 ]
206 select_ (sum_ #col2 `as` #sum :* #col1)
206 select_ (sum_ #col2 `as` #sum :* #col1)
207 ( from (table (#tab `as` #table1))
207 ( from (table (#tab `as` #table1))
@@ -215,7 +215,7 @@ sorted query:
218− query :: Query (DBof (Public Schema)) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
218+ query :: Query '[] (Public Schema) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
219 query = select Star (from (table #tab) & orderBy [#col1 & Asc])
219 query = select Star (from (table #tab) & orderBy [#col1 & Asc])
220in printSQL query
220in printSQL query
@@ -252,7 +252,7 @@ type OrdersSchema =
255− query :: Query (DBof (Public OrdersSchema))
255+ query :: Query '[] (Public OrdersSchema)
257 '[ "order_price" ::: 'NotNull 'PGfloat4
257 '[ "order_price" ::: 'NotNull 'PGfloat4
258 , "customer_name" ::: 'NotNull 'PGtext
258 , "customer_name" ::: 'NotNull 'PGtext
@@ -275,7 +275,7 @@ self-join:
278− query :: Query (DBof (Public Schema)) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
278+ query :: Query '[] (Public Schema) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
279 query = select (#t1 & DotStar) (from (table (#tab `as` #t1) & crossJoin (table (#tab `as` #t2))))
279 query = select (#t1 & DotStar) (from (table (#tab `as` #t1) & crossJoin (table (#tab `as` #t2))))
280in printSQL query
280in printSQL query
@@ -295,7 +295,7 @@ set operations:
298− query :: Query (DBof (Public Schema)) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
298+ query :: Query '[] (Public Schema) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
299 query = select Star (from (table #tab)) `unionAll` select Star (from (table #tab))
299 query = select Star (from (table #tab)) `unionAll` select Star (from (table #tab))
300in printSQL query
300in printSQL query
@@ -305,7 +305,7 @@ with queries:
308− query :: Query (DBof (Public Schema)) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
308+ query :: Query '[] (Public Schema) '[] '["col1" ::: 'NotNull 'PGint4, "col2" ::: 'NotNull 'PGint4]
309 query = with (
309 query = with (
310 select Star (from (table #tab)) `as` #cte1 :>>
310 select Star (from (table #tab)) `as` #cte1 :>>
311 select Star (from (common #cte1)) `as` #cte2
311 select Star (from (common #cte1)) `as` #cte2