various optimisations/fixes
This commit is contained in:
parent
3934a6cc50
commit
b32f13574a
1 changed files with 8 additions and 0 deletions
8
src/mongo_driver_3/iterable.clj
Normal file
8
src/mongo_driver_3/iterable.clj
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
(ns mongo-driver-3.iterable
|
||||
(:require [mongo-driver-3.model :as m]))
|
||||
|
||||
(defn documents
|
||||
"Given a MongoIterable <it>, returns an eduction which will
|
||||
eventually yield all the documents (per `m/from-document`)."
|
||||
[it keywordize?]
|
||||
(eduction (map #(m/from-document % keywordize?)) it))
|
||||
Loading…
Reference in a new issue