fons / cl-mongo

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

Please adapt for mongo versions >3.0 #32

Open anquegi opened 6 years ago

anquegi commented 6 years ago

Thanks for this library. could be possible to adapt it to be used with mongodb 3?, now it only works with mongodb 2.6.11, as latest release.

;; connect to mongodb 2.6.11
CL-USER> (with-mongo-connection (:host "127.0.0.1" :port 27018 :db "stackoverflow" )
             (show :collections))
[{name : stackoverflow.system.indexes} ]
[{name : stackoverflow.queue2} {options : (autoIndexId : T) (flags : 1) } ]
[{name : stackoverflow.queue2.$_id_} ]
NIL

;; connection to mongodb 3.0
CL-USER> (with-mongo-connection (:host "127.0.0.1" :port 27017 :db "gravity" )
             (show :collections))
NIL

captura de pantalla 2017-11-06 a las 8 37 01 2

mikew1 commented 4 years ago

I have same issue. I tried the oldest version available via homebrew which is v3.2, and I get no connection as above. v2.6 was end of life in 2016 and doesn't seem available. Is there another cl driver for mongo? I was following Lisp for the Web & now there seems no way to continue :(

It is possible to install older versions though, just to complete the book. However of course this tends to rule out use going forward.

Update: Use SBCL! - cl-mongo works for me with that, using latest mongo-community. I was on CCL when I had the problem above.

vindarel commented 4 years ago

I'll quote your edit because it's worth knowing for followers!

Update: Use SBCL! - cl-mongo works for me with that, using latest mongo-community. I was on CCL when I had the problem above.

dkvasnicka commented 4 years ago

Update: Use SBCL! - cl-mongo works for me with that, using latest mongo-community. I was on CCL when I had the problem above.

Can you be a little more specific here? Does latest really mean that this lib works with Mongo 4.2? What were all the features you tried? Queries, aggregation pipelines, collection-level operations...? It's kinda hard to believe since the code was last changed 6 years ago.

dkvasnicka commented 4 years ago

Mongo 3.6.6, SBCL 1.5.7 via roswell 19.3.10.97

* (cl-mongo:with-mongo-connection (:host "127.0.0.1" :port 27017 :db "hub") 
    (cl-mongo:show :collections))
NIL