-
So I've been trying to figure out how to use ListTables but can't seem to figure out how to work with the resulting data. I've been doing something similar to this example from the documentation: ordersWithItems :: Query (Order Expr, ListTable Expr (Item Expr))
ordersWithItems = do
order <- each orderSchema
items <- aggregate $ listAgg <$> itemsFromOrder order
return (order, items) My understanding is that if I run a select statement on this I should get back the following: resultingOrderWithItems :: Statement () [(Order Result, ListTable Result (Item Result))]
resultingOrderWithItems = select ordersWithItems The trouble is I'm not sure what to do with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Is that actually what you get when you |
Beta Was this translation helpful? Give feedback.
Is that actually what you get when you
select
? I'm pretty sure aListTable Expr t
should turn into[t']
, wheret'
is whatevert
would transpose to in theResult
context.