@@ -147,7 +147,7 @@ simple query:
147147>>> :{
148148let
149149 query :: Query
150− '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'Null 'PGint4])]
150+ '["public" ::: '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'Null 'PGint4])]]
151151 '[]
152152 '["col" ::: 'Null 'PGint4]
153153 query = selectStar (from (table #tab))
@@ -160,9 +160,9 @@ restricted query:
160160>>> :{
161161let
162162 query :: Query
163− '[ "tab" ::: 'Table ('[] :=>
163+ '[ "public" ::: '[ "tab" ::: 'Table ('[] :=>
164164 '[ "col1" ::: 'NoDef :=> 'NotNull 'PGint4
165− , "col2" ::: 'NoDef :=> 'NotNull 'PGint4 ])]
165+ , "col2" ::: 'NoDef :=> 'NotNull 'PGint4 ])]]
166166 '[]
167167 '[ "sum" ::: 'NotNull 'PGint4
168168 , "col1" ::: 'NotNull 'PGint4 ]
@@ -181,7 +181,7 @@ subquery:
181181>>> :{
182182let
183183 query :: Query
184− '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'Null 'PGint4])]
184+ '["public" ::: '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'Null 'PGint4])]]
185185 '[]
186186 '["col" ::: 'Null 'PGint4]
187187 query =
@@ -196,7 +196,7 @@ limits and offsets:
196196>>> :{
197197let
198198 query :: Query
199− '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'Null 'PGint4])]
199+ '["public" ::: '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'Null 'PGint4])]]
200200 '[]
201201 '["col" ::: 'Null 'PGint4]
202202 query = selectStar
@@ -210,7 +210,7 @@ parameterized query:
210210>>> :{
211211let
212212 query :: Query
213− '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'NotNull 'PGfloat8])]
213+ '["public" ::: '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'NotNull 'PGfloat8])]]
214214 '[ 'NotNull 'PGfloat8]
215215 '["col" ::: 'NotNull 'PGfloat8]
216216 query = selectStar
@@ -224,9 +224,9 @@ aggregation query:
224224>>> :{
225225let
226226 query :: Query
227− '[ "tab" ::: 'Table ('[] :=>
227+ '["public" ::: '[ "tab" ::: 'Table ('[] :=>
228228 '[ "col1" ::: 'NoDef :=> 'NotNull 'PGint4
229− , "col2" ::: 'NoDef :=> 'NotNull 'PGint4 ])]
229+ , "col2" ::: 'NoDef :=> 'NotNull 'PGint4 ])]]
230230 '[]
231231 '[ "sum" ::: 'NotNull 'PGint4
232232 , "col1" ::: 'NotNull 'PGint4 ]
@@ -244,7 +244,7 @@ sorted query:
244244>>> :{
245245let
246246 query :: Query
247− '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'Null 'PGint4])]
247+ '["public" ::: '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'Null 'PGint4])]]
248248 '[]
249249 '["col" ::: 'Null 'PGint4]
250250 query = selectStar
@@ -259,7 +259,7 @@ joins:
259259>>> :{
260260let
261261 query :: Query
262− '[ "orders" ::: 'Table (
262+ '["public" ::: '[ "orders" ::: 'Table (
263263 '["pk_orders" ::: PrimaryKey '["id"]
264264 ,"fk_customers" ::: ForeignKey '["customer_id"] "customers" '["id"]
265265 ,"fk_shippers" ::: ForeignKey '["shipper_id"] "shippers" '["id"]] :=>
@@ -278,7 +278,7 @@ let
278278 '[ "id" ::: 'NoDef :=> 'NotNull 'PGint4
279279 , "name" ::: 'NoDef :=> 'NotNull 'PGtext
280280 ])
281− ]
281+ ]]
282282 '[]
283283 '[ "order_price" ::: 'NotNull 'PGfloat4
284284 , "customer_name" ::: 'NotNull 'PGtext
@@ -302,7 +302,7 @@ self-join:
302302>>> :{
303303let
304304 query :: Query
305− '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'Null 'PGint4])]
305+ '["public" ::: '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'Null 'PGint4])]]
306306 '[]
307307 '["col" ::: 'Null 'PGint4]
308308 query = selectDotStar #t1
@@ -315,7 +315,7 @@ value queries:
315315
316316>>> :{
317317let
318− query :: Query '[] '[] '["foo" ::: 'NotNull 'PGint2, "bar" ::: 'NotNull 'PGbool]
318+ query :: Query db '[] '["foo" ::: 'NotNull 'PGint2, "bar" ::: 'NotNull 'PGbool]
319319 query = values (1 `as` #foo :* true `as` #bar) [2 `as` #foo :* false `as` #bar]
320320in printSQL query
321321:}
@@ -326,7 +326,7 @@ set operations:
326326>>> :{
327327let
328328 query :: Query
329− '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'Null 'PGint4])]
329+ '["public" ::: '["tab" ::: 'Table ('[] :=> '["col" ::: 'NoDef :=> 'Null 'PGint4])]]
330330 '[]
331331 '["col" ::: 'Null 'PGint4]
332332 query =
@@ -342,9 +342,9 @@ with queries:
342342>>> :{
343343let
344344 query :: Query
345− '[ "t1" ::: 'View
345+ '["public" ::: '[ "t1" ::: 'View
346346 '[ "c1" ::: 'NotNull 'PGtext
347− , "c2" ::: 'NotNull 'PGtext] ]
347+ , "c2" ::: 'NotNull 'PGtext] ]]
348348 '[]
349349 '[ "c1" ::: 'NotNull 'PGtext
350350 , "c2" ::: 'NotNull 'PGtext ]