Merge 4fa6511432 into aeab2851c1
This commit is contained in:
commit
9a9e2bbf82
1 changed files with 3 additions and 3 deletions
|
|
@ -523,8 +523,8 @@
|
||||||
"Executes an aggregation query. MongoDB 2.2+ only.
|
"Executes an aggregation query. MongoDB 2.2+ only.
|
||||||
|
|
||||||
See http://docs.mongodb.org/manual/applications/aggregation/ to learn more."
|
See http://docs.mongodb.org/manual/applications/aggregation/ to learn more."
|
||||||
[^DB db ^String coll stages]
|
[^DB db ^String coll stages & [^Boolean allow-disk-use]]
|
||||||
(let [res (mc/command db {:aggregate coll :pipeline stages})]
|
(let [res (mc/command db {:aggregate coll :pipeline stages :allowDiskUse (boolean allow-disk-use)})]
|
||||||
;; this is what DBCollection#distinct does. Turning a blind's eye!
|
;; this is what DBCollection#distinct does. Turning a blind's eye!
|
||||||
(.throwOnError res)
|
(.throwOnError res)
|
||||||
(map #(from-db-object % true) (.get res "result"))))
|
(map #(from-db-object % true) (.get res "result"))))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue