diff --git a/src/mongo_driver_3/iterable.clj b/src/mongo_driver_3/iterable.clj new file mode 100644 index 0000000..650bbd2 --- /dev/null +++ b/src/mongo_driver_3/iterable.clj @@ -0,0 +1,8 @@ +(ns mongo-driver-3.iterable + (:require [mongo-driver-3.model :as m])) + +(defn documents + "Given a MongoIterable , returns an eduction which will + eventually yield all the documents (per `m/from-document`)." + [it keywordize?] + (eduction (map #(m/from-document % keywordize?)) it))