fons / cl-mongo

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

Use BSON representations directly #17

Open pcostanza opened 11 years ago

pcostanza commented 11 years ago

Hi,

It would be nice if cl-mongo would provide a way to use BSON representations directly. In my concrete use case, I want to insert documents into a collection, but without first representing them as Lisp hashtables, or so. Instead, I create the necessary octet array directly myself. A workaround was easy: I defined a method on bson-encode-container specialized on array that just returns its argument unchanged. But I'm not sure if that's the most elegant solution...

Pascal

fons commented 11 years ago

That would in fact not be a bad idea.