dscarpetti / codax

An idiomatic transactional embedded database for clojure
Eclipse Public License 1.0
179 stars 9 forks source link

Add examples of nippy #18

Closed abhi18av closed 7 years ago

abhi18av commented 7 years ago

Hi @dscarpetti

First off, thanks for this wonderful library!

My request is that could you please add some nippy exames in the ReadMe ? I'm a beginner in clojure so I'd love to see a couple examples of non-map data being stored via nippy.

dscarpetti commented 7 years ago

Glad you like it!

Out of the box nippy will encode most (all?) of the standard clojure datatypes. So, basically, unless you are defining your own custom types, you shouldn't have any issue.

For example the following works fine right out of the box.

(assoc-in! some-db [:my-vector] [1 2 3])

(get-in! some-db [:my-vector]); [1 2 3]

Does this address your question?

I can see how the current ReadMe could be ambiguous on this point, I will update it to clarify.

abhi18av commented 7 years ago

Yes, it does help me understand better when you pointed this out here. But i feel, it wasn't too obvious before.

Please feel free to close this "issue" :)

dscarpetti commented 7 years ago

Thanks for bringing it to my attention. I updated the docs, so hopefully it will be easier for others to understand in the future.