fons / cl-mongo

lisp interface to mongo db
fons.github.com/cl-mongo
MIT License
142 stars 31 forks source link

Support for Aggregation Pipelines #35

Open em7 opened 3 years ago

em7 commented 3 years ago

Hello, do you plan to add support for Aggregation Pipelines, please? https://docs.mongodb.com/manual/core/aggregation-pipeline/

If not, can I attempt to do it by myself and submit a PR?

It's not a total show stopper, you can still call an Aggregate Pipeline

(pp (iter (db.find "$cmd" (kv (kv "aggregate" "collection-name")
                              (kv "pipeline" (list (kv "$operator" "parameter")))
                              (kv "cursor" (kv nil nil))) )))

However I'd like to have a better way without making my own function/macro because it should be in the library IMO.