Improve change log
This commit is contained in:
parent
63f7099350
commit
16f14ac39d
1 changed files with 4 additions and 0 deletions
|
|
@ -5,6 +5,10 @@
|
||||||
`monger.collection/aggregate` provides a convenient way to run [aggregation queries](http://docs.mongodb.org/manual/reference/aggregation/).
|
`monger.collection/aggregate` provides a convenient way to run [aggregation queries](http://docs.mongodb.org/manual/reference/aggregation/).
|
||||||
|
|
||||||
``` clojure
|
``` clojure
|
||||||
|
(ns my.service
|
||||||
|
(:require [monger.collection :as mc])
|
||||||
|
(:use monger.operators))
|
||||||
|
|
||||||
;; single stage pipeline
|
;; single stage pipeline
|
||||||
(mc/aggregate "docs" [{$project {:subtotal {$multiply ["$quantity", "$price"]}
|
(mc/aggregate "docs" [{$project {:subtotal {$multiply ["$quantity", "$price"]}
|
||||||
:_id "$state"}}])
|
:_id "$state"}}])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue