fons / cl-mongo

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

encoding 't' or 'nil' #2

Closed quasi closed 13 years ago

quasi commented 13 years ago

How does one encode a boolean ? Currently if I do (cl-mongo:db.insert "test" (kv (kv "foo" t) (kv "bar" nil) (kv "baz" 3))) then the t and nil get stored as strings

fons commented 13 years ago

switched to db test ================on mongo===============

db.foo.find () { "_id" : ObjectId("4d872104d3db483c313c5ed0"), "a" : "b" } { "_id" : ObjectId("4dcafc086257f100ebbbf7fb"), "boolean_true" : "T" } { "_id" : ObjectId("4dcafc216257f100ebbbf7fc"), "boolean_false" : "NIL" }

This is a bit of an open issue on my end. Nil can mean many things and I had some difficulty getting this work without breaking something else. Ok, so it looks like it's encoded as string "T" and "NIL"..

fons commented 13 years ago

this is fixed..