Liking cljdoc? Tell your friends :D

set-concat

The set-concat aggregation function can be used to bind a set of values across a group of rows.

Takes an expression as an argument.

;; QUERY
[[:from :OrderItem]
 [:agg [:order-id] [:items [rel/set-concat :%]]]

;; STATE 
{:OrderItem #{{:order-id 0, :product "bread", :qty 2}, 
              {:order-id 0, :product "eggs", :qty 1}}}
              
;; RESULTS
({:order-id 0, :items #{{:order-id 0, :product "bread", :qty 2}, {:order-id 1, :product "eggs", :qty 1}}})

Can you improve this documentation?Edit on GitHub

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close