From b32f13574af03de85147b37c1634c58cd91fae8a Mon Sep 17 00:00:00 2001 From: jimpil Date: Wed, 17 Jan 2024 21:23:40 +0000 Subject: [PATCH] various optimisations/fixes --- src/mongo_driver_3/iterable.clj | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/mongo_driver_3/iterable.clj 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))